|
1 | | -# Astro Starter Kit: Minimal |
| 1 | +# khopsickle.github.io |
2 | 2 |
|
3 | | -```sh |
4 | | -npm create astro@latest -- --template minimal |
5 | | -``` |
| 3 | +A personal site built in Astro on GitHub Pages. |
6 | 4 |
|
7 | | -> 🧑🚀 **Seasoned astronaut?** Delete this file. Have fun! |
| 5 | +--- |
8 | 6 |
|
9 | | -## 🚀 Project Structure |
| 7 | +## Requirements |
10 | 8 |
|
11 | | -Inside of your Astro project, you'll see the following folders and files: |
| 9 | +- **node** ≥ 24.14 |
| 10 | +- **npm** ≥ 11 |
12 | 11 |
|
13 | | -```text |
14 | | -/ |
15 | | -├── public/ |
16 | | -├── src/ |
17 | | -│ └── pages/ |
18 | | -│ └── index.astro |
19 | | -└── package.json |
20 | | -``` |
| 12 | +> _Optional_: **ESLint** + **Prettier** extensions |
| 13 | +
|
| 14 | +--- |
| 15 | + |
| 16 | +## Local Development |
| 17 | + |
| 18 | +1. clone the repo |
| 19 | + |
| 20 | + ```bash |
| 21 | + git clone https://github.com/khopsickle/khopsickle.github.io.git |
| 22 | + cd khopsickle.github.io |
| 23 | + ``` |
| 24 | + |
| 25 | +1. create `.env` file in the root dir with `GH_USERNAME` |
| 26 | + |
| 27 | + ``` |
| 28 | + GH_USERNAME=khopsickle |
| 29 | + ``` |
| 30 | + |
| 31 | +1. install dependencies |
| 32 | + |
| 33 | + ```bash |
| 34 | + npm ci |
| 35 | + ``` |
| 36 | + |
| 37 | +1. create a `.gitignore` |
| 38 | + |
| 39 | + <details> |
| 40 | + |
| 41 | + <summary>sample .gitignore</summary> |
21 | 42 |
|
22 | | -Astro looks for `.astro` or `.md` files in the `src/pages/` directory. Each page is exposed as a route based on its file name. |
| 43 | + <code> |
23 | 44 |
|
24 | | -There's nothing special about `src/components/`, but that's where we like to put any Astro/React/Vue/Svelte/Preact components. |
| 45 | + # build output |
| 46 | + dist/ |
25 | 47 |
|
26 | | -Any static assets, like images, can be placed in the `public/` directory. |
| 48 | + # generated types |
| 49 | + .astro/ |
27 | 50 |
|
28 | | -## 🧞 Commands |
| 51 | + # dependencies |
| 52 | + node_modules/ |
29 | 53 |
|
30 | | -All commands are run from the root of the project, from a terminal: |
| 54 | + # logs |
| 55 | + npm-debug.log* |
| 56 | + yarn-debug.log* |
| 57 | + yarn-error.log* |
| 58 | + pnpm-debug.log* |
31 | 59 |
|
32 | | -| Command | Action | |
33 | | -| :------------------------ | :----------------------------------------------- | |
34 | | -| `npm install` | Installs dependencies | |
35 | | -| `npm run dev` | Starts local dev server at `localhost:4321` | |
36 | | -| `npm run build` | Build your production site to `./dist/` | |
37 | | -| `npm run preview` | Preview your build locally, before deploying | |
38 | | -| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` | |
39 | | -| `npm run astro -- --help` | Get help using the Astro CLI | |
| 60 | + # environment variables |
| 61 | + .env |
| 62 | + .env.production |
| 63 | + |
| 64 | + # macOS-specific files |
| 65 | + .DS_Store |
| 66 | + |
| 67 | + # jetbrains setting folder |
| 68 | + .idea/ |
| 69 | + |
| 70 | + # output of Medium fetch script |
| 71 | + src/data/ |
| 72 | + |
| 73 | + .vscode |
| 74 | + |
| 75 | + </code> |
| 76 | + </details> |
| 77 | + |
| 78 | +1. run article fetch script |
| 79 | + |
| 80 | + ```bash |
| 81 | + node scripts/fetch-medium.js |
| 82 | + ``` |
| 83 | + |
| 84 | +1. run dev server |
| 85 | + ```bash |
| 86 | + npm run dev |
| 87 | + ``` |
| 88 | + |
| 89 | +--- |
| 90 | + |
| 91 | +## Project Structure |
| 92 | + |
| 93 | +Inside of your Astro project, you'll see the following folders and files: |
| 94 | +
|
| 95 | +```text |
| 96 | +. |
| 97 | +├─ public/ |
| 98 | +│ |
| 99 | +├─ scripts/ |
| 100 | +│ └─ fetch-medium.js |
| 101 | +│ |
| 102 | +├─ src/ |
| 103 | +│ ├─ data/ # ignored |
| 104 | +│ ├─ pages/ |
| 105 | +│ │ ├─ index.astro |
| 106 | +│ │ └─ 404.astro |
| 107 | +│ ├─ styles/ |
| 108 | +│ │ └─ global.css |
| 109 | +│ |
| 110 | +├─ package.json |
| 111 | +├─ tsconfig.json |
| 112 | +├─ tailwind.config.cjs |
| 113 | +│ |
| 114 | +├─ .env # ignored |
| 115 | +└─ .github/workflows/ |
| 116 | + └─ deploy.yml |
| 117 | +``` |
40 | 118 |
|
41 | | -## 👀 Want to learn more? |
| 119 | +<br /> |
42 | 120 |
|
43 | | -Feel free to check [our documentation](https://docs.astro.build) or jump into our [Discord server](https://astro.build/chat). |
| 121 | +| Directory | Description | |
| 122 | +| ------------- | -------------------------------------------------------------------------------------------------------- | |
| 123 | +| `public/` | Any static assets,<br>like images, can be placed in this directory. | |
| 124 | +| `scripts/` | Node utilities<br>and other build-time code. | |
| 125 | +| `src/data/` | Generated or stored data files<br>that the site consumes at build time. | |
| 126 | +| `src/pages/` | Astro looks for `.astro` or `.md` files here.<br>Each page is exposed as a route based on its file name. | |
| 127 | +| `src/styles/` | Global styles and Tailwind CSS configuration/imports. | |
0 commit comments