Commit Graph

102 Commits

Author SHA1 Message Date
Sebastiaan van Stijn 3c3b037d9a
js/docs.js: small cleanup in walkTree() function
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-26 18:58:12 +01:00
Sebastiaan van Stijn 03d60f916a
Replace "hide_from_sitemap" with "sitemap: false"
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>
2020-10-21 15:09:11 +02:00
Sebastiaan van Stijn 0bb9a7ff8f
js/search.js: rewrite local search autocomplete and update styling
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-15 17:20:28 +02:00
Sebastiaan van Stijn f48119bbe1
cleanup anchorlinks script
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-15 15:10:41 +02:00
Sebastiaan van Stijn d01d3e8ccd
js/docs.js: cleanup unused parts
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-15 15:06:27 +02:00
Sebastiaan van Stijn 5c8580c3f0
search: load metadata asynchronous as JSON
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-14 22:08:54 +02:00
Sebastiaan van Stijn e46cfab03c
Load toc.js asynchronously as JSON
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-14 22:08:50 +02:00
Sebastiaan van Stijn 6b6ef9fe0d
js: move theme switcher to its own script, and use localstorage
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>
2020-10-14 17:37:21 +02:00
Sebastiaan van Stijn 383455e1ee
js: remove modernizr script as it was unused
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-14 15:03:33 +02:00
Sebastiaan van Stijn 017b8823a2
js: remove unused js/menu.js
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-14 15:00:19 +02:00
Sebastiaan van Stijn 68911c8d45
js/docs.js: remove temporary hack for side menu
Looks like everything works without this

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-14 15:00:13 +02:00
Sebastiaan van Stijn 373343070e
js/metadata.js: fix missing titles and descriptions
Similar changes to how we generate missing titles and descriptions
for upstream resources.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-13 12:51:19 +02:00
Sebastiaan van Stijn eaf40137dc
Remove "position: sticky" stickyfill polyfill
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>
2020-10-12 13:27:15 +02:00
Sebastiaan van Stijn 7130372001
Remove highlight.js script as it was not enabled
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>
2020-10-09 01:10:48 +02:00
Sebastiaan van Stijn 1ba81da1bd
js/docs: don't traverse full TOC if we have a direct match
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>
2020-10-08 16:39:01 +02:00
Sebastiaan van Stijn fc89461836
Generate top-navigation instead of using javascript
This makes sure the top-navigation works, even if javascript
is disabled.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-08 16:38:55 +02:00
Sebastiaan van Stijn f4e9565b22
js/docs: remove special casing of glossary
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-08 16:36:34 +02:00
Usha Mandya 674c5eb115
Merge pull request #11508 from thaJeztah/left_nav_focus
js/docs: scroll TOC to active menu item
2020-10-08 15:14:56 +01:00
Sebastiaan van Stijn db85f983a3
Remove glossary left-overs
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>
2020-10-08 15:50:05 +02:00
Sebastiaan van Stijn c515c773b8
js/docs: scroll TOC to active menu item
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>
2020-10-08 15:35:39 +02:00
Sebastiaan van Stijn 3f13c2d20b
glossary: remove glossary search scripts
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>
2020-10-08 09:58:24 +02:00
Sebastiaan van Stijn f17ebae568
js/glossary.js: cleanup whitespace and unneeded front-matter
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-07 16:13:36 +02:00
Sebastiaan van Stijn ba85012f47
Remove scripts and assets related to archives
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-06-24 13:25:58 +02:00
Sebastiaan van Stijn 3bada40222
Merge pull request #10911 from jdrouet/archive-with-css
handle archive feature toggling with css
2020-06-09 15:38:39 +02:00
Jérémie Drouet c06813538c implement autocomplete on landing page
Signed-off-by: Jérémie Drouet <jeremie.drouet@gmail.com>
2020-05-28 10:31:16 +02:00
Jérémie Drouet 20ff61b942 handle archive feature toggling with css
Signed-off-by: Jérémie Drouet <jeremie.drouet@gmail.com>
2020-05-28 10:13:31 +02:00
Usha Mandya 4f86032173
Merge pull request #10847 from jdrouet/menu-mobile
move navbar content to burger menu on mobile
2020-05-27 08:45:26 +01:00
Sebastiaan van Stijn 48f6315d2d
Remove old (tracking) scripts, css, and includes (#10892)
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>
2020-05-26 17:48:11 +01:00
Jérémie Drouet dbe4953982 move navbar to burger menu on mobile
Signed-off-by: Jérémie Drouet <jeremie.drouet@gmail.com>
2020-05-26 11:12:22 +02:00
Jérémie Drouet feb57a7eea landing page: change style
Signed-off-by: Jérémie Drouet <jeremie.drouet@gmail.com>
2020-05-05 16:53:50 +02:00
Sebastiaan van Stijn 342660f7cd
js/anchorlinks.js: remove URL from generated links
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>
2020-04-23 10:27:59 +02:00
Sebastiaan van Stijn 501b13e68c
docs.js: be slightly more consistent with double/single quotes
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-14 09:10:35 +01:00
Sebastiaan van Stijn 0871044294
docs.js: remove dead code and debug comments
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-14 09:10:32 +01:00
Sebastiaan van Stijn 65938675db
docs.js: fix some linting issues
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-14 09:10:30 +01:00
Sebastiaan van Stijn 923f7012d4
docs.js: reformat code
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-14 09:10:27 +01:00
Sebastiaan van Stijn 5276ea1d9f
Re-enable "anchorlink" script
This allows for easier sharing of links to specific sections
on a page.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-02-13 12:48:12 +01:00
Adrian Plata a1875f4d56
Reworking glossary to a table and removing left-side ToC (#1387) (#9769)
* Reworking glossary to a table and removing left-side ToC

Signed-off-by: Adrian Plata <adrian.plata@docker.com>

* modifying CSS

* Fixing desktop links.

* Fixing swarm mode links.
2019-10-30 13:15:39 -07:00
Usha Mandya a556c61cf7
Merge pull request #9351 from thaJeztah/remove_library_samples
Remove library samples, and link to Docker Hub instead
2019-09-23 16:21:57 +02:00
Vadim Klimenko ec3da7c84d Show dark version of site when prefers-color-scheme:dark (#8921) 2019-09-06 11:30:17 +01:00
Sebastiaan van Stijn d78dc92278
Remove javascripts related to generating library collection navigation
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-09-04 00:37:42 +02:00
Sebastiaan van Stijn e02481c059
Remove library samples from metadata.js
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-09-04 00:37:40 +02:00
paigehargrave 0dab4ade68
Merge branch 'master' into name-change-for-Docker-Desktop 2019-01-14 11:14:48 -05:00
paigehargrave 1dd2f32e20
Update my_first_tour.js 2019-01-11 14:44:33 -05:00
Anne Henmi e92f024fcd
Merge pull request #7496 from allejo/feature/fix-history-spam
Don't spam browser history when scrolling thru page
2019-01-08 08:12:47 -07:00
Jeffrey Morgan d15739c5e7 Merge branch 'master' into consolidation-changes 2018-11-14 18:29:09 -05:00
allejo 888c061228 Don't spam browser history when scrolling thru page
Fixes #6299
2018-10-11 22:41:48 -07:00
Jeffrey Morgan ca466a55ed Rename Docker Store and Docker Cloud - WIP 2018-10-04 19:41:32 -04:00
Oscar Caballero 269c80d2d9 Spelling revision 2018-09-23 21:43:11 +02:00
Joao Fernandes dde14cad56
Engine 18.03 (#6948)
* Improve description for multiple tiers
* Update EE engine installation
* Add release notes for engine 18.03.1-ee-1
2018-06-27 14:39:23 -07:00
Jim Galasyn c1ba017b02 Add deep-2.0 tab; start template port (#374)
* Recreate test.md

* Add deep-2.0 tab; start template port
2018-04-16 13:31:24 -07:00