1. 07 Mar, 2019 1 commit
  2. 22 Feb, 2018 1 commit
  3. 03 Jan, 2018 2 commits
    • Peter Serwylo's avatar
      Make the tutorials overview page match the spec from carrie. · 5404524a
      Peter Serwylo authored
      Some things I have left out of the spec, such as the blue heading. I've
      left that to just be the same style as all the other headings for now.
      Same with the link sto the tutorials, they are not underlined because
      the rest of the site doesn't use underlined links.
      
      Additionally, I had to add some extra frontmatter to the tutorials so
      that they woudl be able to show appropriately in the overview.
      Specifically, the heading on the overview page is different from the
      heading of the tutorial. The tutorial is written as "How to ...",
      whereas the main title shown in the tutorial list is more actionable,
      selling features of F-Droid.
      5404524a
    • Peter Serwylo's avatar
      I18n titles of documents if they are "." separated strings. · 1c2c79de
      Peter Serwylo authored
      For example, if the frontmatter of a document is:
      
      ```
      ---
      title: "This is a title"
      ---
      ```
      
      Then it will render as "This is a title" as expected. However, if it is:
      
      ```
      ---
      title: strings.page_one.heading
      ---
      ```
      
      Then it will look for the file in `_data/strings.json` for the following
      entry:
      
      ```
      {
        "page_one": {
          "heading": "This is a heading",
          ...
        },
        ...
      }
      ```
      
      and the resulting heading will be "This is a heading". If the resulting
      JSON entry cannot be found, it is presumed that it is not actually
      trying to i18n the title and will instead use whatever it found in the
      frontmatter (e.g. "not.json" will result in a title of "not.json").
      
      The rationale for this is that the polyglot plugin doesn't support i189n
      titles, because they rightly point out that you can [do this kind of
      string lookup quite trivially in a liquid
      template](https://github.com/untra/polyglot/issues/34#issuecomment-252774718).
      However, that doesn't take into account the fact that page titles appear
      elsewhere, such as in pagination pages. This would require the same
      logic to appear everywhere a document title could be rendered.
      
      Additionally, we already have a process for translating
      post/documentation page titles, where the title is translated in weblate
      right next to the document content. It would be annoying to say the
      least if people translated documents in the "Docs" weblate project (a
      .po based project), but then had to go to a different (JSON based)
      project in order to translate the titles.
      1c2c79de
  4. 02 Jan, 2018 2 commits
    • Peter Serwylo's avatar
      Extract tutorial content into separate .json file. · 09812fa4
      Peter Serwylo authored
      This is to make the choice about translating certain parts of the
      website 100% easier for translators. That is, the website chrome can
      still be trivially translated 100% without having to also translate
      every single tutorial, which could get large over time if people
      contribute more tutorials.
      09812fa4
    • Peter Serwylo's avatar
      Added tutorials for swap/repomaker/adding repos. · 2cc7a684
      Peter Serwylo authored
      Follows the designs provided by @crwinfrey in #112.
      
      They are implemented as a collection called "tutorials". Any time a
      new tutorial is added to the _tutorials directory then it will
      automatically get put into the list of available tutorials and also will
      be added to the paginator at the bottom of each tutorial.
      
      Fixes #112.
      
      Fixes repomaker#182.
      2cc7a684