58 lines
2.3 KiB
Plaintext
58 lines
2.3 KiB
Plaintext
Blog overview
|
|
=============
|
|
|
|
The blog consists of a set of static files sorted into folders by date. Each
|
|
file contains the content for a single blog post.
|
|
|
|
Post format
|
|
-----------
|
|
|
|
Blog posts are written in reStructuredText format. The post contents is passed
|
|
through Jinja2 before being handed to the docutils formatter, so standard
|
|
template tags and variables can be used. This allows site-internal URLs to be
|
|
correctly generated, and text to be tagged for translation.
|
|
|
|
At the top of each post, a metadata section should be included. This is parsed
|
|
to obtain informatiion about the post for use in summaries (such as the blog
|
|
index page). The following metadata is used:
|
|
|
|
- **date**: Optional, can be used to override the URL date. If set to the same
|
|
date as the URL date, it saves a Python split and join operation.
|
|
- **category**: Optional, enables posts to be categorized (each category has
|
|
its own RSS feed that can be followed, in addition to the overall feed).
|
|
- **author**: Optional, if left out the default is 'I2P devs'
|
|
- **excerpt**: Summary of the post (generally the same as the first line for
|
|
translation purposes). Required, it is displayed on the blog index.
|
|
|
|
How to use the blog
|
|
-------------------
|
|
|
|
1. Create a directory path matching the date of the blog post, e.g.
|
|
'mkdir -p 2014/01/01'
|
|
2. Create a file in that directory with suffix '.rst'. The name of the file and
|
|
the directory path will together be the URL that the post will be visible at
|
|
e.g. '2014/01/01/Happy-New-Year.rst' -> '/lang/blog/post/2014/01/01/Happy-New-Year'
|
|
3. Write the blog post in reStructuredText format, taking note of the custom
|
|
format notes above.
|
|
|
|
Writing draft posts
|
|
-------------------
|
|
|
|
To write a draft post, create the file with the suffix '.draft.rst'. Post files
|
|
with this suffix will be visible at their post URL, but will not be shown in
|
|
the blog index. To publish the draft post, change the filename to remove the
|
|
'.draft' in the suffix (e.g. mtn mv foo.draft.rst foo.rst).
|
|
|
|
Creating shortlinks
|
|
-------------------
|
|
|
|
See the comments in shortlinks.py.
|
|
|
|
How to make a release notice
|
|
----------------------------
|
|
|
|
1. Create a directory path matching the date of the release.
|
|
2. Find the blog post file for the previous release, and copy it into the new
|
|
directory (renaming as appropriate).
|
|
3. Edit as necessary.
|