Adjust text, add modal pop-up for browsers with JavaScript enabled, and show
EULA inline for browsers without JavaScript.
Added configuration options in the _config.json to set the correct URLs
once known.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This is an initial "experiment" on making codeblocks more useful; it's
just a quick implementation, and can use a lot of improvements, but we
can see if it's useful in its current form already (as a starting point).
More context below:
With example blocks being parsed/highlighted by rouge, we should be able
to pick keywords from them; for example, in the highlighted Dockerfile
examples, we can show tool-tips (even a hover-card) with more details
about the command.
Shell examples may be a bit more involved, but we could still detect;
- adjacent keywords (`docker` + `run` => `docker run`)
- with the yaml-docs we have (we could generate JSON and upload them
as a "database"), we could even do an AJAX call to dynamically
fetch flag descriptions, etc.
This very quick and dirty test adds tooltips to Dockerfile commands
in examples. When hovering, it shoulds a tooltip ("click for more
information about this command"), and when clicking, navigates to the
Dockerfile reference.
Ideally, we wouldn't navigate away from the current page for initial
details (instead, we should present a rich hoverbox / pane), to provide
the user with more details without interrupting the article they were
reading.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
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>