|
1 | | -# Astro Starter Kit: Minimal |
| 1 | +# thilohoholt.com |
2 | 2 |
|
3 | | -```sh |
4 | | -npm create astro@latest -- --template minimal |
5 | | -``` |
| 3 | +This is the source code for my personal website, which was built using the Astro web framework. |
6 | 4 |
|
7 | | -[](https://stackblitz.com/github/withastro/astro/tree/latest/examples/minimal) |
8 | | -[](https://codesandbox.io/p/sandbox/github/withastro/astro/tree/latest/examples/minimal) |
9 | | -[](https://codespaces.new/withastro/astro?devcontainer_path=.devcontainer/minimal/devcontainer.json) |
| 5 | +In addition to the website itself, the repository includes Nix files (`flake.nix` and `server/*.nix`), which are used to configure the self-hosted services listed on the website (https://thilohohlt.com/services) and to easily locally deploy to the corresponding NixOS server. |
10 | 6 |
|
11 | | -> 🧑🚀 **Seasoned astronaut?** Delete this file. Have fun! |
| 7 | +## Main commands |
12 | 8 |
|
13 | | -## 🚀 Project Structure |
| 9 | +- Use the command `npm run dev` to start the Astro development server |
| 10 | +- Run `npm run format` to format the web code with Prettier |
| 11 | +- Run `nix develop` to enter the dev shell, which includes packages for Nix language support and formatting |
| 12 | +- Run `nix run .#deploy-server` to evaluate if the current configuration builds successfully. If so, it will deploy the changes to the remote NixOS server |
14 | 13 |
|
15 | | -Inside of your Astro project, you'll see the following folders and files: |
| 14 | +For good IDE support (e.g., NixOS option completions in `default.nix`), use the `jnoortheen.nix-ide` VSCode extension with the following settings: |
16 | 15 |
|
17 | | -```text |
18 | | -/ |
19 | | -├── public/ |
20 | | -├── src/ |
21 | | -│ └── pages/ |
22 | | -│ └── index.astro |
23 | | -└── package.json |
| 16 | +```json |
| 17 | +{ |
| 18 | + "nix.enableLanguageServer": true, |
| 19 | + "nix.serverPath": "nil", |
| 20 | + "nix.serverSettings": { |
| 21 | + "nixd": { |
| 22 | + "formatting": { |
| 23 | + "command": ["nixfmt"] |
| 24 | + } |
| 25 | + } |
| 26 | + } |
| 27 | +} |
24 | 28 | ``` |
25 | | - |
26 | | -Astro looks for `.astro` or `.md` files in the `src/pages/` directory. Each page is exposed as a route based on its file name. |
27 | | - |
28 | | -There's nothing special about `src/components/`, but that's where we like to put any Astro/React/Vue/Svelte/Preact components. |
29 | | - |
30 | | -Any static assets, like images, can be placed in the `public/` directory. |
31 | | - |
32 | | -## 🧞 Commands |
33 | | - |
34 | | -All commands are run from the root of the project, from a terminal: |
35 | | - |
36 | | -| Command | Action | |
37 | | -| :------------------------ | :----------------------------------------------- | |
38 | | -| `npm install` | Installs dependencies | |
39 | | -| `npm run dev` | Starts local dev server at `localhost:4321` | |
40 | | -| `npm run build` | Build your production site to `./dist/` | |
41 | | -| `npm run preview` | Preview your build locally, before deploying | |
42 | | -| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` | |
43 | | -| `npm run astro -- --help` | Get help using the Astro CLI | |
44 | | - |
45 | | -## 👀 Want to learn more? |
46 | | - |
47 | | -Feel free to check [our documentation](https://docs.astro.build) or jump into our [Discord server](https://astro.build/chat). |
0 commit comments