diff --git a/.github/ISSUE_TEMPLATE/bug.md b/.github/ISSUE_TEMPLATE/bug.md new file mode 100644 index 0000000..13bd73e --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug.md @@ -0,0 +1,23 @@ +--- +name: Bug +about: Defect in existing functionality +title: "" +labels: bug +assignees: "" +--- + +**Severity:** critical | major | minor | trivial + +## Expected +[What should happen] + +## Actual +[What happens instead] + +## Reproduce +1. [Step 1] +2. [Step 2] +3. [Result] + +## Environment +[dev/preview/production, browser, branch] diff --git a/.github/ISSUE_TEMPLATE/epic.md b/.github/ISSUE_TEMPLATE/epic.md new file mode 100644 index 0000000..6979dbc --- /dev/null +++ b/.github/ISSUE_TEMPLATE/epic.md @@ -0,0 +1,20 @@ +--- +name: Epic +about: Large initiative spanning multiple tasks or sessions +title: "" +labels: epic +assignees: "" +--- + +## Goal +[One sentence — what does success look like?] + +## Tasks +- [ ] #XX — task description +- [ ] #YY — task description + +## Out of scope +[What this epic does NOT cover] + +## Definition of done +[Measurable criteria for closing] diff --git a/.github/ISSUE_TEMPLATE/git-tutorial-issue-template.md b/.github/ISSUE_TEMPLATE/git-tutorial-issue-template.md deleted file mode 100644 index 731c8a8..0000000 --- a/.github/ISSUE_TEMPLATE/git-tutorial-issue-template.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -name: Git Tutorial Issue Template -about: Use the template to define an issue for this project -title: "(TUT-GIT) - " -labels: '' -assignees: '' - ---- - -1. Follow the contributing guideline -2. State the idea or the problem -3. Propose a solution whenever possible -4. Add references or links diff --git a/.github/ISSUE_TEMPLATE/incident.md b/.github/ISSUE_TEMPLATE/incident.md new file mode 100644 index 0000000..48b99ca --- /dev/null +++ b/.github/ISSUE_TEMPLATE/incident.md @@ -0,0 +1,26 @@ +--- +name: Incident +about: Production outage or degradation affecting users now +title: "" +labels: incident +assignees: "" +--- + +**Severity:** critical | major +**Status:** investigating | identified | mitigating | resolved + +## Impact +[Who is affected, how severely] + +## Timeline +- [HH:MM UTC] — [event] +- [HH:MM UTC] — [event] + +## Root cause +[What caused it — fill in after identified] + +## Resolution +[What fixed it — fill in after resolved] + +## Prevention +[What changes prevent recurrence — fill in after postmortem] diff --git a/.github/ISSUE_TEMPLATE/spike.md b/.github/ISSUE_TEMPLATE/spike.md new file mode 100644 index 0000000..9ba40df --- /dev/null +++ b/.github/ISSUE_TEMPLATE/spike.md @@ -0,0 +1,19 @@ +--- +name: Spike +about: Research or exploration — output is a decision or ADR +title: "" +labels: question +assignees: "" +--- + +As a [role], I want to understand [topic] so that [decision can be made]. + +## What +[Question or area to explore] + +## Why +[What decision is blocked without this research?] + +## Acceptance criteria +- [ ] ADR documenting the decision +- [ ] Recommendation with alternatives considered diff --git a/.github/ISSUE_TEMPLATE/task.md b/.github/ISSUE_TEMPLATE/task.md new file mode 100644 index 0000000..53d369a --- /dev/null +++ b/.github/ISSUE_TEMPLATE/task.md @@ -0,0 +1,19 @@ +--- +name: Task +about: Atomic implementable unit of work +title: "" +labels: enhancement +assignees: "" +--- + +As a [user type], I want [capability] so that [benefit]. + +## What +[Clear description of the change] + +## Why +[Motivation — which epic does this serve?] + +## Acceptance criteria +- [ ] [Observable behavior 1] +- [ ] [Observable behavior 2] diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..fb5c20e --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,38 @@ +name: Build Astro site (PR validation) + +on: + pull_request: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: "22.12.0" + cache: npm + cache-dependency-path: astro-site/package-lock.json + + - name: Install dependencies + working-directory: astro-site + run: npm ci + + - name: Create assets symlink + working-directory: astro-site/src/content + run: ln -s ../../../assets assets + + - name: Build site + working-directory: astro-site + run: npm run build + + - name: Check links + uses: lycheeverse/lychee-action@v2 + with: + args: --base astro-site/dist astro-site/dist + fail: true diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 4ffba5f..24307a0 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -24,7 +24,9 @@ jobs: - name: Set up Node.js uses: actions/setup-node@v4 with: - node-version: "22" + node-version: "22.12.0" + cache: npm + cache-dependency-path: astro-site/package-lock.json - name: Install dependencies working-directory: astro-site @@ -38,6 +40,12 @@ jobs: working-directory: astro-site run: npm run build + - name: Check links + uses: lycheeverse/lychee-action@v2 + with: + args: --base astro-site/dist astro-site/dist + fail: true + - name: Upload artifact uses: actions/upload-pages-artifact@v3 with: diff --git a/.gitignore b/.gitignore index 5cfefd2..e3d97f6 100644 --- a/.gitignore +++ b/.gitignore @@ -48,4 +48,7 @@ Thumbs.db *.mov *.wmv +# draw.io and image editor backup files +*.bkp + astro-site/src/content/assets diff --git a/CLAUDE.md b/CLAUDE.md index d034d9b..6c6eac5 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -261,7 +261,7 @@ rounded=1;whiteSpace=wrap;html=1;fillColor=#FFFFFF;strokeColor=#D3D1C7;strokeWid ```bash # Astro site (from astro-site/) -npm run dev # develop — hot reload at localhost:4321 +npm run dev # develop — hot reload at localhost:4321/tutorial-git/ npm run build # production build to dist/ npm run preview # preview production build locally ``` diff --git a/LICENSE.md b/LICENSE.md index 4d4e68a..e01b30a 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,21 +1,24 @@ -MIT License - -Copyright (c) 2021 Branimir Georgiev - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +# License + +This work is licensed under the +**Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International** +license (CC BY-NC-SA 4.0). + +Copyright (c) 2021-2026 Branimir Georgiev + +## You are free to + +- **Share** — copy and redistribute the material in any medium or format +- **Adapt** — remix, transform, and build upon the material + +## Under the following terms + +- **Attribution** — You must give appropriate credit, provide a link to the + license, and indicate if changes were made +- **NonCommercial** — You may not use the material for commercial purposes +- **ShareAlike** — If you remix, transform, or build upon the material, you + must distribute your contributions under the same license + +## Full license text + +https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode diff --git a/README.md b/README.md index 226db25..c4677cb 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,3 @@ -

- Code with Branko — Git Tutorial -

- # Git Tutorial A hands-on Git tutorial for developers who want to go from first commit @@ -21,7 +17,7 @@ $ ln -s ../../../assets src/content/assets # image symlink (Linux/macOS) $ npm run dev ``` -Open [localhost:4321](http://localhost:4321) in your browser. +Open [localhost:4321/tutorial-git/](http://localhost:4321/tutorial-git/) in your browser. On Windows, the symlink is created as a directory copy automatically. @@ -104,4 +100,4 @@ After editing a chapter in `chapters/`, copy it to ## License -[MIT](LICENSE.md) +[CC BY-NC-SA 4.0](LICENSE.md) diff --git a/assets/archive/git-branch-navigation.png b/assets/archive/git-branch-navigation.png new file mode 100644 index 0000000..4dfb40c Binary files /dev/null and b/assets/archive/git-branch-navigation.png differ diff --git a/assets/images/git-branch-overview.png b/assets/archive/git-branch-overview.png similarity index 100% rename from assets/images/git-branch-overview.png rename to assets/archive/git-branch-overview.png diff --git a/assets/images/git-conflict-markers.png b/assets/archive/git-conflict-markers.png similarity index 100% rename from assets/images/git-conflict-markers.png rename to assets/archive/git-conflict-markers.png diff --git a/assets/images/git-data-flow-danny-lee.png b/assets/archive/git-data-flow-danny-lee.png similarity index 100% rename from assets/images/git-data-flow-danny-lee.png rename to assets/archive/git-data-flow-danny-lee.png diff --git a/assets/images/git-dataflow-3.png b/assets/archive/git-dataflow-3.png similarity index 100% rename from assets/images/git-dataflow-3.png rename to assets/archive/git-dataflow-3.png diff --git a/assets/images/git-logo-2-color.png b/assets/archive/git-logo-2-color.png similarity index 100% rename from assets/images/git-logo-2-color.png rename to assets/archive/git-logo-2-color.png diff --git a/assets/images/git-logo-black.png b/assets/archive/git-logo-black.png similarity index 100% rename from assets/images/git-logo-black.png rename to assets/archive/git-logo-black.png diff --git a/assets/images/git-logo-white.png b/assets/archive/git-logo-white.png similarity index 100% rename from assets/images/git-logo-white.png rename to assets/archive/git-logo-white.png diff --git a/assets/images/git-merge-3-way-example.png b/assets/archive/git-merge-3-way-example.png similarity index 100% rename from assets/images/git-merge-3-way-example.png rename to assets/archive/git-merge-3-way-example.png diff --git a/assets/images/git-workflow.png b/assets/archive/git-workflow.png similarity index 100% rename from assets/images/git-workflow.png rename to assets/archive/git-workflow.png diff --git a/assets/images/git-branch-navigation.png b/assets/images/git-branch-navigation.png deleted file mode 100644 index ef86a31..0000000 Binary files a/assets/images/git-branch-navigation.png and /dev/null differ diff --git a/astro-site/README.md b/astro-site/README.md deleted file mode 100644 index 87b813a..0000000 --- a/astro-site/README.md +++ /dev/null @@ -1,43 +0,0 @@ -# Astro Starter Kit: Minimal - -```sh -npm create astro@latest -- --template minimal -``` - -> 🧑‍🚀 **Seasoned astronaut?** Delete this file. Have fun! - -## 🚀 Project Structure - -Inside of your Astro project, you'll see the following folders and files: - -```text -/ -├── public/ -├── src/ -│ └── pages/ -│ └── index.astro -└── package.json -``` - -Astro looks for `.astro` or `.md` files in the `src/pages/` directory. Each page is exposed as a route based on its file name. - -There's nothing special about `src/components/`, but that's where we like to put any Astro/React/Vue/Svelte/Preact components. - -Any static assets, like images, can be placed in the `public/` directory. - -## 🧞 Commands - -All commands are run from the root of the project, from a terminal: - -| Command | Action | -| :------------------------ | :----------------------------------------------- | -| `npm install` | Installs dependencies | -| `npm run dev` | Starts local dev server at `localhost:4321` | -| `npm run build` | Build your production site to `./dist/` | -| `npm run preview` | Preview your build locally, before deploying | -| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` | -| `npm run astro -- --help` | Get help using the Astro CLI | - -## 👀 Want to learn more? - -Feel free to check [our documentation](https://docs.astro.build) or jump into our [Discord server](https://astro.build/chat). diff --git a/astro-site/src/components/TableOfContents.astro b/astro-site/src/components/TableOfContents.astro index ac764b4..e7a3a95 100644 --- a/astro-site/src/components/TableOfContents.astro +++ b/astro-site/src/components/TableOfContents.astro @@ -50,10 +50,10 @@ for (const h of headings) {