mirror of
https://github.com/snachodog/just-the-docs.git
synced 2025-09-12 21:03:32 -06:00
Combination (#578)
This PR combines (and resolves conflicts between) #448, #463, #466, #494, #495, #496, #498, and #572. The main aim is to facilitate use of several of the implemented features _together_, when using the fork as a remote theme. It should also simplify merging the included PRs into a future release. The branch [combination-rec-nav](https://github.com/pdmosses/just-the-docs/tree/combination-rec-nav) adds [multi-level navigation](https://github.com/pmarsceill/just-the-docs/pull/462) and (NEW:) [sibling links](https://github.com/pmarsceill/just-the-docs/pull/394) to the branch used for this PR. It includes updated [documentation for the navigation structure](https://pdmosses.github.io/just-the-docs/docs/navigation-structure/), and reorganised and extended [navigation tests](https://pdmosses.github.io/just-the-docs/tests/navigation/). The documentation and the tests can be browsed at the (temporary) [website published from the combination-rec-nav branch](https://pdmosses.github.io/just-the-docs/). _Caveat:_ The changes to v0.3.3 in this PR and #462 have not yet been reviewed or approved, and may need updating before merging into a release of the theme. If you use a branch from a PR as a remote theme, there is a risk of such updates affecting your website. Moreover, these branches are likely to be deleted after they have been merged. To avoid such problems, you could copy the branch that you want to use to your own fork of the theme. Co-authored-by: Matt Wang <matt@matthewwang.me>
This commit is contained in:
@@ -137,6 +137,59 @@ jtd.addEvent(toggleDarkMode, 'click', function(){
|
||||
|
||||
See [Customization]({{ site.baseurl }}{% link docs/customization.md %}) for more information.
|
||||
|
||||
## Callouts
|
||||
|
||||
To use this feature, you need to configure a `color` and (optionally) `title` for each kind of callout you want to use, e.g.:
|
||||
|
||||
```yaml
|
||||
callouts:
|
||||
warning:
|
||||
title: Warning
|
||||
color: red
|
||||
```
|
||||
|
||||
This uses the color `$red-000` for the background of the callout, and `$red-300` for the title and box decoration.[^dark] You can then style a paragraph as a `warning` callout like this:
|
||||
|
||||
```markdown
|
||||
{: .warning }
|
||||
A paragraph...
|
||||
```
|
||||
|
||||
[^dark]:
|
||||
If you use the `dark` color scheme, this callout uses `$red-300` for the background, and `$red-000` for the title.
|
||||
|
||||
The colors `grey-lt`, `grey-dk`, `purple`, `blue`, `green`, `yellow`, and `red` are predefined; to use a custom color, you need to define its `000` and `300` levels in your SCSS files. For example, to use `pink`, add the following to your `_sass/custom/custom.scss` file:
|
||||
|
||||
```scss
|
||||
$pink-000: #f77ef1;
|
||||
$pink-100: #f967f1;
|
||||
$pink-200: #e94ee1;
|
||||
$pink-300: #dd2cd4;
|
||||
```
|
||||
|
||||
You can override the default `opacity` of the background for a particular callout, e.g.:
|
||||
|
||||
```yaml
|
||||
callouts:
|
||||
custom:
|
||||
color: pink
|
||||
opacity: 0.3
|
||||
```
|
||||
|
||||
You can change the default opacity (`0.2`) for all callouts, e.g.:
|
||||
|
||||
```yaml
|
||||
callouts_opacity: 0.3
|
||||
```
|
||||
|
||||
You can also adjust the overall level of callouts.
|
||||
The value of `callouts_level` is either `quiet` or `loud`;
|
||||
`loud` increases the saturation and lightness of the backgrounds.
|
||||
The default level is `quiet` when using the `light` or custom color schemes,
|
||||
and `loud` when using the `dark color scheme.`
|
||||
|
||||
See [Callouts]({{ site.baseurl }}{% link docs/ui-components/callouts.md %}) for more information.
|
||||
|
||||
## Google Analytics
|
||||
|
||||
```yaml
|
||||
@@ -149,39 +202,43 @@ ga_tracking_anonymize_ip: true # Use GDPR compliant Google Analytics settings (t
|
||||
## Document collections
|
||||
|
||||
By default, the navigation and search include normal [pages](https://jekyllrb.com/docs/pages/).
|
||||
Instead, you can also use [Jekyll collections](https://jekyllrb.com/docs/collections/) which group documents semantically together.
|
||||
You can also use [Jekyll collections](https://jekyllrb.com/docs/collections/) which group documents semantically together.
|
||||
|
||||
For example, put all your documentation files in the `_docs` folder and create the `docs` collection:
|
||||
For example, put all your test files in the `_tests` folder and create the `tests` collection:
|
||||
|
||||
```yaml
|
||||
# Define Jekyll collections
|
||||
collections:
|
||||
# Define a collection named "docs", its documents reside in the "_docs" directory
|
||||
docs:
|
||||
# Define a collection named "tests", its documents reside in the "_tests" directory
|
||||
tests:
|
||||
permalink: "/:collection/:path/"
|
||||
output: true
|
||||
|
||||
just_the_docs:
|
||||
# Define which collections are used in just-the-docs
|
||||
collections:
|
||||
# Reference the "docs" collection
|
||||
docs:
|
||||
# Reference the "tests" collection
|
||||
tests:
|
||||
# Give the collection a name
|
||||
name: Documentation
|
||||
name: Tests
|
||||
# Exclude the collection from the navigation
|
||||
# Supports true or false (default)
|
||||
nav_exclude: false
|
||||
# nav_exclude: true
|
||||
# Fold the collection in the navigation
|
||||
# Supports true or false (default)
|
||||
# nav_fold: true
|
||||
# Exclude the collection from the search
|
||||
# Supports true or false (default)
|
||||
search_exclude: false
|
||||
# search_exclude: true
|
||||
```
|
||||
The navigation for all your normal pages (if any) is displayed before those in collections.
|
||||
|
||||
You can reference multiple collections.
|
||||
This creates categories in the navigation with the configured names.
|
||||
|
||||
```yaml
|
||||
collections:
|
||||
docs:
|
||||
tests:
|
||||
permalink: "/:collection/:path/"
|
||||
output: true
|
||||
tutorials:
|
||||
@@ -190,8 +247,11 @@ collections:
|
||||
|
||||
just_the_docs:
|
||||
collections:
|
||||
docs:
|
||||
name: Documentation
|
||||
tests:
|
||||
name: Tests
|
||||
tutorials:
|
||||
name: Tutorials
|
||||
```
|
||||
When *all* your pages are in a single collection, its name is not displayed.
|
||||
|
||||
The navigation for each collection is a separate name space for page titles: a page in one collection cannot be a child of a page in a different collection, or of a normal page.
|
||||
|
@@ -4,6 +4,22 @@ title: Markdown kitchen sink
|
||||
nav_order: 99
|
||||
---
|
||||
|
||||
<button class="btn js-toggle-dark-mode">Preview dark color scheme</button>
|
||||
|
||||
<script>
|
||||
const toggleDarkMode = document.querySelector('.js-toggle-dark-mode');
|
||||
|
||||
jtd.addEvent(toggleDarkMode, 'click', function(){
|
||||
if (jtd.getTheme() === 'dark') {
|
||||
jtd.setTheme('light');
|
||||
toggleDarkMode.textContent = 'Preview dark color scheme';
|
||||
} else {
|
||||
jtd.setTheme('dark');
|
||||
toggleDarkMode.textContent = 'Return to the light side';
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
Text can be **bold**, _italic_, or ~~strikethrough~~.
|
||||
|
||||
[Link to another page](another-page).
|
||||
@@ -172,6 +188,41 @@ Term2
|
||||
|
||||
### More code
|
||||
|
||||
```python{% raw %}
|
||||
def dump_args(func):
|
||||
"This decorator dumps out the arguments passed to a function before calling it"
|
||||
argnames = func.func_code.co_varnames[:func.func_code.co_argcount]
|
||||
fname = func.func_name
|
||||
def echo_func(*args,**kwargs):
|
||||
print fname, ":", ', '.join(
|
||||
'%s=%r' % entry
|
||||
for entry in zip(argnames,args) + kwargs.items())
|
||||
return func(*args, **kwargs)
|
||||
return echo_func
|
||||
|
||||
@dump_args
|
||||
def f1(a,b,c):
|
||||
print a + b + c
|
||||
|
||||
f1(1, 2, 3)
|
||||
|
||||
def precondition(precondition, use_conditions=DEFAULT_ON):
|
||||
return conditions(precondition, None, use_conditions)
|
||||
|
||||
def postcondition(postcondition, use_conditions=DEFAULT_ON):
|
||||
return conditions(None, postcondition, use_conditions)
|
||||
|
||||
class conditions(object):
|
||||
__slots__ = ('__precondition', '__postcondition')
|
||||
|
||||
def __init__(self, pre, post, use_conditions=DEFAULT_ON):
|
||||
if not use_conditions:
|
||||
pre, post = None, None
|
||||
|
||||
self.__precondition = pre
|
||||
self.__postcondition = post
|
||||
{% endraw %}```
|
||||
|
||||
```
|
||||
Long, single-line code blocks should not wrap. They should horizontally scroll if they are too long. This line should be long enough to demonstrate this.
|
||||
```
|
||||
|
@@ -5,7 +5,6 @@ nav_order: 5
|
||||
---
|
||||
|
||||
# Navigation Structure
|
||||
|
||||
{: .no_toc }
|
||||
|
||||
<details open markdown="block">
|
||||
@@ -13,7 +12,7 @@ nav_order: 5
|
||||
Table of contents
|
||||
</summary>
|
||||
{: .text-delta }
|
||||
1. TOC
|
||||
- TOC
|
||||
{:toc}
|
||||
</details>
|
||||
|
||||
@@ -32,7 +31,6 @@ By default, all pages will appear as top level pages in the main nav unless a pa
|
||||
To specify a page order, you can use the `nav_order` parameter in your pages' YAML front matter.
|
||||
|
||||
#### Example
|
||||
|
||||
{: .no_toc }
|
||||
|
||||
```yaml
|
||||
@@ -59,7 +57,6 @@ By default, all Capital letters come before all lowercase letters; you can add `
|
||||
For specific pages that you do not wish to include in the main navigation, e.g. a 404 page or a landing page, use the `nav_exclude: true` parameter in the YAML front matter for that page.
|
||||
|
||||
#### Example
|
||||
|
||||
{: .no_toc }
|
||||
|
||||
```yaml
|
||||
@@ -113,7 +110,6 @@ On the parent pages, add this YAML front matter parameter:
|
||||
- `has_children: true` (tells us that this is a parent page)
|
||||
|
||||
#### Example
|
||||
|
||||
{: .no_toc }
|
||||
|
||||
```yaml
|
||||
@@ -135,7 +131,6 @@ Here we're setting up the UI Components landing page that is available at `/docs
|
||||
On child pages, simply set the `parent:` YAML front matter to whatever the parent's page title is and set a nav order (this number is now scoped within the section).
|
||||
|
||||
#### Example
|
||||
|
||||
{: .no_toc }
|
||||
|
||||
```yaml
|
||||
@@ -155,7 +150,6 @@ The Buttons page appears as a child of UI Components and appears second in the U
|
||||
By default, all pages with children will automatically append a Table of Contents which lists the child pages after the parent page's content. To disable this auto Table of Contents, set `has_toc: false` in the parent page's YAML front matter.
|
||||
|
||||
#### Example
|
||||
|
||||
{: .no_toc }
|
||||
|
||||
```yaml
|
||||
@@ -179,7 +173,6 @@ Child pages can also have children (grandchildren). This is achieved by using a
|
||||
1. Add the `parent` and `grand_parent` attribute to the grandchild
|
||||
|
||||
#### Example
|
||||
|
||||
{: .no_toc }
|
||||
|
||||
```yaml
|
||||
@@ -227,7 +220,6 @@ This would create the following navigation structure:
|
||||
To add auxiliary links to your site (in the upper right on all pages), add it to the `aux_links` [configuration option]({{ site.baseurl }}{% link docs/configuration.md %}#aux-links) in your site's `_config.yml` file.
|
||||
|
||||
#### Example
|
||||
|
||||
{: .no_toc }
|
||||
|
||||
```yaml
|
||||
@@ -244,16 +236,13 @@ aux_links:
|
||||
To generate a Table of Contents on your docs pages, you can use the `{:toc}` method from Kramdown, immediately after an `<ol>` in Markdown. This will automatically generate an ordered list of anchor links to various sections of the page based on headings and heading levels. There may be occasions where you're using a heading and you don't want it to show up in the TOC, so to skip a particular heading use the `{: .no_toc }` CSS class.
|
||||
|
||||
#### Example
|
||||
|
||||
{: .no_toc }
|
||||
|
||||
```markdown
|
||||
# Navigation Structure
|
||||
|
||||
{: .no_toc }
|
||||
|
||||
## Table of contents
|
||||
|
||||
{: .no_toc .text-delta }
|
||||
|
||||
1. TOC
|
||||
|
@@ -1,22 +0,0 @@
|
||||
---
|
||||
layout: default
|
||||
title: Tests
|
||||
has_children: true
|
||||
nav_order: 100
|
||||
---
|
||||
|
||||
# Tests
|
||||
|
||||
The main documentation pages of this theme illustrate the use of many of its features, which to some extent tests their implementation. The pages linked below provide further test cases for particular features, and may be useful for regression testing when developing new features.
|
||||
|
||||
The default configuration does not include the test pages. To include them, *commment-out* the following line in `_config.yml`:
|
||||
|
||||
```yaml
|
||||
, "docs/tests/"
|
||||
```
|
||||
so that it is:
|
||||
```yaml
|
||||
# , "docs/tests/"
|
||||
```
|
||||
|
||||
(Apparently Jekyll's `include` does *not* override `exclude` for the same folder...)
|
@@ -1,14 +0,0 @@
|
||||
---
|
||||
layout: default
|
||||
title: Tests for disambiguation A
|
||||
has_children: true
|
||||
---
|
||||
|
||||
# A
|
||||
|
||||
A top-level page
|
||||
|
||||
```yaml
|
||||
title: Tests for disambiguation A
|
||||
has_children: true
|
||||
```
|
@@ -1,14 +0,0 @@
|
||||
---
|
||||
layout: default
|
||||
title: Tests for disambiguation B
|
||||
has_children: true
|
||||
---
|
||||
|
||||
# B
|
||||
|
||||
A top-level page
|
||||
|
||||
```yaml
|
||||
title: Tests for disambiguation B
|
||||
has_children: true
|
||||
```
|
@@ -1,16 +0,0 @@
|
||||
---
|
||||
layout: default
|
||||
title: Tests for disambiguation C
|
||||
parent: Tests for disambiguation A
|
||||
has_children: true
|
||||
---
|
||||
|
||||
# C
|
||||
|
||||
A child of page A, and parent of page D
|
||||
|
||||
```yaml
|
||||
title: Tests for disambiguation C
|
||||
parent: Tests for disambiguation A
|
||||
has_children: true
|
||||
```
|
@@ -1,16 +0,0 @@
|
||||
---
|
||||
layout: default
|
||||
title: Tests for disambiguation C
|
||||
parent: Tests for disambiguation B
|
||||
has_children: true
|
||||
---
|
||||
|
||||
# C
|
||||
|
||||
A child of page B, and parent of page D
|
||||
|
||||
```yaml
|
||||
title: Tests for disambiguation C
|
||||
parent: Tests for disambiguation B
|
||||
has_children: true
|
||||
```
|
@@ -1,16 +0,0 @@
|
||||
---
|
||||
layout: default
|
||||
title: Tests for disambiguation D
|
||||
parent: Tests for disambiguation C
|
||||
grand_parent: Tests for disambiguation A
|
||||
---
|
||||
|
||||
# D
|
||||
|
||||
A grandchild of page A
|
||||
|
||||
```yaml
|
||||
title: Tests for disambiguation D
|
||||
parent: Tests for disambiguation C
|
||||
grand_parent: Tests for disambiguation A
|
||||
```
|
@@ -1,16 +0,0 @@
|
||||
---
|
||||
layout: default
|
||||
title: Tests for disambiguation D
|
||||
parent: Tests for disambiguation C
|
||||
grand_parent: Tests for disambiguation B
|
||||
---
|
||||
|
||||
# D
|
||||
|
||||
A grandchild of page B
|
||||
|
||||
```yaml
|
||||
title: Tests for disambiguation D
|
||||
parent: Tests for disambiguation C
|
||||
grand_parent: Tests for disambiguation B
|
||||
```
|
@@ -1,14 +0,0 @@
|
||||
---
|
||||
layout: default
|
||||
title: Disambiguation
|
||||
parent: Navigation
|
||||
grand_parent: Tests
|
||||
---
|
||||
|
||||
# Disambiguation
|
||||
|
||||
When different pages with children have the same title, referencing the relevant grandparent in the children disambiguates which page is intended.
|
||||
|
||||
- [Page A](a/) has a child [page with title C](ca/), and a grandchild [page with title D](dca/).
|
||||
- [Page B](b/) has a child [page with title C](cb/), and a grandchild [page with title D](dcb/).
|
||||
- The grandchild pages specify their parent and grandparent pages, so there is no ambiguity.
|
@@ -1,13 +0,0 @@
|
||||
---
|
||||
layout: default
|
||||
title: Tests for exclusion 0
|
||||
has_children: true
|
||||
nav_exclude: true
|
||||
---
|
||||
# Tests for exclusion 0
|
||||
|
||||
```yaml
|
||||
title: Tests for exclusion 0
|
||||
has_children: true
|
||||
nav_exclude: true
|
||||
```
|
@@ -1,15 +0,0 @@
|
||||
---
|
||||
layout: default
|
||||
title: Tests for exclusion 00
|
||||
parent: Tests for exclusion 0
|
||||
has_children: true
|
||||
nav_exclude: true
|
||||
---
|
||||
# Tests for exclusion 00
|
||||
|
||||
```yaml
|
||||
title: Tests for exclusion 00
|
||||
parent: Tests for exclusion 0
|
||||
has_children: true
|
||||
nav_exclude: true
|
||||
```
|
@@ -1,17 +0,0 @@
|
||||
---
|
||||
layout: default
|
||||
title: Tests for exclusion 000
|
||||
parent: Tests for exclusion 00
|
||||
grand_parent: Tests for exclusion 0
|
||||
has_children: false
|
||||
nav_exclude: true
|
||||
---
|
||||
# Tests for exclusion 000
|
||||
|
||||
```yaml
|
||||
title: Tests for exclusion 000
|
||||
parent: Tests for exclusion 00
|
||||
grand_parent: Tests for exclusion 0
|
||||
has_children: false
|
||||
nav_exclude: true
|
||||
```
|
@@ -1,17 +0,0 @@
|
||||
---
|
||||
layout: default
|
||||
title: Tests for exclusion 001
|
||||
parent: Tests for exclusion 00
|
||||
grand_parent: Tests for exclusion 0
|
||||
has_children: false
|
||||
nav_exclude: false
|
||||
---
|
||||
# Tests for exclusion 001
|
||||
|
||||
```yaml
|
||||
title: Tests for exclusion 001
|
||||
parent: Tests for exclusion 00
|
||||
grand_parent: Tests for exclusion 0
|
||||
has_children: false
|
||||
nav_exclude: false
|
||||
```
|
@@ -1,15 +0,0 @@
|
||||
---
|
||||
layout: default
|
||||
title: Tests for exclusion 01
|
||||
parent: Tests for exclusion 0
|
||||
has_children: true
|
||||
nav_exclude: false
|
||||
---
|
||||
# Tests for exclusion 01
|
||||
|
||||
```yaml
|
||||
title: Tests for exclusion 01
|
||||
parent: Tests for exclusion 0
|
||||
has_children: true
|
||||
nav_exclude: false
|
||||
```
|
@@ -1,17 +0,0 @@
|
||||
---
|
||||
layout: default
|
||||
title: Tests for exclusion 010
|
||||
parent: Tests for exclusion 01
|
||||
grand_parent: Tests for exclusion 0
|
||||
has_children: false
|
||||
nav_exclude: true
|
||||
---
|
||||
# Tests for exclusion 010
|
||||
|
||||
```yaml
|
||||
title: Tests for exclusion 010
|
||||
parent: Tests for exclusion 01
|
||||
grand_parent: Tests for exclusion 0
|
||||
has_children: false
|
||||
nav_exclude: true
|
||||
```
|
@@ -1,17 +0,0 @@
|
||||
---
|
||||
layout: default
|
||||
title: Tests for exclusion 011
|
||||
parent: Tests for exclusion 01
|
||||
grand_parent: Tests for exclusion 0
|
||||
has_children: false
|
||||
nav_exclude: false
|
||||
---
|
||||
# Tests for exclusion 011
|
||||
|
||||
```yaml
|
||||
title: Tests for exclusion 011
|
||||
parent: Tests for exclusion 01
|
||||
grand_parent: Tests for exclusion 0
|
||||
has_children: false
|
||||
nav_exclude: false
|
||||
```
|
@@ -1,13 +0,0 @@
|
||||
---
|
||||
layout: default
|
||||
title: Tests for exclusion 1
|
||||
has_children: true
|
||||
nav_exclude: false
|
||||
---
|
||||
# Tests for exclusion 1
|
||||
|
||||
```yaml
|
||||
title: Tests for exclusion 1
|
||||
has_children: true
|
||||
nav_exclude: false
|
||||
```
|
@@ -1,15 +0,0 @@
|
||||
---
|
||||
layout: default
|
||||
title: Tests for exclusion 10
|
||||
parent: Tests for exclusion 1
|
||||
has_children: true
|
||||
nav_exclude: true
|
||||
---
|
||||
# Tests for exclusion 10
|
||||
|
||||
```yaml
|
||||
title: Tests for exclusion 10
|
||||
parent: Tests for exclusion 1
|
||||
has_children: true
|
||||
nav_exclude: true
|
||||
```
|
@@ -1,17 +0,0 @@
|
||||
---
|
||||
layout: default
|
||||
title: Tests for exclusion 100
|
||||
parent: Tests for exclusion 10
|
||||
grand_parent: Tests for exclusion 1
|
||||
has_children: false
|
||||
nav_exclude: true
|
||||
---
|
||||
# Tests for exclusion 100
|
||||
|
||||
```yaml
|
||||
title: Tests for exclusion 100
|
||||
parent: Tests for exclusion 10
|
||||
grand_parent: Tests for exclusion 1
|
||||
has_children: false
|
||||
nav_exclude: true
|
||||
```
|
@@ -1,17 +0,0 @@
|
||||
---
|
||||
layout: default
|
||||
title: Tests for exclusion 101
|
||||
parent: Tests for exclusion 10
|
||||
grand_parent: Tests for exclusion 1
|
||||
has_children: false
|
||||
nav_exclude: false
|
||||
---
|
||||
# Tests for exclusion 101
|
||||
|
||||
```yaml
|
||||
title: Tests for exclusion 101
|
||||
parent: Tests for exclusion 10
|
||||
grand_parent: Tests for exclusion 1
|
||||
has_children: false
|
||||
nav_exclude: false
|
||||
```
|
@@ -1,15 +0,0 @@
|
||||
---
|
||||
layout: default
|
||||
title: Tests for exclusion 11
|
||||
parent: Tests for exclusion 1
|
||||
has_children: true
|
||||
nav_exclude: false
|
||||
---
|
||||
# Tests for exclusion 11
|
||||
|
||||
```yaml
|
||||
title: Tests for exclusion 11
|
||||
parent: Tests for exclusion 1
|
||||
has_children: true
|
||||
nav_exclude: false
|
||||
```
|
@@ -1,17 +0,0 @@
|
||||
---
|
||||
layout: default
|
||||
title: Tests for exclusion 110
|
||||
parent: Tests for exclusion 11
|
||||
grand_parent: Tests for exclusion 1
|
||||
has_children: false
|
||||
nav_exclude: true
|
||||
---
|
||||
# Tests for exclusion 110
|
||||
|
||||
```yaml
|
||||
title: Tests for exclusion 110
|
||||
parent: Tests for exclusion 11
|
||||
grand_parent: Tests for exclusion 1
|
||||
has_children: false
|
||||
nav_exclude: true
|
||||
```
|
@@ -1,17 +0,0 @@
|
||||
---
|
||||
layout: default
|
||||
title: Tests for exclusion 111
|
||||
parent: Tests for exclusion 11
|
||||
grand_parent: Tests for exclusion 1
|
||||
has_children: false
|
||||
nav_exclude: false
|
||||
---
|
||||
# Tests for exclusion 111
|
||||
|
||||
```yaml
|
||||
title: Tests for exclusion 111
|
||||
parent: Tests for exclusion 11
|
||||
grand_parent: Tests for exclusion 1
|
||||
has_children: false
|
||||
nav_exclude: false
|
||||
```
|
@@ -1,11 +0,0 @@
|
||||
---
|
||||
layout: default
|
||||
nav_exclude: true
|
||||
---
|
||||
# Tests for exclusion untitled and excluded
|
||||
|
||||
This page does not have a `title`, and it is explicitly excluded from the navigation
|
||||
|
||||
```yaml
|
||||
nav_exclude: true
|
||||
```
|
@@ -1,36 +0,0 @@
|
||||
---
|
||||
layout: default
|
||||
title: Exclusion
|
||||
parent: Navigation
|
||||
grand_parent: Tests
|
||||
---
|
||||
|
||||
# Exclusion
|
||||
|
||||
Pages excluded from the main navigation can have parents and children. Navigation to and between excluded pages can be supported by the auto-generating list of child pages inserted at the bottom of each page, and by links to parents in the breadcrumbs at the top of each page.
|
||||
|
||||
The following tests cover all combinations of excluded and included pages for the top level, child pages, and grandchild pages. The last binary digit in a page title indicates whether the page is included (1) or excluded (0); preceding digits refer to its parent and grandparent.
|
||||
|
||||
## Included in main navigation
|
||||
|
||||
- [Tests for exclusion 1](1/)
|
||||
- [Tests for exclusion 11](11/)
|
||||
- [Tests for exclusion 111](111/)
|
||||
|
||||
## Included only in child navigation
|
||||
|
||||
- [Tests for exclusion 110](110/)
|
||||
- [Tests for exclusion 10](10/)
|
||||
- [Tests for exclusion 101](101/)
|
||||
- [Tests for exclusion 100](100/)
|
||||
- [Tests for exclusion 01](01/)
|
||||
- [Tests for exclusion 011](011/)
|
||||
- [Tests for exclusion 010](010/)
|
||||
- [Tests for exclusion 00](00/)
|
||||
- [Tests for exclusion 001](001/)
|
||||
- [Tests for exclusion 000](000/)
|
||||
|
||||
## Not included in main or child navigation
|
||||
|
||||
- [Tests for exclusion 0](0/)
|
||||
- ["Untitled"](untitled/)
|
@@ -1,6 +0,0 @@
|
||||
---
|
||||
layout: default
|
||||
---
|
||||
# Tests for exclusion untitled
|
||||
|
||||
This page does not have a `title`, and it is excluded from the navigation -- unless it is located in a Jekyll collection (which provides default titles). To exclude a title-less page from the navigation, regardless of whether it is located in a collection, set `nav_exclude: true`.
|
@@ -1,8 +0,0 @@
|
||||
---
|
||||
layout: default
|
||||
title: Navigation
|
||||
parent: Tests
|
||||
has_children: true
|
||||
---
|
||||
|
||||
# Navigation
|
@@ -1,14 +0,0 @@
|
||||
---
|
||||
layout: default
|
||||
title: "10"
|
||||
parent: Default
|
||||
grand_parent: Tests for order
|
||||
---
|
||||
|
||||
# 10
|
||||
|
||||
```yaml
|
||||
title: "10"
|
||||
parent: Default
|
||||
grand_parent: Tests for order
|
||||
```
|
@@ -1,14 +0,0 @@
|
||||
---
|
||||
layout: default
|
||||
title: "2"
|
||||
parent: Default
|
||||
grand_parent: Tests for order
|
||||
---
|
||||
|
||||
# 2
|
||||
|
||||
```yaml
|
||||
title: "2"
|
||||
parent: Default
|
||||
grand_parent: Tests for order
|
||||
```
|
@@ -1,14 +0,0 @@
|
||||
---
|
||||
layout: default
|
||||
title: A
|
||||
parent: Default
|
||||
grand_parent: Tests for order
|
||||
---
|
||||
|
||||
# A
|
||||
|
||||
```yaml
|
||||
title: A
|
||||
parent: Default
|
||||
grand_parent: Tests for order
|
||||
```
|
@@ -1,14 +0,0 @@
|
||||
---
|
||||
layout: default
|
||||
title: aa
|
||||
parent: Default
|
||||
grand_parent: Tests for order
|
||||
---
|
||||
|
||||
# aa
|
||||
|
||||
```yaml
|
||||
title: aa
|
||||
parent: Default
|
||||
grand_parent: Tests for order
|
||||
```
|
@@ -1,14 +0,0 @@
|
||||
---
|
||||
layout: default
|
||||
title: Aa
|
||||
parent: Default
|
||||
grand_parent: Tests for order
|
||||
---
|
||||
|
||||
# Aa
|
||||
|
||||
```yaml
|
||||
title: Aa
|
||||
parent: Default
|
||||
grand_parent: Tests for order
|
||||
```
|
@@ -1,15 +0,0 @@
|
||||
---
|
||||
layout: default
|
||||
title: Default
|
||||
parent: Tests for order
|
||||
nav_order: 1
|
||||
has_children: true
|
||||
---
|
||||
|
||||
# Default Order
|
||||
|
||||
When `nav_order` fields are omitted, the pages are ordered alphabetically by their titles.
|
||||
|
||||
By default, all Capital letters come before all lowercase letters; you can add `nav_sort: case_insensitive` in the configuration file to ignore the case).
|
||||
|
||||
Digits precede letters, and numeric titles are ordered lexicographically: `10` precedes `2` (in contrast to explicit numeric `nav_order` values).
|
@@ -1,16 +0,0 @@
|
||||
---
|
||||
layout: default
|
||||
title: "-1.1"
|
||||
nav_order: -1.1
|
||||
parent: Floats
|
||||
grand_parent: Tests for order
|
||||
---
|
||||
|
||||
# -1.1
|
||||
|
||||
```yaml
|
||||
title: "-1.1"
|
||||
nav_order: -1.1
|
||||
parent: Floats
|
||||
grand_parent: Tests for order
|
||||
```
|
@@ -1,16 +0,0 @@
|
||||
---
|
||||
layout: default
|
||||
title: "0.0"
|
||||
nav_order: 0.0
|
||||
parent: Floats
|
||||
grand_parent: Tests for order
|
||||
---
|
||||
|
||||
# 0.0
|
||||
|
||||
```yaml
|
||||
title: "0.0"
|
||||
nav_order: 0.0
|
||||
parent: Floats
|
||||
grand_parent: Tests for order
|
||||
```
|
@@ -1,16 +0,0 @@
|
||||
---
|
||||
layout: default
|
||||
title: "10.0"
|
||||
nav_order: 10.0
|
||||
parent: Floats
|
||||
grand_parent: Tests for order
|
||||
---
|
||||
|
||||
# 10.0
|
||||
|
||||
```yaml
|
||||
title: "10.0"
|
||||
nav_order: 10.0
|
||||
parent: Floats
|
||||
grand_parent: Tests for order
|
||||
```
|
@@ -1,16 +0,0 @@
|
||||
---
|
||||
layout: default
|
||||
title: "2.2222"
|
||||
nav_order: 2.2222
|
||||
parent: Floats
|
||||
grand_parent: Tests for order
|
||||
---
|
||||
|
||||
# 2.2222
|
||||
|
||||
```yaml
|
||||
title: "2.2222"
|
||||
nav_order: 2.2222
|
||||
parent: Floats
|
||||
grand_parent: Tests for order
|
||||
```
|
@@ -1,13 +0,0 @@
|
||||
---
|
||||
layout: default
|
||||
title: Floats
|
||||
parent: Tests for order
|
||||
nav_order: 4
|
||||
has_children: true
|
||||
---
|
||||
|
||||
# Floating-Point Order
|
||||
|
||||
When `nav_order` fields are floating-point numbers, the pages are ordered in increasing order of the numerical values.
|
||||
|
||||
Floats include `0.0` and negative values.
|
@@ -1,16 +0,0 @@
|
||||
---
|
||||
layout: default
|
||||
title: Order
|
||||
parent: Navigation
|
||||
grand_parent: Tests
|
||||
---
|
||||
|
||||
# Order
|
||||
|
||||
The value of `nav_order` can be numbers (integers, floats) and/or strings. The following tests illustrate their effects.
|
||||
|
||||
- [Default](default/), using `title` instead of `nav_order` fields.
|
||||
- [Strings](strings/), lexicographically ordered, possibly case-insensitively.
|
||||
- [Integers](integers/), numerically ordered.
|
||||
- [Floats](floats/), numerically ordered.
|
||||
- [Mixture](mixture/), with numbers before strings.
|
@@ -1,16 +0,0 @@
|
||||
---
|
||||
layout: default
|
||||
title: "-1"
|
||||
nav_order: -1
|
||||
parent: Integers
|
||||
grand_parent: Tests for order
|
||||
---
|
||||
|
||||
# -1
|
||||
|
||||
```yaml
|
||||
title: "-1"
|
||||
nav_order: -1
|
||||
parent: Integers
|
||||
grand_parent: Tests for order
|
||||
```
|
@@ -1,16 +0,0 @@
|
||||
---
|
||||
layout: default
|
||||
title: "0"
|
||||
nav_order: 0
|
||||
parent: Integers
|
||||
grand_parent: Tests for order
|
||||
---
|
||||
|
||||
# 0
|
||||
|
||||
```yaml
|
||||
title: "0"
|
||||
nav_order: 0
|
||||
parent: Integers
|
||||
grand_parent: Tests for order
|
||||
```
|
@@ -1,16 +0,0 @@
|
||||
---
|
||||
layout: default
|
||||
title: "10"
|
||||
nav_order: 10
|
||||
parent: Integers
|
||||
grand_parent: Tests for order
|
||||
---
|
||||
|
||||
# 10
|
||||
|
||||
```yaml
|
||||
title: "10"
|
||||
nav_order: 10
|
||||
parent: Integers
|
||||
grand_parent: Tests for order
|
||||
```
|
@@ -1,16 +0,0 @@
|
||||
---
|
||||
layout: default
|
||||
title: "2"
|
||||
nav_order: 2
|
||||
parent: Integers
|
||||
grand_parent: Tests for order
|
||||
---
|
||||
|
||||
# 2
|
||||
|
||||
```yaml
|
||||
title: "2"
|
||||
nav_order: 2
|
||||
parent: Integers
|
||||
grand_parent: Tests for order
|
||||
```
|
@@ -1,13 +0,0 @@
|
||||
---
|
||||
layout: default
|
||||
title: Integers
|
||||
parent: Tests for order
|
||||
nav_order: 3
|
||||
has_children: true
|
||||
---
|
||||
|
||||
# Integer Order
|
||||
|
||||
When `nav_order` fields are integers, the pages are ordered in increasing order of the numerical values.
|
||||
|
||||
Integers include `0` and negative values. Integers can be reused for top-level pages and for different sets of child pages.
|
@@ -1,16 +0,0 @@
|
||||
---
|
||||
layout: default
|
||||
title: "-1.1"
|
||||
nav_order: -1.1
|
||||
parent: Mixture
|
||||
grand_parent: Tests for order
|
||||
---
|
||||
|
||||
# -1.1
|
||||
|
||||
```yaml
|
||||
title: "-1.1"
|
||||
nav_order: -1.1
|
||||
parent: Mixture
|
||||
grand_parent: Tests for order
|
||||
```
|
@@ -1,16 +0,0 @@
|
||||
---
|
||||
layout: default
|
||||
title: "-1"
|
||||
nav_order: -1
|
||||
parent: Mixture
|
||||
grand_parent: Tests for order
|
||||
---
|
||||
|
||||
# -1
|
||||
|
||||
```yaml
|
||||
title: "-1"
|
||||
nav_order: -1
|
||||
parent: Mixture
|
||||
grand_parent: Tests for order
|
||||
```
|
@@ -1,16 +0,0 @@
|
||||
---
|
||||
layout: default
|
||||
title: "0.0"
|
||||
nav_order: 0.0
|
||||
parent: Mixture
|
||||
grand_parent: Tests for order
|
||||
---
|
||||
|
||||
# 0.0
|
||||
|
||||
```yaml
|
||||
title: "0.0"
|
||||
nav_order: 0.0
|
||||
parent: Mixture
|
||||
grand_parent: Tests for order
|
||||
```
|
@@ -1,16 +0,0 @@
|
||||
---
|
||||
layout: default
|
||||
title: "0"
|
||||
nav_order: 0
|
||||
parent: Mixture
|
||||
grand_parent: Tests for order
|
||||
---
|
||||
|
||||
# 0
|
||||
|
||||
```yaml
|
||||
title: "0"
|
||||
nav_order: 0
|
||||
parent: Mixture
|
||||
grand_parent: Tests for order
|
||||
```
|
@@ -1,16 +0,0 @@
|
||||
---
|
||||
layout: default
|
||||
title: "10.0"
|
||||
nav_order: 10.0
|
||||
parent: Mixture
|
||||
grand_parent: Tests for order
|
||||
---
|
||||
|
||||
# 10.0
|
||||
|
||||
```yaml
|
||||
title: "10.0"
|
||||
nav_order: 10.0
|
||||
parent: Mixture
|
||||
grand_parent: Tests for order
|
||||
```
|
@@ -1,14 +0,0 @@
|
||||
---
|
||||
layout: default
|
||||
title: "10"
|
||||
parent: Mixture
|
||||
grand_parent: Tests for order
|
||||
---
|
||||
|
||||
# 10
|
||||
|
||||
```yaml
|
||||
title: "10"
|
||||
parent: Mixture
|
||||
grand_parent: Tests for order
|
||||
```
|
@@ -1,16 +0,0 @@
|
||||
---
|
||||
layout: default
|
||||
title: "2.2222"
|
||||
nav_order: 2.2222
|
||||
parent: Mixture
|
||||
grand_parent: Tests for order
|
||||
---
|
||||
|
||||
# 2.2222
|
||||
|
||||
```yaml
|
||||
title: "2.2222"
|
||||
nav_order: 2.2222
|
||||
parent: Mixture
|
||||
grand_parent: Tests for order
|
||||
```
|
@@ -1,14 +0,0 @@
|
||||
---
|
||||
layout: default
|
||||
title: "2"
|
||||
parent: Mixture
|
||||
grand_parent: Tests for order
|
||||
---
|
||||
|
||||
# 2
|
||||
|
||||
```yaml
|
||||
title: "2"
|
||||
parent: Mixture
|
||||
grand_parent: Tests for order
|
||||
```
|
@@ -1,14 +0,0 @@
|
||||
---
|
||||
layout: default
|
||||
title: A
|
||||
parent: Mixture
|
||||
grand_parent: Tests for order
|
||||
---
|
||||
|
||||
# A
|
||||
|
||||
```yaml
|
||||
title: A
|
||||
parent: Mixture
|
||||
grand_parent: Tests for order
|
||||
```
|
@@ -1,16 +0,0 @@
|
||||
---
|
||||
layout: default
|
||||
title: aa
|
||||
nav_order: "aa"
|
||||
parent: Mixture
|
||||
grand_parent: Tests for order
|
||||
---
|
||||
|
||||
# aa
|
||||
|
||||
```yaml
|
||||
title: aa
|
||||
nav_order: "aa"
|
||||
parent: Mixture
|
||||
grand_parent: Tests for order
|
||||
```
|
@@ -1,16 +0,0 @@
|
||||
---
|
||||
layout: default
|
||||
title: Aa
|
||||
nav_order: "Aa"
|
||||
parent: Mixture
|
||||
grand_parent: Tests for order
|
||||
---
|
||||
|
||||
# Aa
|
||||
|
||||
```yaml
|
||||
title: Aa
|
||||
nav_order: "Aa"
|
||||
parent: Mixture
|
||||
grand_parent: Tests for order
|
||||
```
|
@@ -1,11 +0,0 @@
|
||||
---
|
||||
layout: default
|
||||
title: Mixture
|
||||
parent: Tests for order
|
||||
nav_order: 5
|
||||
has_children: true
|
||||
---
|
||||
|
||||
# Mixed Order
|
||||
|
||||
It seems unlikely that different types of `nav_order` values are needed for the children of the same parent.
|
@@ -1,7 +0,0 @@
|
||||
---
|
||||
layout: default
|
||||
title: Tests for order
|
||||
has_children: true
|
||||
---
|
||||
|
||||
# Order
|
@@ -1,16 +0,0 @@
|
||||
---
|
||||
layout: default
|
||||
title: "10"
|
||||
nav_order: "10"
|
||||
parent: Strings
|
||||
grand_parent: Tests for order
|
||||
---
|
||||
|
||||
# 10
|
||||
|
||||
```yaml
|
||||
title: "10"
|
||||
nav_order: "10"
|
||||
parent: Strings
|
||||
grand_parent: Tests for order
|
||||
```
|
@@ -1,16 +0,0 @@
|
||||
---
|
||||
layout: default
|
||||
title: "2"
|
||||
nav_order: "2"
|
||||
parent: Strings
|
||||
grand_parent: Tests for order
|
||||
---
|
||||
|
||||
# 2
|
||||
|
||||
```yaml
|
||||
title: "2"
|
||||
nav_order: "2"
|
||||
parent: Strings
|
||||
grand_parent: Tests for order
|
||||
```
|
@@ -1,16 +0,0 @@
|
||||
---
|
||||
layout: default
|
||||
title: A
|
||||
nav_order: A
|
||||
parent: Strings
|
||||
grand_parent: Tests for order
|
||||
---
|
||||
|
||||
# A
|
||||
|
||||
```yaml
|
||||
title: A
|
||||
nav_order: A
|
||||
parent: Strings
|
||||
grand_parent: Tests for order
|
||||
```
|
@@ -1,16 +0,0 @@
|
||||
---
|
||||
layout: default
|
||||
title: aa
|
||||
nav_order: "aa"
|
||||
parent: Strings
|
||||
grand_parent: Tests for order
|
||||
---
|
||||
|
||||
# aa
|
||||
|
||||
```yaml
|
||||
title: aa
|
||||
nav_order: "aa"
|
||||
parent: Strings
|
||||
grand_parent: Tests for order
|
||||
```
|
@@ -1,16 +0,0 @@
|
||||
---
|
||||
layout: default
|
||||
title: Aa
|
||||
nav_order: "Aa"
|
||||
parent: Strings
|
||||
grand_parent: Tests for order
|
||||
---
|
||||
|
||||
# Aa
|
||||
|
||||
```yaml
|
||||
title: Aa
|
||||
nav_order: "Aa"
|
||||
parent: Strings
|
||||
grand_parent: Tests for order
|
||||
```
|
@@ -1,13 +0,0 @@
|
||||
---
|
||||
layout: default
|
||||
title: Strings
|
||||
parent: Tests for order
|
||||
nav_order: 2
|
||||
has_children: true
|
||||
---
|
||||
|
||||
# String Order
|
||||
|
||||
By default, all Capital letters come before all lowercase letters; you can add `nav_sort: case_insensitive` in the configuration file to ignore the case).
|
||||
|
||||
Digits precede letters, and numeric titles are ordered lexicographically: `"10"` precedes `"2"` (in contrast to explicit numeric `nav_order` values).
|
@@ -1,83 +0,0 @@
|
||||
---
|
||||
layout: default
|
||||
title: Description lists
|
||||
parent: Styling
|
||||
grand_parent: Tests
|
||||
---
|
||||
|
||||
# Description lists
|
||||
|
||||
The first child element of each `dd` element in a `dl` list should be aligned with the preceding `dt` element in the following examples.
|
||||
|
||||
term
|
||||
|
||||
: paragraph text
|
||||
|
||||
paragraph text
|
||||
|
||||
term
|
||||
|
||||
: ### Header
|
||||
|
||||
paragraph text
|
||||
|
||||
term
|
||||
|
||||
: > block quote
|
||||
|
||||
paragraph text
|
||||
|
||||
term
|
||||
|
||||
: ```sh
|
||||
fenced code block
|
||||
```
|
||||
|
||||
paragraph text
|
||||
|
||||
term
|
||||
|
||||
: + unordered list item
|
||||
+ unordered list item
|
||||
|
||||
paragraph text
|
||||
|
||||
term
|
||||
|
||||
: 1. ordered list item
|
||||
2. ordered list item
|
||||
|
||||
paragraph text
|
||||
|
||||
term
|
||||
|
||||
: sub-term
|
||||
: sub-description
|
||||
|
||||
sub-term
|
||||
: sub-description
|
||||
|
||||
paragraph text
|
||||
|
||||
term
|
||||
|
||||
: |-----------------+------------+-----------------+----------------|
|
||||
| Default aligned |Left aligned| Center aligned | Right aligned |
|
||||
|-----------------|:-----------|:---------------:|---------------:|
|
||||
| First body part |Second cell | Third cell | fourth cell |
|
||||
| Second line |foo | **strong** | baz |
|
||||
| Third line |quux | baz | bar |
|
||||
|-----------------+------------+-----------------+----------------|
|
||||
| Second body | | | |
|
||||
| 2 line | | | |
|
||||
|=================+============+=================+================|
|
||||
| Footer row | | | |
|
||||
|-----------------+------------+-----------------+----------------|
|
||||
|
||||
paragraph text
|
||||
|
||||
term
|
||||
|
||||
: ***
|
||||
|
||||
paragraph text
|
@@ -1,8 +0,0 @@
|
||||
---
|
||||
layout: default
|
||||
title: Styling
|
||||
parent: Tests
|
||||
has_children: true
|
||||
---
|
||||
|
||||
# Styling
|
@@ -1,65 +0,0 @@
|
||||
---
|
||||
layout: default
|
||||
title: Ordered lists
|
||||
parent: Styling
|
||||
grand_parent: Tests
|
||||
---
|
||||
|
||||
# Ordered lists
|
||||
|
||||
The first child element of each `li` element in an `ol` list should be aligned with the preceding label in the following examples.
|
||||
|
||||
1. paragraph text
|
||||
|
||||
paragraph text
|
||||
|
||||
1. ### Header
|
||||
|
||||
paragraph text
|
||||
|
||||
1. > block quote
|
||||
|
||||
paragraph text
|
||||
|
||||
1. ```sh
|
||||
fenced code block
|
||||
```
|
||||
|
||||
paragraph text
|
||||
|
||||
1. + unordered list item
|
||||
+ unordered list item
|
||||
|
||||
paragraph text
|
||||
|
||||
1. 1. ordered list item
|
||||
2. ordered list item
|
||||
|
||||
paragraph text
|
||||
|
||||
1. term
|
||||
: description
|
||||
|
||||
term
|
||||
: description
|
||||
|
||||
paragraph text
|
||||
|
||||
1. |-----------------+------------+-----------------+----------------|
|
||||
| Default aligned |Left aligned| Center aligned | Right aligned |
|
||||
|-----------------|:-----------|:---------------:|---------------:|
|
||||
| First body part |Second cell | Third cell | fourth cell |
|
||||
| Second line |foo | **strong** | baz |
|
||||
| Third line |quux | baz | bar |
|
||||
|-----------------+------------+-----------------+----------------|
|
||||
| Second body | | | |
|
||||
| 2 line | | | |
|
||||
|=================+============+=================+================|
|
||||
| Footer row | | | |
|
||||
|-----------------+------------+-----------------+----------------|
|
||||
|
||||
paragraph text
|
||||
|
||||
1. ***
|
||||
|
||||
paragraph text
|
@@ -1,65 +0,0 @@
|
||||
---
|
||||
layout: default
|
||||
title: Unordered lists
|
||||
parent: Styling
|
||||
grand_parent: Tests
|
||||
---
|
||||
|
||||
# Unordered lists
|
||||
|
||||
The first child element of each `li` element in a `ul` list should be aligned with the preceding bullet in the following examples.
|
||||
|
||||
- paragraph text
|
||||
|
||||
paragraph text
|
||||
|
||||
- ### Header
|
||||
|
||||
paragraph text
|
||||
|
||||
- > block quote
|
||||
|
||||
paragraph text
|
||||
|
||||
- ```sh
|
||||
fenced code block
|
||||
```
|
||||
|
||||
paragraph text
|
||||
|
||||
- + unordered list item
|
||||
+ unordered list item
|
||||
|
||||
paragraph text
|
||||
|
||||
- 1. ordered list item
|
||||
2. ordered list item
|
||||
|
||||
paragraph text
|
||||
|
||||
- term
|
||||
: description
|
||||
|
||||
term
|
||||
: description
|
||||
|
||||
paragraph text
|
||||
|
||||
- |-----------------+------------+-----------------+----------------|
|
||||
| Default aligned |Left aligned| Center aligned | Right aligned |
|
||||
|-----------------|:-----------|:---------------:|---------------:|
|
||||
| First body part |Second cell | Third cell | fourth cell |
|
||||
| Second line |foo | **strong** | baz |
|
||||
| Third line |quux | baz | bar |
|
||||
|-----------------+------------+-----------------+----------------|
|
||||
| Second body | | | |
|
||||
| 2 line | | | |
|
||||
|=================+============+=================+================|
|
||||
| Footer row | | | |
|
||||
|-----------------+------------+-----------------+----------------|
|
||||
|
||||
paragraph text
|
||||
|
||||
- ***
|
||||
|
||||
paragraph text
|
104
docs/ui-components/callouts.md
Normal file
104
docs/ui-components/callouts.md
Normal file
@@ -0,0 +1,104 @@
|
||||
---
|
||||
layout: default
|
||||
title: Callouts
|
||||
parent: UI Components
|
||||
nav_order: 7
|
||||
---
|
||||
|
||||
# Callouts
|
||||
|
||||
Markdown does not include support for callouts. However, you can style text as a callout using a Markdown extension supported by kramdown: [*block IALs*](https://kramdown.gettalong.org/quickref.html#block-attributes).
|
||||
|
||||
Common kinds of callouts include `admonition`, `attention`, `caution`, `danger`, `error`, `hint`, `important`, `note`, `tip`, and `warning`.
|
||||
|
||||
When you have [configured]({{ site.baseurl }}{% link docs/configuration.md %}#callouts) the `color` and (optional) `title` for a callout, you can apply it to a paragraph, or to a block quote with several paragraphs, as illustrated below.[^postfix]
|
||||
|
||||
[^postfix]:
|
||||
You can put the callout markup either before or after its content.
|
||||
|
||||
#### An untitled callout
|
||||
{: .no_toc }
|
||||
|
||||
```markdown
|
||||
{: .highlight }
|
||||
A paragraph
|
||||
```
|
||||
|
||||
#### A single paragraph callout
|
||||
{: .no_toc }
|
||||
|
||||
```markdown
|
||||
{: .note }
|
||||
A paragraph
|
||||
```
|
||||
|
||||
```markdown
|
||||
{: .note-title }
|
||||
> My note title
|
||||
>
|
||||
> A paragraph with a custom title callout
|
||||
```
|
||||
|
||||
#### A multi-paragraph callout
|
||||
{: .no_toc }
|
||||
|
||||
```markdown
|
||||
{: .important }
|
||||
> A paragraph
|
||||
>
|
||||
> Another paragraph
|
||||
>
|
||||
> The last paragraph
|
||||
```
|
||||
|
||||
```markdown
|
||||
{: .important-title }
|
||||
> My important title
|
||||
>
|
||||
> A paragraph
|
||||
>
|
||||
> Another paragraph
|
||||
>
|
||||
> The last paragraph
|
||||
```
|
||||
|
||||
#### An indented callout
|
||||
{: .no_toc }
|
||||
|
||||
```markdown
|
||||
> {: .hint }
|
||||
A paragraph
|
||||
```
|
||||
|
||||
#### Indented multi-paragraph callouts
|
||||
{: .no_toc }
|
||||
|
||||
```markdown
|
||||
> {: .attention }
|
||||
> > A paragraph
|
||||
> >
|
||||
> > Another paragraph
|
||||
> >
|
||||
> > The last paragraph
|
||||
```
|
||||
|
||||
#### Nested callouts
|
||||
{: .no_toc }
|
||||
|
||||
```markdown
|
||||
{: .important }
|
||||
> {: .warning }
|
||||
> A paragraph
|
||||
```
|
||||
|
||||
#### Opaque background
|
||||
{: .no_toc }
|
||||
|
||||
```markdown
|
||||
{: .important }
|
||||
> {: .opaque }
|
||||
> <div markdown="block">
|
||||
> {: .warning }
|
||||
> A paragraph
|
||||
> </div>
|
||||
```
|
Reference in New Issue
Block a user