I changed the way I create links to use references to a data YML file instead of relying on the capture tag and including reference to the file with the captions. Using the capture tag was highly susceptible to broken links and way too manual. See the Links topic for more detail about the new method.

This commit is contained in:
Tom Johnson
2015-09-13 16:33:16 -07:00
parent a24859dc66
commit 445b1d1f44
59 changed files with 14296 additions and 14054 deletions

View File

@ -5,18 +5,9 @@ keywords: notes, tips, cautions, warnings, admonitions
last_updated: August 12, 2015
summary: "You can insert notes, tips, warnings, and important alerts in your content. These notes are stored as shortcodes made available through the linksrefs.hmtl include."
---
{% include linkrefs.html %}
## About alerts
Alerts are little warnings, info, or other messages that you have called out in special formatting. In order to use these alerts or callouts, put this include at the top of your page, just below your frontmatter:
{%raw%}
```liquid
{% include linkrefs.html %}
```
{%endraw%}
Then insert any an alert or callout as described in the following sections.
Alerts are little warnings, info, or other messages that you have called out in special formatting. In order to use these alerts or callouts, just reference the appropriate value stored in the alerts.yml file as described in the following sections.
## Alerts
@ -25,21 +16,21 @@ You can insert an alert by using any of the following code.
{%raw%}
alert | code
------|---------
note | {{note}} your note {{end}}
tip | {{tip}} your tip {{end}}
warning | {{warning}} your warning {{end}}
important | {{important}} your important info {{end}}
note | {{site.data.alerts.note}} your note {{site.data.alerts.end}}
tip | {{site.data.alerts.tip}} your tip {{site.data.alerts.end}}
warning | {{site.data.alerts.warning}} your warning {{site.data.alerts.end}}
important | {{site.data.alerts.important}} your important info {{site.data.alerts.end}}
{%endraw%}
The following demonstrate the formatting associated with each alert.
{{tip}} Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. {{end}}
{{site.data.alerts.tip}} Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. {{site.data.alerts.end}}
{{note}} Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. {{end}}
{{site.data.alerts.note}} Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. {{site.data.alerts.end}}
{{important}} Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. {{end}}
{{site.data.alerts.important}} Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. {{site.data.alerts.end}}
{{warning}} Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. {{end}}
{{site.data.alerts.warning}} Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. {{site.data.alerts.end}}
## Callouts
@ -48,40 +39,38 @@ In contrast to the alerts, the callouts don't have a pre-coded bold-formatted pr
{%raw%}
callout | code
------|---------
callout_default | {{callout_default}} your callout_default content {{end}}
callout_primary | {{callout_primary}} your callout_primary content {{end}}
callout_success | {{callout_success}} your callout_success content {{end}}
callout_primary | {{callout_primary}} your callout_primary content {{end}}
callout_warning | {{callout_warning}} your callout_warning content {{end}}
callout_info | {{callout_info}} your callout_info content {{end}}
callout_default | {{site.data.alerts.callout_default}} your callout_default content {{site.data.alerts.end}}
callout_primary | {{site.data.alerts.callout_primary}} your callout_primary content {{site.data.alerts.end}}
callout_success | {{site.data.alerts.callout_success}} your callout_success content {{site.data.alerts.end}}
callout_warning | {{site.data.alerts.callout_warning}} your callout_warning content {{site.data.alerts.end}}
callout_info | {{site.data.alerts.callout_info}} your callout_info content {{site.data.alerts.end}}
{%endraw%}
The following demonstrate the formatting for each callout.
{{callout_danger}}<b>callout_danger</b>: Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.
{{end}}
{{site.data.alerts.callout_danger}}<b>callout_danger</b>: Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.
{{site.data.alerts.end}}
{{callout_default}}
{{site.data.alerts.callout_default}}
<b>callout_default</b>: Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.
{{end}}
{{site.data.alerts.end}}
{{callout_primary}}
{{site.data.alerts.callout_primary}}
<b>calloutprimary</b>: Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.
{{end}}
{{site.data.alerts.end}}
{{callout_success}}
{{site.data.alerts.callout_success}}
<b>calloutsuccess</b>: Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.
{{end}}
{{site.data.alerts.end}}
{{callout_info}}
{{site.data.alerts.callout_info}}
<b>calloutinfo</b>: Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.
{{end}}
{{site.data.alerts.end}}
{{callout_warning}}
{{site.data.alerts.callout_warning}}
<b>calloutwarning</b>: Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.
{{end}}
{{site.data.alerts.end}}
## Blast a warning to users
@ -90,5 +79,5 @@ If you want to blast a warning to users on every page, add the alert or callout
## Using Markdown inside of notes
You can't use Markdown formatting inside notes.
You can't use Markdown formatting inside alerts. This is because the alerts leverage HTML, and you can't use Markdown inside of HTML tags.