2022-07-19 14:25:29 +00:00
# Start9 website
## Architecture
- [11ty ](https://www.11ty.dev ) for Static Site Generator
2022-10-24 12:17:02 +00:00
## Serve for dev
2022-07-19 14:25:29 +00:00
```
2022-10-07 13:37:57 +00:00
npm run start
2022-07-19 14:25:29 +00:00
```
2022-10-11 15:44:21 +00:00
Open http://localhost:8080 to see the site.
_(8080+n will be used if 8080 is already in use, ad nauseum)_
2022-07-19 14:25:29 +00:00
2022-10-24 12:17:02 +00:00
### NOTE
Eleventy projects served in this way will re-build on save of any file in the project.
Usually, any browser viewing the page will also hot-reload on build. However, this project stopped hot-reloading a couple of weeks ago. Have not been able to diagnose why. According to some threads I found, it's a bit of a black-box with many possible causes.
2022-07-19 14:25:29 +00:00
2022-10-24 12:17:02 +00:00
## Deploy to production
2022-10-11 15:44:21 +00:00
You can see the results locally in production mode with:
2022-07-19 14:25:29 +00:00
```
2022-10-11 15:44:21 +00:00
npm run build
2022-07-19 14:25:29 +00:00
```
2022-10-11 15:44:21 +00:00
Now, your blog is ready to be deployed. All generated files are located at `_site` folder, which you can deploy with any hosting service.
2022-10-24 12:17:02 +00:00
(I use https://coolify.io/ which allows me to auto-deploy by pushing to GitLab.)
2022-10-11 15:44:21 +00:00
2022-07-19 14:25:29 +00:00
2022-10-11 15:44:21 +00:00
## Project structure
2022-07-19 14:25:29 +00:00
```
.
2022-10-11 15:44:21 +00:00
├── .eleventy.js # Eleventy config
│
2022-07-19 14:25:29 +00:00
└── src
2022-10-24 12:17:02 +00:00
├── _data # Eleventy data folder (supports .json and exported .js)
2022-07-19 14:25:29 +00:00
├── _includes
2022-10-24 12:17:02 +00:00
│ └── components # landing sections and reuable components
│ └── layouts # page layouts
│ └── svgs # for including in njk templates
2022-10-11 15:44:21 +00:00
└── assets
2022-10-24 12:17:02 +00:00
├── fonts
├── images
├── js
└── styles # SCSS
2022-07-19 14:25:29 +00:00
```