2a202a72efdc527efab8c8a6be5d0c47b96bf0c2
[pinopress.git] / README.md
1 # pinopress
2
3 **pinopress** is a modular makefile based static blog generator. that means you run the build script once and every page is generated beforehand.
4 **pinopress** also focuses on extensibility, you can hook your own shell scripts into the build process to easily add any new features.
5
6 built in features include markdown generated blog articles, and a rss feed.
7
8 ## templates
9
10 templates are html snippets that you can customize. these templates are then pieced together to form the final html page. edit them to your liking. they can be found in the `templates/` directory. Here's a brief description of each one:
11
12 template          | description
13 ------------------|-----------
14 head              | html before body
15 foot              | html after body
16 archivebody       | everything inside body of archive page
17 archiveitem       | 
18 rollingbody       | everything inside body of rolling page
19 rollingitem       |
20
21 ## modules
22
23 these have not been implemented yet, but modules are shellscripts that are called during the build process that can add extra features.
24
25 here are some potential ideas for modules:
26 - [ ] syntax highlight for code blocks
27 - [x] blog average time to read
28
29 ## pinopress flavored markdown
30
31 pinopress articles are written in an enhanced version of markdown. specification coming soon.
32
33 ## variables
34
35  **pinopress** makes extensive use of **gnu envsubst** so in each template, you can use variables that will be substituted in on build. variables can be used in both templates and blog articles. Here's a list of some that you can use:
36
37 ### global
38
39 `$SITEURL` - the SITEURL variable you set in the pinopress config
40
41 `$USERGLOBAL1` - global variable you can use however you want
42
43 `$USERGLOBAL2` - a second user defined global variable
44
45 ### article only
46
47 `$ARTICLE_TITLE` - title of article, as set in article header
48
49 `$PUBLISHED_DATE` - the date/time the article was published, as set in the article header
50
51 `$DESCRIPTION` - brief description of the blog post
52
53 `$USERLOCAL1` - article specific variable you can use for whatever you want
54
55 `$USERLOCAL2` - another user local variable
56
57 ## mounts
58
59 mounts are the **pinopress** solution to html includes. to include any file from the template directory, use the following syntax:
60 ```
61 <!-- MOUNT_[NAMEOFFILE] -->
62 ```
63 note that the name of file is without any extensions and in all caps. also, mounts are **not** expanded recursively.
64
65 **pinopress** also has the following builtin mounts that are used internally, prefixed by an underscore:
66 ```
67 <!-- _MOUNT_ARTICLECONTENT -->
68 <!-- _MOUNT_ROLLINGITEM -->
69 <!-- _MOUNT_ARCHIVEITEM -->
70 <!-- _MOUNT_FEEDITEM -->
71 ```
72