The `hide_from_sitemap` metadata variable was a custom thing we implemented
to add a "noindex" meta-header to pages and to exclude a page from the
search auto-complete.
However, pages with that option set would still be included in sitemap.xml,
resulting in search engines to visit those pages (only to discover they
should not index them).
This patch replaces the custom `hide_from_sitemap` value for `sitemap: false`,
which is a metadata variable that's defined by the "jekyll-sitemap" plugin
we use to generate the sitemap.xml;
https://github.com/jekyll/jekyll-sitemap/blob/v1.4.0/README.md#exclusions
Setting this variable will now:
- add a "noindex" metadata header to the page
- exclude the page from the sitemap.xml.
- exclude the page from /js/metadata.json (used for search autocomplete)
Also fixed an issue in the metadata.json where the `notoc` metadata was
used to exclude pages, however that variable is meant to disable the
in-page TOC (right-hand side navigation with anchor links).
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
rewrite the script to not depend on jQuery, so that it can be run as
soon as possible.
Also switch to use localstorage instead of cookies, which is a more
suitable mechanism for this, and use the same HTML include as was
used on the landing-page for the whole site.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
From the script's repository: https://github.com/wilddeer/stickyfill
> Stickyfill did a good job while the browsers were implementing position: sticky
> support. You can now safely use stickies without a polyfill, all modern browsers
> support them natively:
>
> https://caniuse.com/?search=position%3Asticky
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Code is already highlighted through "rouge", so enabling highlight.js
only resulted in code being parsed/highlighted _twice_.
Highlight.js was only included on pages that explicitly enabled it,
which was not used anywhere, so removing it should not have an effect.
This patch removes highlight.js. There are some stylesheets that
can be removed and/or merged after this, but leaving that separate.
The github.css stylesheet is already included in the style.css
stylesheet (from the _scss directory), so was redundant.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
There's no need to traverse the whole TOC if the URL matches
the current URL.
Also some small cleaning up / refactoring.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Looks like removing the front-matter in f17ebae568
caused the output to break, resulting in a JavaScript error.
Looking at where this file was used, it turned out that it was loaded, but
never used anywhere.
This commit removes the remaining parts of the glossary search functionality,
which was not used.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This helps keeping the currently selected menu item into
view on pages that have many menu-items (such as the docker
engine CLI reference)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This was added in 1a6874fcb4, but later
got disabled, and now no longer is in use.
We can restore these scripts or re-implement if we ever decide
to bring back similar functionality.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
These scripts and files were added a long time ago, and are now
either replaced with something else, or managed through GTM.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Now that we no longer have a baseURL, we can simplify the generated
links to just contain the anchor. This also provents issues if the
visited page already has an anchor set.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>