From b7de83c89128ff5980371ab90932d104ed033567 Mon Sep 17 00:00:00 2001 From: zzz <zzz@i2pmail.org> Date: Wed, 28 Sep 2022 10:48:17 -0400 Subject: [PATCH] Blog README update --- i2p2www/blog/README | 84 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 83 insertions(+), 1 deletion(-) diff --git a/i2p2www/blog/README b/i2p2www/blog/README index 65b550c0b..967a5133e 100644 --- a/i2p2www/blog/README +++ b/i2p2www/blog/README @@ -24,6 +24,19 @@ index page). The following metadata is used: - **excerpt**: Summary of the post (generally the same as the first line for translation purposes). Required, it is displayed on the blog index. +Please use the following standard categories: + +- android +- beta +- community +- conferences +- development +- general +- news +- release +- security + + How to use the blog ------------------- @@ -31,10 +44,72 @@ How to use the blog 'mkdir -p 2014/01/01'. Day and month directories MUST be two digits! 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' + e.g. '2014/01/01/Happy-New-Year.rst' -> '/lang/blog/post/2014/01/01/Happy-New-Year'. + Use - for spaces in the file name. 3. Write the blog post in reStructuredText format, taking note of the custom format notes above. +Translations +------------- + +Write your post so it may be easily translated. +Inside {% trans -%}...{%- endtrans %} blocks, put line breaks after long sentences +or phrases. Do not put line breaks at random places. + + +Links +------------- + +The goal is to keep as much formatting out of the tagged string as possible, +so that the translators are less likely to inadvertently break the formatting, +and we can change the link later without breaking translations. +This also allows us to use macros for converting to .i2p links. + +External links: + +For full untranslated link text: + +`QUIC <https://www.rfc-editor.org/rfc/rfc9000.html>`_ + +For full translated link text: + +`{% trans %}I2P Mac OS Easy Install bundles{% endtrans %}`__ + +__ https://geti2p.net/en/download/mac + +or: + +`{% trans %}I2P Mac OS Easy Install bundles{% endtrans %} <https://geti2p.net/en/download/mac>`_ + + +For partial translated link text: + +{% trans link1="https://...", link2="..." -%} +Blah blah `link text <{{ link1 }}>`_ more text. +<%- endtrans %> + +Internal links: + +As above but use, e.g. + `NTCP2 <{{spec_url("ntcp2")}}>`_ + `SSU2 <{{proposal_url("159")}}>`_ + This does not work: {% trans link1="{{spec_url('i2np')}}" -%} + + +Multiple links to the same thing: + +{% trans -%} +Blah blah RFC-9001_ +and RFC-9001_ again. +<%- endtrans %> + +.. _RFC-9001: https://www.rfc-editor.org/rfc/rfc9001.html + + +RST guide: https://docutils.sourceforge.io/docs/user/rst/quickref.html#hyperlink-targets + + + Writing draft posts ------------------- @@ -43,6 +118,13 @@ 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. git mv foo.draft.rst foo.rst). +Review your formatting before checking in with the linux tool rst2html. +This will not process translation blocks, of course. + +After checking in the draft, navigate to it in your browser and verify +the formatting is correct, including translation blocks. + + Creating shortlinks ------------------- -- GitLab