Skip to content
Snippets Groups Projects
  1. Jan 30, 2023
    • Matt Wang's avatar
      docs: label new features introduced in `v0.4` (#1138) · 5f91e326
      Matt Wang authored
      In #1058, I noted:
      
      > Tangentially related work:
      > ...
      > - better annotate new features (motivated by writing these docs)
      >     - we should add "New" to new features :) 
      >     - we should note when a feature was introduced (I think this is a core part of most software documentation)
      >     - we should annotate things that are "Advanced" in so far as the average Just the Docs user will not use them / they require significant Jekyll knowledge
      > 
      
      This came up again in https://github.com/just-the-docs/just-the-docs/discussions/1136#discussioncomment-4716253, so I think it's best for us to resolve this sooner rather than later.
      
      This PR is me doing that. I:
      
      - have added a headings-level "New" label to every new heading introduced since `v0.3`
      - added, when possible, inline YAML comments when new configuration options have been introduced
      
      I did this by scanning through the CHANGELOG and selecting each feature that is either tagged with `Add` and has documentation.
      
      I may have also missed any new features, so some double-checking would be helpful!
      Unverified
      5f91e326
  2. Jan 13, 2023
    • Matt Wang's avatar
      docs: fix broken relative page links (#1106) · a789198b
      Matt Wang authored
      In touching up the migration guide, I noticed that many of our documentation site links are broken! For example, on the homepage, this link:
      
      <img width="782" alt="screenshot of homepage; code snippet is in next block" src="https://user-images.githubusercontent.com/14893287/210462690-31aa7bf5-dd79-4e8f-a3c5-1213e73771c4.png">
      
      which has the following href
      
      ```code
      <a href="/just-the-docs/just-the-docs/CHANGELOG/">the CHANGELOG</a>
      ```
      
      duplicates the `baseurl` twice. There are 14 such broken links across the site. Each link duplicates the `baseurl` and `link` tags, which has since been resolved with links being relative by default (there's a set of PRs that document this - I can't find the exact paper trail right now).
      
      To resolve this, I:
      
      - find and replace site-wide `{{ site.baseurl }}{% link` with `{% link`
      - tested each link, which now works properly locally *and* on the deploy preview
      
      I'm surprised we didn't catch this earlier! I also could be missing something else, in which case feedback on this PR is certainly welcome.
      Unverified
      a789198b
  3. Dec 17, 2022
  4. Oct 14, 2022
  5. Oct 10, 2022
    • Matt Wang's avatar
      Experimental nav optimization for simple cases (#992) · b4b951fe
      Matt Wang authored
      
      * Optimize simple navigation cases
      
      Fix inefficiency reported in feedback on v0.4.0.rc2 (see discussion #958).
      
      This PR:
      
      * essentially reverts `_includes/nav.html` to v0.4.0.rc1
      * preserves the ARIA labels added by #950
      * adds a test to optimize builds of sites that rely on `title` fields to order pages.
      
      Building the `endoflife.date` site (130 pages) now takes only about 7 seconds.
      
      Building the `machinetranslate.org` site ( 350 pages) takes about 7 minutes. (Without the added test, it takes just over 5 minutes: the condition of the test is merely to compare the size of two arrays, but that is apparently enough to prevent Jekyll from applying some optimization).
      
      A warning is added to the docs about the need for numbers to be in quotes when used as title values.
      
      * Update navigation-structure.md
      
      A clarification is added to the docs about the need for numbers to be in quotes when used as title values.
      
      * Simplify the control and data flow
      
      - Defer concatenation of `string_order_pages` with `title_order_pages` until needed.
      - Replace tests on size with tests for `empty`.
      - Rename variables accordingly.
      
      * Fix child nav order
      
      This PR started from the navigation in RC1. Some cosmetic improvements had been made in RC2. This commit adds some of those changes to this PR.
      
      It also fixes a bug (revealed by a new regression test) due to a reference to `node.child_nav_order` instead of `child.child_nav_order`, which prevented reversal of the order in children of children. Presumably a top-level reversal should apply only to direct children, and not to grandchildren. The latter interpretation would be very confusing in a deep multi-level hierarchy.
      
      * Allow pages with numeric titles
      
      An omitted `nav_order` value should default to the `title` value, regardless of its type. Jekyll 3 gives build errors when numbers and strings are sorted together. This commit drops the assumption that `title` values are always strings – a 404 page naturally has a numeric title. It updates the docs page accordingly.
      
      The extra code does not affect the build time for the `endoflife.date` site (7 seconds). For the `machinetranslate` site, changing the title of the 404 page to a number increases the build time from 7 minutes to 9 minutes – the `nav_order` numbers on that site are program-generated in the range 1..1000, which might be atypical.
      
      This commit has not yet been checked using the regression tests.
      
      The gemspec used for testing specifies `spec.add_runtime_dependency "jekyll", "~> 3.8.5"`, and `Gemfile.lock` shows `jekyll (3.8.7)`.
      
      * Update nav.html
      
      Add comment about an optimization that will be possible in Jekyll 4.
      
      * Update nav.html
      
      - Update the comment about optimization possibility.
      - TEMPORARILY add Jekyll 3 code for conditionally optimizing.
      
      * Update nav.html
      
      Minor improvements and cosmetic changes.
      
      * Major revision
      
      This update is based on extensive experimentation and profiling with alternative versions of the Liquid code used to build the main navigation panel.
      
      Due to the fragility of Jekyll's optimizations, combining alternative approaches with conditionals turned out to be too expensive: merely adding a condition to check whether some array of pages is empty can add about 20% to the build time!
      
      The current code avoids sorting pages on `nav_order` and `title` fields together. The standard way of doing that in Jekyll is to use the `group_by` filter; but extracting the sorted pages from the groups turned out to be too inefficient (as seen in RC1), as was generating links directly from the groups (in RC2).
      
      Making all pages with `nav_order` values come before all those ordered by their `title` values is not ideal (it doesn't support tweaking the relative order of two pages in a list of pages ordered by their titles) but it appears to be necessary for efficient builds on large sites.
      
      This version has not yet been fully tested for regression, but otherwise seems to give the expected navigation on the endoflife.date and machinetranslate websites. (I'm unable to install the Python-based how2data repository on my laptop, due to package version issues on Apple silicon).
      
      Co-authored-by: default avatarPeter Mosses <18308236+pdmosses@users.noreply.github.com>
      Unverified
      b4b951fe
  6. Aug 01, 2022
  7. Jul 13, 2022
  8. Jul 04, 2022
  9. Mar 03, 2022
  10. Sep 28, 2020
    • PLanCompS's avatar
      List children also when excluded from main navigation · 09ab1c31
      PLanCompS authored
      - Limit the effect of `nav_exclude: true` to the main navigation.
      - Include links to excluded pages in auto-generating lists of child pages
      and in breadcrumbs.
      - Refactor implementation by moving assignment of `first_level_url` and `second_level_url` from `_includes/nav.html` to `_layouts/default.html`.
      - Clarify the effect of `nav_exclude` in the documentation.
      09ab1c31
  11. Sep 11, 2020
    • PLanCompS's avatar
      Update navigation-structure.md · ddccec7b
      PLanCompS authored
      Reinstated the collapsible TOC at the top, to support the reference to it right at the end of the file. (The `TOC` feature can only be used once per page, so this is the only way of illustrating the rendering of the collapsible TOC in the docs.)
      ddccec7b
  12. Aug 13, 2020
  13. Aug 11, 2020
  14. Jun 30, 2020
  15. May 02, 2020
    • PLanCompS's avatar
      Update documentation with collapsible TOC · e40ba9c6
      PLanCompS authored
      Makes the TOC at the top of the page collapsible.
      Adds an explanation of the markup used to produce a collapsible TOC.
      Adds a comment about the possibility of using an unordered list for the TOC,
      and about using TOC only once per page.
      e40ba9c6
  16. May 01, 2020
  17. Apr 28, 2020
  18. Apr 25, 2020
    • PLanCompS's avatar
      Made case-insenstive sorting the default · c46ccd34
      PLanCompS authored
      Added a configuration option to determine whether the sort order is case-sensitive.
      The default is case-insensitive.
      
      To test:
      - open `/just-the-docs/docs/utilities/` in the browser,
        and check that the navigation links in `Utilities` are sorted alphabetically;
      - in `docs/utilities/layout.md', change the preamble to `title: layout`,
        and check that the  links in `Utilities` are still sorted alphabetically;
      - add `nav_sort: case_sensitive` in the configuration file,
        and check that the link to `layout` is now listed last under `Utilities`.
      c46ccd34
  19. Oct 11, 2019
  20. Aug 29, 2019
  21. Aug 22, 2019
  22. Aug 21, 2019
    • Peter Mosses's avatar
      Optional delay of grandchildren link display · 8ac545a5
      Peter Mosses authored
      The current default is that when a grandparent is selected, the links to its
      children *and all its grandchildren* are displayed in the navigation menu.
      Setting `grandchildren_branch: true` in `_config.yml` delays the display of links
      to grandchildren until their parent is selected.
      8ac545a5
  23. Aug 15, 2019
  24. Jan 16, 2019
  25. Jan 14, 2019
  26. Dec 16, 2018
  27. Nov 19, 2018
  28. Nov 16, 2018
  29. Apr 08, 2017
  30. Mar 27, 2017
Loading