As we don't generate a metadata.json, auto-complete is non-functional,
so disabling the script for previews.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This reduces the time to build, as Jekyll doesn't have to
render the body, then copy it into the layout:
Production before: 62 seconds
Production after: 46 seconds
Development before: 35 seconds
Development after: 33 seconds
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
I don't think the read-time is adding much value on short pages. The
reader is likely able to make a better estimation how long it would
take to read.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This patch updates the default configuration to match a "development"
situation, and introduces build-options to produce a "production"
build.
By default (dev environment):
- Google Analytics / GTM and PollDaddy are disabled
- SASS builds non-minified stylesheets (for easier readabililty)
- Excludes "enterprise" stubs
Building a "production" build locally is still possible by overriding
the `JEKYLL_ENV` build-arg;
JEKYLL_ENV=production docker-compose up --build
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
These were not used in the generated redirect pages,
so we can remove them.
Also setting the "sitemap" metadata through the _config.yml
so that we don't have to set it in each of the stubs.
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>
This topic was removed in 9bebb666d9
We may want to add back the part describing sharing sshagent somewhere,
which is not really a feature related to osxfs. Also, some generic
description about file sharing (permissions, syncing) should probably
be added back.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This moves our scripts in the head section, but use "defer" loading to allow the
browser to start loading them as soon as possible. Actual execution of deferred
scripts happens once the HTML is fully parsed.
see https://flaviocopes.com/javascript-async-defer/#with-defer-in-the-head
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Looks like lighthouse doesn't like prefetch for fonts, so switching
to preload. Also adds a missing variant of Geomanist to the list.
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>
- use a config-variable for the ID
- exclude the script if no ID is set
- set default font and font-color
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>
Canonical links are expected to be full URLs, not relative.
For this to work, the Dockerfile had to be updated, because we're stripping
the domain-name from links ("<a href..."), but the script currently also included
"<link rel='canonical' .." tags.
With the change, canonical links are left alone;
These hrefs will be replaced
echo '<a class=foo href="https://docs.docker.com/foo">hello</a>' | sed -e 's#\(<a[^>]* href="\)https://docs.docker.com/#\1/#g'
# <a class=foo href="/foo">hello</a>
echo '<a href="https://docs.docker.com/foo">hello</a>' | sed -e 's#\(<a[^>]* href="\)https://docs.docker.com/#\1/#g'
# <a href="/foo">hello</a>
But, for example, this one is left alone
echo '<link rel="canonical" href="https://docs.docker.com/foo/bar" />' | sed -e 's#\(<a[^>]* href="?\)https://docs.docker.com/#\1/#g'
# <link rel="canonical" href="https://docs.docker.com/foo/bar" />
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
See https://web.dev/external-anchors-use-rel-noopener/
Using noopener, as that addresses the security issue. "noreferer" blocks
the REFERER header, which may still be useful for some target URLs.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Commits 7e5352f1ae and e72030d2c6
added automatic generation of page titles and descriptions from the page's content
if no front-matter metadata was present.
Some pages may include characters that should be escaped before using as a HTML
attribute or JSON field.
This patch adds escaping to those texts to prevent the HTML or JSON from being
invalid.
Before this:
HTML meta:
<meta name="description" content="docker build: The `docker build` command builds Docker images from a Dockerfile and a " context".="" a="" build's="" context="" is="" the="" set="" of="" files="" located="" in="" specified="" `path`="" or="" `url`...."="" />
JSON meta:
<script type="application/ld+json">{"@context":"http://schema.org","@type":"WebPage","headline":"docker build","description":"docker build: The `docker build` command builds Docker images from a Dockerfile and a "context". A build's context is the set of files located in the specified `PATH` or `URL`....","url":"https://docs.docker.com/engine/reference/commandline/build/"}</script>
After this:
HTML meta:
<meta name="description" content="docker build: The `docker build` command builds Docker images from a Dockerfile and a "context". A build's context is the set of files located in the specified `PATH` or `URL`...." />
JSON meta:
<script type="application/ld+json">{"@context":"http://schema.org","@type":"WebPage","headline":"docker build","description":"docker build: The `docker build` command builds Docker images from a Dockerfile and a \"context\". A build's context is the set of files located in the specified `PATH` or `URL`....","url":"https://docs.docker.com/engine/reference/commandline/build/"}</script>
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>
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>
These styles seem to be used when using AngularJS;
https://docs.angularjs.org/api/ng/directive/ngCloak
> The ngCloak directive is used to prevent the AngularJS html template from
> being briefly displayed by the browser in its raw (uncompiled) form while
> your application is loading. Use this directive to avoid the undesirable
> flicker effect caused by the html template display.
And I don't think that's used anywhere currently, so let's remove
Also removing some other ng-xx classes
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This generates a description for pages that don't have one;
- for referene docs, try the "long" description
- fallback to "short" description
- finally, fallback to taking the first 30 words from the
page content
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This is a very hacky way to extract the page title from pages that do not have
front-matter yaml, but have a H1 header. We need to take (id-) attributes into
account, so some hacking is needed.
Note that there's also a Jekyll plugin that features similar functionality, but
it requires additional dependencies, and we only have a few pages that need
this, so for now using this hack.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
The existing implementation was broken, and didn't override
the URLs (due to leading, trailing slashes the paths were not
matched).
Instead of using the custom "not_edited_here.yaml", set the
edit-url as front-matter variable through the _config.yml
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Generated yaml files were temporarily updated manually (pending
pull request to be merged in the upstream docker/cli repository)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
- Updated the Guides tab to open to the Get started page, instead of Develop with Docker.
- Moved Docker overview as the first entry in the Guides toc.
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>
This patch:
- removes the icon images from the landing page, instead setting
them as a background-image through css.
- replaced the "community-resources" and "play-with-docker" styles
in favor of a conditional style (based on cards linking to external
websites)
- changes the minimal height of cards for mobile devices (there was
a big amount of padding on the smallest size, which didn't add
much value).
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This replaces the JavaScript link fix script with a custom plugin,
based on the jekyll-relative-link plugin, and modified so that it
can be used as Liquid "filter".
While it borrows from the jekyll-relative-links plugin, it takes some shortcuts;
- We use the code from jekyll-relative-links plugin to find/extract
links on the page
- Relative links are converted to absolute links, using the path of
the markdown source file that's passed as argument
- After conversion to an absolute link, we strip the ".md" extension;
no attempt is made to resolve the file that's linked to. This is
different from the jekyll-relative-links plugin, which _does_ resolve
the linked file. This functionality could be added in future by
someone who has more experience with Ruby.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
The JavaScript "link fix" looks to be only needed for pages
where Markdown is included, and which contain relative links.
Now that we modified all local includes to use absolute links,
the only location where links are not properly generated, is
in the reference documentation.
If broken links are found elsewhere in the website, those links
are legitimately broken, and should be fixed in the markdown
source, not fixed-up afterwards.
This patch moves the javascript to the cli.md include, so that
the script is only run on the reference pages instead of on every
page.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
When generating HTML pages, Jekyll will generate a directory named after the name
of the Markdown file, and generate an index.html file inside that directory. For
example, for a markdown file named /foo/bar/mypage.md, Jekyll generates a HTML
file named /foo/bar/mypage/index.html.
This means that all links relative to mypage.md, and expect those links to be
relative to the /foo/bar/ directory, will actually end up being relative to
/foo/bar/mypage/.
Unfortunately, Jekyll / Liquid does not have a variable that holds the parent
directory of the _markdown_ file, so we have to generate it by taking `page.path`
(which holds the absolute path of the markdownfile), and remove the filename from
that path.
After generating that path, we prepend that path to URLs linking to related
commands (parent commands and child commands), as all reference files are in the
same path.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Removing this "check" because it made the template difficult to
read, and duilding the docs won't fail if these values are missing.
If a page is empty, it's probably fast to find why anyway.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
- remove some redundant whitespace
- use "remove_first" instead of "replace", because the strings to
replace should only occur once.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
We cannot use relative links in includes, because:
- The jekyll-relative-links, is not called on includes, so
markdown-links are rendered as-is.
- These files are included in various locations on the website;
because of that, it's not possible to compose a relative link
to other Markdown files, so we're falling back to using absolute
URLs, relative to the root of the website.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
The base command didn't have a description in the YAML file.
Instead of fixing that up in the template, this was fixed upstream.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
- Updated the footer to remove redundant links and ensured the entries and layout match the footer displayed on the WWW site.
- Removed Sign in and Create Docker ID option from the header
- Removed Get Support from the right-nav
- Move getting started overview to /get-started/overview/
- Move engine installation files under /engine/
- Redirect the top-level /install/ to /get-docker/
- Updated titles in left-hand navigation
- Added back some pages to the navigation that were
currently not included.
- Reduce some steps in the installation pages
- Move devicemapper prerequisites to the devicemapper
storage driver page.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* Fix incorrect links in compose section
there's a bug causing wrapped links to not work, and replacing
some links to point to the .md file, so that IDE's can check
if the anchors are valid. Also replaced some links to point
to their new location.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* engine/swarm: update links
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* Fix various broken links
There's a bug in the "jekyll-relative-links" plugin that causes wrapped links to not work.
Also replacing some links to point to the .md file, so that IDE's can check if the anchors
are valid. Finally, replaced some links to point to their new locations, so that users don't
get redirected..
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* Stash computed data in a variable
To avoid computing `site.data[include.datafolder][include.datafile]` multiple times for the same context.
* Revert change to hard-tab whitespace
Some commands provide a long list of options, which may
"hide" the examples section. To help discoverability, add
an anchor-link to the examples section (if present).
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
The extended description usually provides a good introduction to
the command, which likely is useful to read before heading to
more detailed information (such as "which options does this command
have")
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
For some commands, the list of "related" commands is lenghty, therefore
hiding the extended description and examples below the fold, which is
not ideal.
This patch moves the "parent command", "child commands", and "related
commands" sections to the bottom of the page.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* Update CLI template for "enterprise-only" commands/plugins
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* reference: mark "assemble" subcommands as enterprise-only
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* reference: mark "cluster" subcommands as enterprise-only
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* reference: mark "registry" subcommands as enterprise-only
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* reference: mark "template" subcommands as enterprise-only
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Add "Run the Docker daemon as a non-root user (Rootless mode)":
`engine/security/rootless.md`
The content is based on https://github.com/moby/moby/blob/master/docs/rootless.md
`rootless.md` in `moby/moby` will be replaced of the link to
the `docs.docker.com` page compiled from `rootless.md` in this repo.
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
false: sudo yum-config-manager --enable docker-ee-stable-18.09.09
correct: sudo yum-config-manager --enable docker-ee-stable-18.09
I bumped into this while setting up a test env on Centos. Did a quick test on RHEL, and I could see the same issue.