Files
FreshRSS/docs/_layouts/default.html
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

85 lines
3.5 KiB
HTML

<!DOCTYPE html>
<html lang="{{ page.lang | default: 'en' }}">
<head>
<meta charset="UTF-8">
<title>{{ page.title | default: site.title }} · FreshRSS</title>
<meta name="description" content="{{ page.description | default: site.description | default: site.github.project_tagline }}">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Security-Policy" content="default-src 'none'; img-src 'self' data:; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; font-src 'self'; connect-src 'self'">
<link rel="stylesheet" href="{{ '/assets/css/docs.css?v=' | append: site.github.build_revision | relative_url }}">
<link rel="stylesheet" href="{{ '/assets/css/highlight.css?v=' | append: site.github.build_revision | relative_url }}">
<link rel="stylesheet" href="{{ '/assets/css/normalize.css?v=' | append: site.github.build_revision | relative_url }}">
<link rel="stylesheet" media="(prefers-color-scheme: dark)" href="{{ '/assets/css/darkmode.css?v=' | append: site.github.build_revision | relative_url}}">
<link rel="icon" href="{{ '/favicon.ico' | relative_url }}">
<script>
var i18n = {
"copy_to_clipboard": "{%t copy_to_clipboard %}"
};
</script>
<script src="{{ '/assets/js/docs.js?v=' | append: site.github.build_revision | relative_url }}"></script>
</head>
<body>
<nav class="mobile-nav">
<a class="toggle-aside" href="#aside" title="{%t toggle_aside %}">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M2.5 12a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5m0-4a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5m0-4a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5"/>
</svg>
</a>
{% include lang_dropdown.html location="mobile" %}
</nav>
<a class="close" href="#close"></a>
<aside id="aside">
<a href="https://freshrss.org/">&lt; {%t back_to_freshrss %}</a>
{% include lang_dropdown.html location="aside" %}
<a class="close" href="#close" title="{%t close %}">&times;</a>
<section class="search">
<noscript>
<style>div.js-search { display: none; }</style>
<div class="nojs-search">
<form action="https://duckduckgo.com/" method="get">
<input type="search" name="q" placeholder="{%t search_docs %}">
<input type="hidden" name="sites" value="freshrss.github.io">
<button type="submit">{%t search %}</button>
</form>
</div>
</noscript>
<div class="js-search">
<input type="text" id="search-input" placeholder="{%t search_docs %}">
<ul id="results-container"></ul>
<script src="{{ '/assets/js/simple-jekyll-search.min.js?v=' | append: site.github.build_revision | relative_url }}"></script>
<script>
const search = document.querySelector('#search-input');
function init_search() {
search.removeEventListener('focus', init_search);
SimpleJekyllSearch({
searchInput: search,
resultsContainer: document.querySelector('#results-container'),
json: '{{ "/search." | append: page.lang | append: ".json?v=" | append: site.github.build_revision | relative_url }}',
searchResultTemplate: '<li><a href="{url}">{title}</a></li>'
});
}
search.addEventListener('focus', init_search);
</script>
</div>
</section>
<nav class="docs">
{% include docs_nav.html %}
</nav>
</aside>
<main>
{% include anchor_headings.html html=content anchorBody="#" generateId=true %}
</main>
</body>
</html>