description | title | hide_from_sitemap |
---|---|---|
Smoketest page |
Testing page |
true |
Most pages don't actually have a H1 heading. The page title from the metadata is automatically inserted.
This is the highest heading included in the right-nav. To include more heading
levels, set toc_min: 1
in the page-s front-matter. You can go all the way to
6, but if toc_min
is geater than toc_max
then no headings will show.
This is the lowest heading included in the right-nav, by default. To include
more heading levels, set toc_max: 4
in the page's front-matter. You can go all
the way to 6.
This heading is not included in the right-nav. To include it set toc_max: 4
in
the page's front-matter.
This heading is not included in the right-nav. To include it set toc_max: 5
in
the page's front-matter.
This is probably too many headings. Try to avoid it.
This heading is not included in the right-nav. To include it set toc_max: 6
in
the page's front-matter.
Plain block of text.
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Inline text styles:
- bold
- italic
- bold italic
strikethrough- underline
- underline italic
- underline bold
- underline bold italic
monospace text
monospace bold
-
a markdown link that opens in a new window{: target="blank" class="" } (the
class="_"
trick prevents Atom from italicizing the whole rest of the file until it encouters another underscore.) -
A link to a Github PR in
docker/docker
: {% include github-pr.md pr=28199 %} -
A link to a Github PR in
docker/docker.github.io
: {% include github-pr.md repo=docker.github.io pr=9999 %}
(you can also specify org=foo
to use a Github organization other than Docker).
-
A small cute image that is a link. The extra newline here makes it not show inline:
Some Bootstrap image classes might be interesting. You can use them with Markdown or HTML images.
- Bullet list item 1
- Bullet list item 2
- Bullet list item 3
-
Numbered list item 1. Two spaces between the period and the first letter helps with alignment.
-
Numbered list item 2. Let's put a note in it.
Note: We did it!
-
Numbered list item 3 with a code block in it. You need the blank line before the code block happens.
$ docker run hello-world
-
Numbered list item 4 with a bullet list inside it and a numbered list inside that.
- Sub-item 1
- Sub-item 2
-
Sub-sub-item 1
-
Sub-sub-item-2 with a table inside it because we like to party! Indentation is super important.
Header 1 Header 2 Thing 1 Thing 2 Thing 3 Thing 4
-
Some tables in markdown and html.
Permission level | Access |
---|---|
Bold or italic within a table cell. Next cell is empty on purpose. | |
Previous cell is empty. A --flag in mono text. |
|
Read | Pull |
Read/Write | Pull, push |
Admin | All of the above, plus update description, create and delete |
The alignment of the cells in the source doesn't really matter. The ending pipe character is optional (unless the last cell is supposed to be empty). The header row and separator row are optional.
If you need block-level HTML within your table cells, such as multiple
paragraphs, lists, sub-tables, etc, then you need to make a HTML table.
This is also the case if you need to use rowspans or colspans. Try to avoid
setting styles directly on your tables! If you set the width on a <td>
, you
only need to do it on the first one. If you have a <th>
, set it there.
Note: If you need to have markdown in a HTML table, you need to capture the table and then filter it through
markdownify
. See tabs for an example. Here, I avoid that by using HTML throughout.
Left channel | Right channel |
---|---|
This is some test text. This is more text on a new line. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. |
This is some more text about the right hand side. There is a link here to the Docker Experimental Features README on GitHub. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. |
You can use span-level HTML tags within Markdown.
You can use a <br />
tag to impose an extra newline like here:
You can use entities like
to keep a bunch of words together .
Keep reading for more examples, such as creating tabbed content within the page or displaying content as "cards".
This paragraph is centered and colored green by setting CSS directly on the element. Even though you can do this and it's sometimes the right way to go, remember that if we re-skin the site, any inline styles will need to be dealt with manually! {: style="text-align:center; color: green" }
{% assign my-text="foo" %}
The Liquid assignment just before this line fills in the following token {{ my-text }}. This will be effective for the rest of this file unless the token is reset.
{% capture my-other-text %}foo{% endcapture %} Here is another way: {{ my-other-text }}
You can nest captures within each other to represent more complex logic with Liquid.
- Things set in the top level of
_config.yml
are available as site variables, like{{ site.debug }}
. - Things set in the page's metadata, either via the defaults in
_config.yml
or per page, are available as page variables, like{{ page.title }}
. - In-line variables set via
assign
orcapture
are available for the remainder of the page after they are set. - If you include a file, you can pass key-value pairs at the same time. These are available as include variables, like
{{ include.toc_min }}
.
Here are some tabs:
- TAB 1 HEADER
- TAB 2 HEADER
You need to adjust the id
and data-target
values to match your use case.
If you have Markdown inside the content of the <div>
, you need to capture it, then
print it and run it through the markdownify
Liquid filter. Here's a demo:
- TAB 1 HEADER
- TAB 2 HEADER
- list item 1
- list item 2 {% endcapture %} {{ tab3-content | markdownify }}
- list item 3
- list item 4 {% endcapture %} {{ tab4-content | markdownify }}
Consider an example where you have something like one tab per language, and
you have multiple tab sets like this on a page. You might want them to all
toggle together. We have Javascript that loads on every page that lets you
do this by setting the data-group
attributes to be the same. Note that the
data-target
attributes still need to point to unique div IDs.
In this example, selecting Go
or Python
in one tab set will toggle the
other tab set to match.
- Go
- Python
And some content between the two sets, just for fun...
- Go
- Python
In a Bootstrap row, your columns need to add up to 12. Here are three cards in
a row, each of which takes up 1/3 (4/12) of the row. You need a couple <br />
s
to clear the row before.
You can use the CSS column-count
to flow your text into multiple columns.
You need a couple <br />
s to clear the row before.
This example does it with Markdown. You can't have any blank lines or it will break the Markdown block up. This example does it with Markdown. You can't have any blank lines or it will break the Markdown block up. This example does it with Markdown. You can't have any blank lines or it will break the Markdown block up. This example does it with Markdown. You can't have any blank lines or it will break the Markdown block up. This example does it with Markdown. You can't have any blank lines or it will break the Markdown block up. This example does it with Markdown. You can't have any blank lines or it will break the Markdown block up. This example does it with Markdown. You can't have any blank lines or it will break the Markdown block up. This example does it with Markdown. You can't have any blank lines or it will break the Markdown block up. This example does it with Markdown. You can't have any blank lines or it will break the Markdown block up. {: style="column-count: 3 "}
If you need to run custom Javascript within a page, and it depends upon JQuery
or Bootstrap, make sure the <script>
tags are at the very end of the page,
after all the content. Otherwise the script may try to run before JQuery and
Bootstrap JS are loaded.
Note: In general, this is a bad idea.
Note: This is a note.
Info: This is an info.
Tip: This is a tip.
Warning: This is a warning.
Caution: This is a caution.
Note: One line of note text another line of note text
Note: This is a note with a list and a table in it.
- List item 1
- List item 2
Table column 1 Table column 2 Row 1 column 1 Row 2 column 2 Row 2 column 1 Row 2 column 2 And another sentence to top it all off.
You can use XML style comments, which show up in the HTML "view source", or Liquid ones, which don't. You'll need to view the source of this file to see both styles.
{% comment %}This one won't.{% endcomment %}
Rouge provides lots of different code block "hints". If you leave off the hint, it tries to guess and sometimes gets it wrong. These are just a few hints that we use often.
The raw markup is needed to keep Liquid from interperting the things with double braces as templating language.
none with raw
{% raw %}
$ some command with {{double braces}}
$ some other command
{% endraw %}
bash with raw
{% raw %}
$ some command with {{double braces}}
$ some other command
{% endraw %}
$ echo "deb https://packages.docker.com/1.12/apt/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
incoming := map[string]interface{}{
"asdf": 1,
"qwer": []interface{}{},
"zxcv": []interface{}{
map[string]interface{}{},
true,
int(1e9),
"tyui",
},
}
return html.format(name=os.getenv('NAME', "world"), hostname=socket.gethostname(), visits=visits)
docker_service 'default' do
action [:create, :start]
end
Sometimes this doesn't work right and you have to use none
.
"server": {
"http_addr": ":4443",
"tls_key_file": "./fixtures/notary-server.key",
"tls_cert_file": "./fixtures/notary-server.crt"
}
<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
</head>
</html>
[![Deploy to Docker Cloud](https://files.cloud.docker.com/images/deploy-to-dockercloud.svg)](https://cloud.docker.com/stack/deploy/?repo=<repo_url>)
[supervisord]
nodaemon=true
[program:sshd]
command=/usr/sbin/sshd -D
Yes, we have our own highlighting in Rouge!
#
# example Dockerfile for https://docs.docker.com/examples/postgresql_service/
#
FROM ubuntu
RUN apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8
RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main" > /etc/apt/sources.list.d/pgdg.list
RUN apt-get update && apt-get install -y python-software-properties software-properties-common postgresql-9.3 postgresql-client-9.3 postgresql-contrib-9.3
# Note: The official Debian and Ubuntu images automatically ``apt-get clean``
# after each ``apt-get``
USER postgres
RUN /etc/init.d/postgresql start &&\
psql --command "CREATE USER docker WITH SUPERUSER PASSWORD 'docker';" &&\
createdb -O docker docker
RUN echo "host all all 0.0.0.0/0 md5" >> /etc/postgresql/9.3/main/pg_hba.conf
RUN echo "listen_addresses='*'" >> /etc/postgresql/9.3/main/postgresql.conf
EXPOSE 5432
VOLUME ["/etc/postgresql", "/var/log/postgresql", "/var/lib/postgresql"]
CMD ["/usr/lib/postgresql/9.3/bin/postgres", "-D", "/var/lib/postgresql/9.3/main", "-c", "config_file=/etc/postgresql/9.3/main/postgresql.conf"]
The yaml
hint doesn't play nicely with Atom so we sometimes have to use none
.
authorizedkeys:
image: dockercloud/authorizedkeys
deployment_strategy: every_node
autodestroy: always
environment:
- AUTHORIZED_KEYS=ssh-rsa AAAAB3Nsomelongsshkeystringhereu9UzQbVKy9o00NqXa5jkmZ9Yd0BJBjFmb3WwUR8sJWZVTPFL
volumes:
/root:/user:rw