Skip to content
Snippets Groups Projects
  1. Dec 18, 2022
    • Michelle Blanchette's avatar
      analytics: support multiple tracking IDs, document UA -> GA4 switch (#1029) · 9bccf07f
      Michelle Blanchette authored
      * Issue #1023 - note that GA4 properties are supported
      
      * Issue #1023 - parameterize Google Analytics property script
      
      * Issue #1023 - support a list of multiple Google Analytics tracking IDs in config
      
      * Issue #1023 - update Google Analytics configuration doc
      
      * Fix configuration of multiple Google Analytics properties and simplify type checking
      
      * simplify unnecessary code repetition
      
      * tweak Google Analytics config documentation wording
      Unverified
      9bccf07f
  2. Dec 17, 2022
  3. Dec 13, 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. Sep 29, 2022
    • Peter Mosses's avatar
      Fix default highlighting in custom color schemes (#986) · 33a7b2ac
      Peter Mosses authored
      
      * Fix default highlighting in custom schemes
      
      Fix #982
      
      The variable settings for highlighting in the default `light` scheme are currently (v0.4.0.rc2`) in `_sass/color_schemes/light.scss`.
      This PR ensures that custom schemes are based on the `light` scheme.
      
      It also adds a note explaining the default to the customization docs,
      and gives an example of how to define a custom scheme based on the `dark` scheme
      
      * Prettier
      
      * Deleted test file
      
      Co-authored-by: default avatarMatt Wang <matt@matthewwang.me>
      Unverified
      33a7b2ac
  7. Sep 27, 2022
    • Peter Mosses's avatar
      Improve docs for code highlighting with line numbers (#974) · 93857587
      Peter Mosses authored
      * Add toc heading custom include
      
      Closes #961.
      
      * Revert "Add toc heading custom include"
      
      This reverts commit 49813c341973e313db0a21f075a60ebf2120989e.
      
      * Update code highlighting with line numbers
      
      - Add the example of code highlighting with line numbers explained in the [Jekyll docs](https://jekyllrb.com/docs/liquid/tags/#line-numbers).
      - Fix the styling of narrow code with line numbers, which floats to the centre without this CSS adjustment. (The line numbers column expands as needed with larger numbers of lines, despite using `width`; using `min-width` doesn't work.)
      
      To apply HTML compression, I removed `vendor` from `exclude`; that change is left to a different PR.
      Unverified
      93857587
  8. Sep 26, 2022
  9. Sep 11, 2022
  10. Sep 07, 2022
  11. Sep 06, 2022
  12. Aug 26, 2022
  13. Aug 22, 2022
  14. Aug 12, 2022
    • Matt Wang's avatar
      `mermaid`: refactor config to use `mermaid_config.js` include, only require... · e2f1546c
      Matt Wang authored
      `mermaid`: refactor config to use `mermaid_config.js` include, only require `mermaid.version` in `_config.yml` (#909)
      
      This PR has a bit of scope creep! This PR now:
      
      - changes the mermaid opt-in logic to only check for the existence of a `mermaid` key instead of `mermaid != false`: this resolves the follow-up in #857
      - changes the behaviour of mermaid configuration
          - instead of using `mermaid_init.html` with default settings, makes the include `mermaid_config.js`
          - the include is loaded directly into the contents of `mermaid_initialize`
          - by default, it is an empty object (i.e. `{}`), triggering the defaults
      - updates docs
      - adds an example to the markdown kitchen sink  
      
      It does significantly change the interface provided in #857, and I apologize for the confusion. However, given the discussion in this PR, I think it's the best move forward!
      Unverified
      e2f1546c
  15. Aug 01, 2022
  16. Jul 26, 2022
  17. Jul 13, 2022
  18. Jul 12, 2022
  19. Jul 06, 2022
  20. Jul 04, 2022
  21. Mar 09, 2022
  22. Mar 06, 2022
  23. Mar 03, 2022
  24. Oct 13, 2020
  25. Oct 12, 2020
  26. Sep 29, 2020
    • PLanCompS's avatar
      Fix list alignment · 59f757a7
      PLanCompS authored
      Resolve #420
      
      - Remove `margin-top` for the first child in various list items, to improve alignment.
      - Add examples of lists to `docs/tests/styling`.
      59f757a7
  27. Sep 28, 2020
Loading