mirror of https://github.com/docker/docs.git
Merge conflict (#2662)
This commit is contained in:
parent
49c5bd7b6e
commit
1a6874fcb4
30
404.md
30
404.md
|
@ -52,35 +52,9 @@ if (archive==false) {
|
|||
gonnaFwd = true;
|
||||
newURL = forwardingURL.replace(redirectVal.source,redirectVal.destination);
|
||||
}
|
||||
{% endfor %}
|
||||
|
||||
// PAGE ALIASES CHECK
|
||||
{% for page in site.pages %}{% if page.aliases %}
|
||||
var aliases = {{ page.aliases | jsonify }};
|
||||
if( Object.prototype.toString.call( aliases ) === '[object Array]' ) {
|
||||
// aliases is an array, therefore, there are multiple aliases
|
||||
for (i=0; i< aliases.length; i++)
|
||||
{
|
||||
if (forwardingURL == aliases[i])
|
||||
{
|
||||
console.log("Found via Page Aliases on a multi-alias page @", "{{ page.url }}", aliases[i]);
|
||||
gonnaFwd = true;
|
||||
newURL = "{{ page.url }}";
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// only one alias for this page.
|
||||
if (forwardingURL == aliases)
|
||||
{
|
||||
console.log("Found via Page Aliases on a single-alias page @", forwardingURL.indexOf(aliases[i]), aliases[i]);
|
||||
gonnaFwd = true;
|
||||
newURL = "{{ page.url }}";
|
||||
}
|
||||
}
|
||||
{% endif %}{% endfor %}
|
||||
|
||||
} // end of check for .md
|
||||
{% endfor %}
|
||||
} // end of check for archive
|
||||
} // end of check for .md
|
||||
var path = window.location.pathname.replace("#","");
|
||||
var phrase = decodeURIComponent(path.replace(/\/+/g, ' ').trim());
|
||||
|
||||
|
|
|
@ -2187,77 +2187,77 @@ manuals:
|
|||
title: Docker Swarm API
|
||||
|
||||
glossary:
|
||||
- path: /glossary/#aufs
|
||||
- path: /glossary/?term=aufs
|
||||
title: aufs
|
||||
- path: /glossary/#base-image
|
||||
- path: /glossary/?term=base image
|
||||
title: base image
|
||||
- path: /glossary/#boot2docker
|
||||
- path: /glossary/?term=boot2docker
|
||||
title: boot2docker
|
||||
- path: /glossary/#btrfs
|
||||
- path: /glossary/?term=btrfs
|
||||
title: btrfs
|
||||
- path: /glossary/#build
|
||||
- path: /glossary/?term=build
|
||||
title: build
|
||||
- path: /glossary/#cgroups
|
||||
- path: /glossary/?term=cgroups
|
||||
title: cgroups
|
||||
- path: /glossary/#compose
|
||||
- path: /glossary/?term=Compose
|
||||
title: Compose
|
||||
- path: /glossary/#copy-on-write
|
||||
- path: /glossary/?term=copy-on-write
|
||||
title: copy-on-write
|
||||
- path: /glossary/#container
|
||||
- path: /glossary/?term=container
|
||||
title: container
|
||||
- path: /glossary/#data-volume
|
||||
- path: /glossary/?term=data volume
|
||||
title: data volume
|
||||
- path: /glossary/#docker
|
||||
- path: /glossary/?term=docker
|
||||
title: Docker
|
||||
- path: /glossary/#docker-for-mac
|
||||
- path: /glossary/?term=Docker for Mac
|
||||
title: Docker for Mac
|
||||
- path: /glossary/#docker-for-windows
|
||||
- path: /glossary/?term=Docker for Windows
|
||||
title: Docker for Windows
|
||||
- path: /glossary/#docker-hub
|
||||
- path: /glossary/?term=Docker Hub
|
||||
title: Docker Hub
|
||||
- path: /glossary/#dockerfile
|
||||
- path: /glossary/?term=Dockerfile
|
||||
title: Dockerfile
|
||||
- path: /glossary/#filesystem
|
||||
- path: /glossary/?term=filesystem
|
||||
title: filesystem
|
||||
- path: /glossary/#image
|
||||
- path: /glossary/?term=image
|
||||
title: image
|
||||
- path: /glossary/#kitematic
|
||||
- path: /glossary/?term=kitematic
|
||||
title: Kitematic
|
||||
- path: /glossary/#libcontainer
|
||||
- path: /glossary/?term=libcontainer
|
||||
title: libcontainer
|
||||
- path: /glossary/#libnetwork
|
||||
- path: /glossary/?term=libnetwork
|
||||
title: libnetwork
|
||||
- path: /glossary/#link
|
||||
- path: /glossary/?term=link
|
||||
title: link
|
||||
- path: /glossary/#machine
|
||||
- path: /glossary/?term=Machine
|
||||
title: Machine
|
||||
- path: /glossary/#node
|
||||
- path: /glossary/?term=node
|
||||
title: node
|
||||
- path: /glossary/#overlay-network-driver
|
||||
- path: /glossary/?term=overlay network driver
|
||||
title: overlay network driver
|
||||
- path: /glossary/#overlay-storage-driver
|
||||
- path: /glossary/?term=overlay storage driver
|
||||
title: overlay storage driver
|
||||
- path: /glossary/#registry
|
||||
- path: /glossary/?term=registry
|
||||
title: registry
|
||||
- path: /glossary/#repository
|
||||
- path: /glossary/?term=repository
|
||||
title: repository
|
||||
- path: /glossary/#service
|
||||
- path: /glossary/?term=service
|
||||
title: service
|
||||
- path: /glossary/#service-discovery
|
||||
- path: /glossary/?term=service discovery
|
||||
title: service discovery
|
||||
- path: /glossary/#swarm
|
||||
- path: /glossary/?term=swarm
|
||||
title: swarm
|
||||
- path: /glossary/#docker-swarm
|
||||
- path: /glossary/?term=Docker Swarm
|
||||
title: Docker Swarm
|
||||
- path: /glossary/#swarm-mode
|
||||
- path: /glossary/?term=swarm mode
|
||||
title: swarm mode
|
||||
- path: /glossary/#tag
|
||||
- path: /glossary/?term=tag
|
||||
title: tag
|
||||
- path: /glossary/#task
|
||||
- path: /glossary/?term=task
|
||||
title: task
|
||||
- path: /glossary/#toolbox
|
||||
- path: /glossary/?term=toolbox
|
||||
title: Toolbox
|
||||
- path: /glossary/#union-file-system
|
||||
- path: /glossary/?term=Union file system
|
||||
title: Union file system
|
||||
- path: /glossary/#virtual-machine
|
||||
- path: /glossary/?term=virtual machine
|
||||
title: virtual machine
|
||||
|
|
|
@ -88,6 +88,13 @@ else %}{% assign edit_url = "" %}{% endif %} {% break %} {% endif %} {% endfor %
|
|||
{% if page.title %}
|
||||
<h1>{{ page.title }}</h1>{% endif %} {% if page.advisory %}
|
||||
<blockquote>{{ site.data.advisories.texts[page.advisory] | markdownify }}</blockquote>{% endif %}{% endif %} {% unless page.tree == false %}{% include read_time.html %}{% endunless %}{{ content }}
|
||||
<!-- tags -->
|
||||
{% assign keywords = page.keywords | split:"," %}
|
||||
{% for keyword in keywords %}{% assign strippedKeyword = keyword | strip %}
|
||||
{% capture keywordlist %}{{ keywordlist }}<a href="/glossary/?term={{strippedKeyword}}">{{strippedKeyword}}</a>{% unless forloop.last %}, {% endunless %}{% endcapture %}
|
||||
{% endfor %}
|
||||
{% if keywordlist.size > 0 %}<span class="glyphicon glyphicon-tags" style="padding-right: 10px"></span><span style="vertical-align: 2px">{{ keywordlist }}</span>{% endif %}
|
||||
<!-- link corrections -->
|
||||
<script language="JavaScript">
|
||||
var x = document.links.length;
|
||||
var baseHref = document.getElementsByTagName('base')[0].href
|
||||
|
|
12
glossary.md
12
glossary.md
|
@ -3,6 +3,7 @@ title: "Docker Glossary"
|
|||
description: "Glossary of terms used around Docker"
|
||||
keywords: "glossary, docker, terms, definitions"
|
||||
notoc: true
|
||||
noratings: true
|
||||
---
|
||||
<!--
|
||||
To edit/add/remove glossary entries, visit the YAML file at:
|
||||
|
@ -12,11 +13,14 @@ To get a specific entry while writing a page in the docs, enter Liquid text
|
|||
like so:
|
||||
{{ site.data.glossary["aufs"] }}
|
||||
-->
|
||||
<span id="glossaryMatch" />
|
||||
<span id="topicMatch" />
|
||||
|
||||
{% for entry in site.data.glossary %}{% assign newEntry="true" %}
|
||||
## Glossary terms
|
||||
|
||||
## {{ entry[0] }}
|
||||
|
||||
{{ entry[1] }}
|
||||
To see a definition for a term, and all topics in the documentation that have
|
||||
been tagged with that term, click any entry below:
|
||||
|
||||
{% for entry in site.data.glossary %}
|
||||
- [{{ entry[0] }}](/glossary/?term={{ entry[0]}})
|
||||
{% endfor %}
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
---
|
||||
layout: null
|
||||
---
|
||||
{
|
||||
"terms":[
|
||||
{% for entry in site.data.glossary %}
|
||||
{
|
||||
"term": {{ entry[0] | jsonify }},
|
||||
"def": {{ entry[1] | markdownify | replace:'href="#','href="/glossary/?term=' | jsonify }}
|
||||
}{% unless forloop.last %},{% endunless %}
|
||||
{% endfor %}
|
||||
]
|
||||
}
|
68
js/menu.js
68
js/menu.js
|
@ -1,4 +1,4 @@
|
|||
var metadata;
|
||||
var metadata, glossary;
|
||||
var autoCompleteShowing = false;
|
||||
var displayingAutcompleteResults = new Array();
|
||||
var autoCompleteShowingID = 0;
|
||||
|
@ -193,9 +193,75 @@ function hookupTOCEvents()
|
|||
});
|
||||
}
|
||||
|
||||
function queryString()
|
||||
{
|
||||
var vars = [], hash;
|
||||
var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
|
||||
for(var i = 0; i < hashes.length; i++)
|
||||
{
|
||||
hash = hashes[i].split('=');
|
||||
vars.push(hash[0]);
|
||||
vars[hash[0]] = hash[1];
|
||||
}
|
||||
return vars;
|
||||
}
|
||||
|
||||
function renderTopicsByTagTable(tagToLookup,divID)
|
||||
{
|
||||
var matchingPages = new Array();
|
||||
for (i=0;i<metadata.pages.length;i++)
|
||||
{
|
||||
thisPage = metadata.pages[i];
|
||||
if (thisPage.keywords)
|
||||
{
|
||||
var keywordArray = thisPage.keywords.split(",");
|
||||
for (n=0;n<keywordArray.length;n++)
|
||||
{
|
||||
if (keywordArray[n].trim().toLowerCase()==tagToLookup.toLowerCase())
|
||||
{
|
||||
matchingPages.push(i); // log the id of the page w/matching keyword
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
var pagesOutput = new Array();
|
||||
if (matchingPages.length > 0)
|
||||
{
|
||||
pagesOutput.push("<h2>Pages tagged with: " + tagToLookup + "</h2>");
|
||||
pagesOutput.push("<table><thead><tr><td>Page</td><td>Description</td></tr></thead><tbody>");
|
||||
for(i=0;i<matchingPages.length;i++) {
|
||||
thisPage = metadata.pages[matchingPages[i]];
|
||||
pagesOutput.push("<tr><td><a href='" + thisPage.url + "'>" + thisPage.title + "</a></td><td>" + thisPage.description + "</td></tr>");
|
||||
}
|
||||
pagesOutput.push("</tbody></table>");
|
||||
}
|
||||
$("#" + divID).html(pagesOutput.join(""));
|
||||
}
|
||||
function renderTagsPage()
|
||||
{
|
||||
if(window.location.pathname.indexOf("/glossary/")>-1)
|
||||
{
|
||||
var tagToLookup = decodeURI(queryString().term);
|
||||
$("#keyword").html(tagToLookup);
|
||||
for (i=0;i<glossary.terms.length;i++)
|
||||
{
|
||||
if (glossary.terms[i].term.toLowerCase()==tagToLookup.toLowerCase())
|
||||
{
|
||||
var glossaryOutput = glossary.terms[i].def;
|
||||
}
|
||||
}
|
||||
if (glossaryOutput) $("#glossaryMatch").html("<h2>Definition of: " + tagToLookup + "</h2>" + glossaryOutput);
|
||||
renderTopicsByTagTable(tagToLookup,"topicMatch",true);
|
||||
}
|
||||
}
|
||||
|
||||
jQuery(document).ready(function(){
|
||||
$.getJSON( "/metadata.txt", function( data ) {
|
||||
metadata = data;
|
||||
hookupTOCEvents();
|
||||
$.getJSON( "/glossary.txt", function( data ) {
|
||||
glossary = data;
|
||||
renderTagsPage();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue