Commit Graph

3 Commits

Author SHA1 Message Date
polybjorn
4b96b01460 chore(docs): upgrade Jekyll 3 to 4 and Ruby to 3.4.9 (#8772)
Jekyll 3 is unmaintained and its safe_yaml dependency breaks on
Ruby 3.4+ where base64 left the default stdlib. The docs workflow
already runs `bundle exec jekyll build` directly, so GitHub Pages'
Jekyll 3 lock does not apply here.

Changes:

* Pin `jekyll ~> 4.3`. Replace `jekyll-commonmark-ghpages` (pinned
  to Jekyll 3) with upstream `jekyll-commonmark`. Drop unused
  `jekyll-paginate`. Add `gem 'base64'` so the lockfile stays valid
  on Ruby 3.4+ where it became a bundled gem.
* Move CommonMark options into `_config.yml` to match what the
  `-ghpages` variant enabled by default: SMART, FOOTNOTES, UNSAFE
  (so inline HTML like `<br>` in tables still renders), plus the
  strikethrough, autolink, table, and tagfilter extensions. Set
  Rouge as the highlighter.
* Strip the leading slash from `defaults.scope.path` (`/en/*` to
  `en`). Jekyll 4 requires no leading slash, otherwise `page.lang`
  silently fails to propagate and `jekyll-i18n_tags` crashes the
  build.
* Pass `generateId=true` to the existing `anchor_headings.html`
  include so headings get slugified IDs. The `-ghpages` variant
  produced these by default.
* Bump CI Ruby to 3.4.9 and `cache-version` to invalidate the old
  Jekyll 3 gem cache on the first run.

Build is about 9x faster (1.0s vs 9.2s). Compared the rendered
output page by page against the Jekyll 3 baseline; remaining
differences are whitespace, footnote class names (no CSS depends
on either set), and one HTML entity (`&#8617;`) becoming the
literal `↩`. Visually and functionally the same.

Co-authored-by: Bjørn A. Andersen <polybjorn@users.noreply.github.com>
2026-05-03 14:17:55 +02:00
Inverle
5e9c3617ca Improve layout of documentation page and add search feature (#8247)
* Improve layout of documentation page and add search feature

Closes https://github.com/FreshRSS/FreshRSS/issues/7915, https://github.com/FreshRSS/FreshRSS/issues/5325

Also: anchor headings and fix building site locally

* Further improvements

* Set color of hyperlinks
* Consistent styling of close aside button across devices
* Mobile layout 600px -> 1200px
* Add suffix to docs `<title>`
    * Note: titles of pages probably need to be improved, since currently they are just derived from the names of the first heading on every page
* Add favicon

* Improve font

* Try to fix favicon not loading correctly on GH pages

* Use local font

* Attempt to fix GH pages

* Final improvements

* Copy to clipboard button
* Support for nojs search
* Dark mode
* Load search.json (200KB json) only on search input focus
* Keep scroll state of sidebar across navigations

* Clickable images and CSP

CSP so we avoid hotlinking resources and clickable images are useful for zooming on mobile for example

* Fix typos

* Disable Dark Reader extension if dark mode CSS is loaded

* Support internationalisation (via language dropdown)

* Add Gemfile.lock

* Make CI build work with the custom plugin

* Make menus closable with Esc

* Fix typos CI

* Suggestions

* Use `ruby/setup-ruby` action in workflow for installing and caching gems.

* Run build only when there are changes to `docs/`

See: https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows?versionId=free-pro-team%40latest&productId=actions#running-your-workflow-only-when-a-push-to-specific-branches-occurs

* Change font to `Open Sans`

* Increase line height

* Fix Liquid syntax error
2025-12-04 20:06:21 +01:00
Marien Fressinaud
c3e17abcf0 Customize layout by adding link to home page 2017-04-24 23:08:43 +02:00