diff options
Diffstat (limited to 'doc/WRITING-NEWS')
-rw-r--r-- | doc/WRITING-NEWS | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/doc/WRITING-NEWS b/doc/WRITING-NEWS new file mode 100644 index 00000000..65d3ead8 --- /dev/null +++ b/doc/WRITING-NEWS @@ -0,0 +1,68 @@ +WRITING NEWS +------------ + +make_website.py calls gen_site() with "news" and other arguments +when news are to be created. +A news item needs to be added in the file www.yml to 'newsposts' like +so: + +- page: filename.html + date: YYYY-MM-DD + title: the title of the news + abstract: + content: + +abstract and content are filled by make_website.py in a way which works +but needs further improvements, as you can't use jinja2 templating for +urls (yet). +The news are ordered via the yaml file right now, which means that new +posts should get inserted at the top. + +The news is written in the file 'filename.html.j2' in the folder 'news'. +This .html.j2 file must extend "common/news.j2". Since we already have +a <div> which wraps the content of the filename.html.j2, we do not need +further surrounding elements in the news itself. + +News previews are generated from the plaintext of the first <p> element +with common html elements (not jinja2!) stripped out. Some but not all +jinja2 elements are stripped as well. +Small newspreviews (as used by taler.net) do not process the first +<p> element but process the date, title, and pagename. + +The rss is generated in a similar fashion like the website, by processing +a .xml.j2 file and generating a .xml page from it. Too much structure +relies on the yaml file (www.yml). + + +A news template could look like this: + + +news/2022-09-01.html.j2: + +{% extends "common/news.j2" %} +{% block body_content %} +<h1>2022-09-01: GNU Taler v0.7.0 released</h1> +<p> + We are happy to announce the release of GNU Taler v0.5.0. + The main new feature is customer tipping, which allows + merchants to pay small rewards directly into a customer's + wallet. Technical improvements include numerous performance + improvements and bug fixes, as well as a new, simpler to use + API for merchants that also enables the implementation of + GNU Taler wallets on platforms that do not support + WebExtensions. +</p> +<p> + The Chrome and Chromium wallets are available for download + via the App store. The exchange, merchant backend and bank + components are on the GNU FTP mirrors. +</p> +{% endblock body_content %} + + +www.yml: +- page: 2022-09-01.html + date: 2022-09-01 + title: GNU Taler v0.7.0 released + abstract: + content: |