c0de.dev-blog/readme.md

42 lines
1.6 KiB
Markdown
Raw Permalink Normal View History

2019-05-27 05:44:18 +00:00
# c0de.dev Blog
This is a [Pelican](https://getpelican.com) based blog that powers [c0de.dev](https://c0de.dev).
2019-05-27 21:30:24 +00:00
There's not really a whole lot here, but it contains all the configuration files and plugins/themes.
2019-05-27 05:44:18 +00:00
## Installation
1. SSH into your server
2019-05-27 18:45:40 +00:00
1. Clone the repo - `git clone --recurse-submodules https://github.com/alopexc0de/c0de.dev-blog`
2019-05-27 05:44:18 +00:00
1. `cd c0de.dev-blog`
2019-05-27 21:14:49 +00:00
1. Install the config and plugins - `make install`
2019-05-27 05:44:18 +00:00
2019-05-27 07:01:45 +00:00
## Updating
1. SSH into your server
1. `cd c0de.dev-blog`
2019-05-27 07:32:02 +00:00
1. `make update`
2019-05-27 07:01:45 +00:00
2019-05-27 22:09:45 +00:00
## Making new posts
For seperation, I store the content in a private repo (can't read my drafts and encrypted blogs without the password). Also as a matter of choice, I'm using [Markdown](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet) as markup language.
Categories are defined per folder in the [c0de.dev-content](https://github.com/alopexc0de/c0de.dev-content) repository. To create a new category, simply create a new folder in that repo with at least one post within. For posts without a category, simply throw the new posts in the root of the repo.
When a new post has been created (with the appropiate [metadata](https://docs.getpelican.com/en/3.6.3/content.html#file-metadata)), the steps to generate the output is as follows:
1. SSH into your server
1. `cd c0de.dev-blog`
1. Update all submodules (installs new plugins too) - `make update`
1. `cd pelican`
1. Clear the output cache if themes or globals changed - `make clean`
1. Generate the new static HTML site - `make html`
2019-05-27 05:44:18 +00:00
## TODO
* Service/Unit to run this in a server on prod
* Git hooks to automatically fetch content
* NginX config