homebrewserver.club/README.md

79 lines
1.5 KiB
Markdown
Raw Normal View History

2019-06-12 15:02:15 +02:00
# nooo-hbsc
The new homebrewserver.club website.
> https://homebrewserver.club/
2019-06-12 15:02:15 +02:00
## Build the site locally
### System requirements
2019-06-12 15:02:15 +02:00
Install the system requirements:
2019-06-12 15:02:15 +02:00
```bash
$ apt install -y python3 python3-dev python3-venv
2019-06-12 15:02:15 +02:00
```
### Python requirements
2019-06-12 15:02:15 +02:00
Then create a virtual environment and activate it:
2019-06-12 15:02:15 +02:00
```bash
$ python3 -m venv .venv
$ source .venv/bin/activate
```
Then install the requirements:
```bash
$ pip install -r requirements.txt
2019-06-12 15:02:15 +02:00
```
2019-06-12 15:19:05 +02:00
### Generating the site
Generate the content and run the server:
```bash
$ pelican content
$ pelican --listen
```
2019-06-12 15:19:05 +02:00
Then the site is available at the following URL:
> http://localhost:8000
## Working with the site
2019-06-12 15:19:05 +02:00
2019-06-17 11:54:25 +02:00
* Website articles and content are in [content](./content)
* The website theme is in [themes/homebrewtheme](./themes/homebrewtheme)
* Images are stored in [content/staticfiles/images](./content/staticfiles/images)
While working on the site, you can run the following:
2019-06-12 15:19:05 +02:00
```bash
$ invoke livereload
2019-06-12 15:19:05 +02:00
```
And then the Pelican development server will automatically reload
when you make changes. It is also possible to use:
```bash
$ pelican --autoreload --listen
```
However, this will not automatically refresh your browser page.
2019-06-17 12:20:20 +02:00
### Writing drafts
Use `Status: draft` in the article metadata. When the site is generated, the
`output/drafts` folder will be created with your new draft article. This allows
us to work on new articles and still store the pages here in the repository.
## Deploying the site
Just run the usual:
```
$ git push origin master
```