|
1 | 1 | Sources for https://profanity-im.github.io |
2 | 2 |
|
3 | | -Most site are edited by hand. |
4 | | - |
5 | | -Top level pages are generated from xml sources using [sblg](https://kristaps.bsd.lv/sblg/). |
6 | | -The source file for the landing page is index.xml which contains html for everything other |
7 | | -than the header and footer. The source files for other top level pages are in the folder |
8 | | -`pagesource`. These are xml files which contain html content for everything other than the |
9 | | -header and footer. Edit them by hand. |
10 | | - |
11 | | -Blog entry sources are in the directory `blogsource/content/post`. These are markdown |
12 | | -files which are processed by [lowdown](https://kristaps.bsd.lv/lowdown). To create a new |
13 | | -blog entry enter the directory `blogsource`. Run `blog-post.sh` to create a blog post |
14 | | -starter file. Edit the starter file created in `blogsource/content/post/` to add the |
15 | | -content for the blog post. If you do not have a contributor profile, please create one in |
16 | | -`blogsource/content/contributors`. See one of the existing contributor profiles for the |
17 | | -formatting. Optionally add an image in jpeg format with name `username.jpg` to be used with |
18 | | -your profile in `blogsource/content/contributors/img`. |
19 | | - |
20 | | -Command references (main_fragment.html, toc_fragment.html), and apidocs are generated via |
21 | | -`profanity docgen`. See the |
22 | | -[release guide](https://github.com/profanity-im/profanity/blob/master/RELEASE_GUIDE.md) for |
23 | | -details. |
24 | | - |
25 | | -GitHubActions will build and deploy the website for updates to blog entries and to changes in |
26 | | -the top level pages. |
27 | | - |
28 | | -To build the site locally, type `make` in the top level directory. You will need to have |
29 | | -[sblg](https://kristaps.bsd.lv/sblg/) and [lowdown](https://kristaps/bsd.lv/lowdown) installed |
30 | | -on your system. |
| 3 | +The website is generated from XML and Markdown sources using [sblg](https://kristaps.bsd.lv/sblg/) and [lowdown](https://kristaps.bsd.lv/lowdown). |
| 4 | + |
| 5 | +## Reference |
| 6 | + |
| 7 | +| To Change... | Edit File(s) | Format | |
| 8 | +| :--- | :--- | :--- | |
| 9 | +| **Home Page (Landing)** | `index.xml` | XML Fragment | |
| 10 | +| **Top-Level Pages** (FAQ, Donate, etc.) | `pagesource/*.xml` | XML Fragment | |
| 11 | +| **Blog Posts** | `blogsource/content/post/*.md` | Markdown | |
| 12 | +| **Blog User Profiles** | `blogsource/content/contributors/*.md` | Markdown | |
| 13 | +| **Site Header/Footer (Home)** | `landing-template.xml` | HTML Template | |
| 14 | +| **Site Header/Footer (Manuals)** | `manual-template.xml` | HTML Template | |
| 15 | +| **Blog Post Layout** | `blogsource/content/post/blog-post-template.xml` | HTML Template | |
| 16 | +| **Theme Gallery Layout** | `gallery-template.xml` | HTML Template | |
| 17 | +| **Style** | `css/*.css` | CSS | |
| 18 | + |
| 19 | +### Page Sources |
| 20 | +The source files for the landing page (`index.xml`) and other top level pages in `pagesource/` are XML fragments. They contain the HTML content for the body, which is then injected into the appropriate header and footer templates. |
| 21 | + |
| 22 | +### Blog |
| 23 | +Blog posts and contributor profiles are written in Markdown. |
| 24 | + |
| 25 | +To create a new blog entry: |
| 26 | +1. Enter the directory `blogsource`. |
| 27 | +2. Run `./blog-post.sh` to create a starter file in `blogsource/content/post/`. |
| 28 | +3. Edit the new `.md` file to add your content. |
| 29 | + |
| 30 | +If you do not have a contributor profile, please create one in `blogsource/content/contributors/` using an existing profile as a template. You can optionally add a JPEG image (named `username.jpg`) to `blogsource/content/contributors/img/`. |
| 31 | + |
| 32 | +### Documentation |
| 33 | +Command references (`main_fragment.html`, `toc_fragment.html`) and apidocs are generated via `profanity docgen`. See the [release guide](https://github.com/profanity-im/profanity/blob/master/RELEASE_GUIDE.md) for details. |
| 34 | + |
| 35 | +### Build & Deploy |
| 36 | +GitHub Actions will automatically build and deploy the website to GitHub Pages on every push. |
| 37 | + |
| 38 | +To build the site locally, run `make` in the top level directory. You will need `sblg` and `lowdown` installed on your system. |
| 39 | + |
| 40 | +To preview the site locally, run `make install` which will create a directory `site`, open `site/index.html` in a web browser. |
| 41 | + |
| 42 | +To remove the generated files and keep the source files, run `make clean`. |
0 commit comments