website

#astro#js#html#css

git clone https://git.pyrossh.dev/website

木 Personal website of pyrossh. Built with astrojs, shiki, vite.


README.md
3c132d8 1
# Website
3c132d8 2
3c79a68 3
Personal website, built as a static site with [Eleventy](https://www.11ty.dev) and
3c79a68 4
[Elena](https://elenajs.com) web components.
16367c8 5
3c79a68 6
## Project Structure
16367c8 7
16367c8 8
```text
3c79a68 9
├── assets/            static css/images/icons/pdfs, copied through as-is
16367c8 10
├── src/
3c79a68 11
│   ├── _data/          global data (site config, local repo discovery)
3c79a68 12
│   ├── _helpers/        plain JS helpers used by _data files (git plumbing)
3c79a68 13
│   ├── _includes/       layouts and partials
3c79a68 14
│   ├── components/      Elena web components
3c79a68 15
│   ├── posts/           blog post markdown
3c79a68 16
│   ├── repos/           paginated templates for repo readme/files/commits/blame
3c79a68 17
│   └── *.njk            top-level pages
3c79a68 18
├── eleventy.config.js
3c79a68 19
└── package.json
16367c8 20
```
16367c8 21
3c79a68 22
## Repo browsing
16367c8 23
3c79a68 24
Pages under `/repos/:id` are generated entirely from local git checkouts that live as
3c79a68 25
**sibling directories of this project** — e.g. `../config`, `../rust-embed` next to
3c79a68 26
`website/` — not inside this repo. No API calls, no bucket access: README, file
3c79a68 27
tree/content, commit list, per-commit diffs, per-file history, and per-file blame are all
3c79a68 28
read straight from git (`git ls-tree`, `git log`, `git show`, `git blame`) at build time.
16367c8 29
3c79a68 30
A repo listed in `src/_data/site.js` only gets pages if a matching directory exists next to
3c79a68 31
this project *and* is a git repo in its own right (has its own `.git`, not nested inside
3c79a68 32
another repo's working tree); otherwise it just shows as a plain, unlinked card on the home
3c79a68 33
page. File discovery excludes `node_modules`, `dist`, `.git`, and similar build-output
3c79a68 34
directories regardless of whether they're git-tracked, and reads the tree at `HEAD` rather
3c79a68 35
than the working directory so uncommitted local changes don't leak into the generated pages.
16367c8 36
3c79a68 37
## Commands
16367c8 38
a3ff3a4 39
| Command             | Action                                                          |
a3ff3a4 40
| :------------------- | :---------------------------------------------------------------- |
a3ff3a4 41
| `npm install`        | Install dependencies                                            |
a3ff3a4 42
| `npm run dev`        | Start the Eleventy dev server with reload                       |
a3ff3a4 43
| `npm run build`      | Build the static site to `./dist/`                               |
a3ff3a4 44
| `npm test`           | Build, then run the Playwright page tests                       |
a3ff3a4 45
| `npm run test:hurl`  | Run [hurl](https://hurl.dev) checks against the live git dumb-http endpoint (`git.pyrossh.dev`); requires the `hurl` CLI |