2026-09-24 11:01:03 -07:00
|
|
|
# 11ty + Mattrbld Template
|
2026-09-24 18:39:49 +02:00
|
|
|
|
2026-09-24 11:01:03 -07:00
|
|
|
Template repository for my 11ty + Mattrbld projects.
|
|
|
|
|
|
2026-09-24 11:02:06 -07:00
|
|
|
## Syncing
|
|
|
|
|
|
|
|
|
|
Always remember to check for changes before starting work, and sync your changes when your work is done.
|
|
|
|
|
|
2026-09-24 11:03:08 -07:00
|
|
|
## Images
|
2026-09-24 11:01:03 -07:00
|
|
|
|
|
|
|
|
Please import images in the "Media Library" tab - uploading them directly via post creation seems to create issues with the image pathing.
|
2026-09-24 18:39:49 +02:00
|
|
|
|
2026-09-24 11:02:29 -07:00
|
|
|
---
|
|
|
|
|
|
2026-09-24 18:39:49 +02:00
|
|
|
## full drone/submodule setup from scratch
|
|
|
|
|
|
|
|
|
|
### 1. create repo
|
|
|
|
|
|
|
|
|
|
in heckin gitea, create destination repo.
|
|
|
|
|
|
|
|
|
|
### 2. update dronefile in source repo
|
|
|
|
|
|
|
|
|
|
Update the `<placeholder values>` in [.drone.yml](.drone.yml).
|
|
|
|
|
|
|
|
|
|
### 3. create and add PAT (one-time, not per repo)
|
|
|
|
|
|
|
|
|
|
in heckin, go to settings > applications, and create a PAT with read & write permissions to repositories.
|
|
|
|
|
|
|
|
|
|
in drone, you can set your PAT either as a project secret or an organization secret. In either case call it `GIT_TOKEN`.
|
|
|
|
|
|
|
|
|
|
### 4. activate project in drone
|
|
|
|
|
|
|
|
|
|
in drone, find your project and activate it.
|
|
|
|
|
|
|
|
|
|
in the settings, I chose to disable pull requests and forks. I set my runner timeout to 15m.
|
|
|
|
|
|
|
|
|
|
### 5. first commit to submodule
|
|
|
|
|
|
|
|
|
|
assuming we are committing the _site folder...
|
|
|
|
|
|
|
|
|
|
```sh
|
|
|
|
|
cp -r _site ../temp
|
|
|
|
|
cd ../temp
|
|
|
|
|
|
|
|
|
|
git init
|
|
|
|
|
git add -A
|
|
|
|
|
git commit -m "first"
|
|
|
|
|
|
|
|
|
|
git remote add origin <remote-url>
|
|
|
|
|
git push -u origin main
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
then you can delete the temp directory.
|
|
|
|
|
|
|
|
|
|
### 6. add submodule to local repo
|
|
|
|
|
|
|
|
|
|
in root dir of local repo, add the submodule.
|
|
|
|
|
|
|
|
|
|
```sh
|
|
|
|
|
git submodule add <remote-url>
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
if you used the SSH url, set it to the HTTPS url.
|
|
|
|
|
|
|
|
|
|
```sh
|
|
|
|
|
git submodule set-url <dest-repo> <remote-url-https>
|
|
|
|
|
git add .gitmodules # the changes from submodule add are auto-staged, this config change isn't
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
commit your changes and push.
|
|
|
|
|
|
|
|
|
|
```sh
|
|
|
|
|
git commit -m "add submodule"
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
(commit your dronefile changes too.)
|
|
|
|
|
|
|
|
|
|
### 7. profit
|
|
|
|
|
|
|
|
|
|
if it doesn't work, cry
|