1# my-patterns 2 3This directory can be used to save your own patterns, which then get 4made into a pattern swatch. 5 6Example: <https://felixroos.github.io/strudel/swatch/> 7 8Please note: These instructions have not been fully tested/adapted since strudel moved to codeberg from github. PRs welcome! 9 10## deploy 11 12### 1. fork the [strudel repo on codeberg](https://codeberg.org/uzu/strudel.git) 13 14### 2. clone your fork to your machine `git clone https://codeberg.org/<your-username>/strudel.git strudel && cd strudel` 15 16### 3. create a separate branch like `git branch patternuary && git checkout patternuary` 17 18### 4. save one or more .txt files in the my-patterns folder 19 20### 5. edit `website/public/CNAME` to contain `<your-username>.codeberg.page/strudel` 21 22### 6. edit `website/astro.config.mjs` to use site: `https://<your-username>.codeberg.page` and base `/strudel`, like this 23 24```js 25const site = 'https://<your-username>.codeberg.page'; 26const base = '/strudel'; 27``` 28 29### 7. commit & push the changes 30 31```sh 32git add . && git commit -m "site config" && git push --set-upstream origin 33``` 34 35### 8. deploy to codeberg pages 36 37### 9. view your patterns at `<your-username>.codeberg.page/strudel/swatch/` 38 39### 10. optional: automatic deployment 40 41If you want to automatically deploy your site on push, go to `deploy.yml` and change `workflow_dispatch` to `push`. 42 43## running locally 44 45- install dependencies with `npm run setup` 46- run dev server with `npm run repl` and open `http://localhost:4321/strudel/swatch/` 47 48## tests fail? 49 50Your tests might fail if the code does not follow prettiers format. 51In that case, run `npm run codeformat`. To disable that, remove `npm run format-check` from `test.yml` 52 53## updating your fork 54 55To update your fork, you can pull the main branch and merge it into your `patternuary` branch.