|
@@ -31,6 +31,40 @@
|
|
If you&rsquo;re not familiar with writing markdown, there are a number of tutorials available.</description>
|
|
If you&rsquo;re not familiar with writing markdown, there are a number of tutorials available.</description>
|
|
</item>
|
|
</item>
|
|
|
|
|
|
|
|
+ <item>
|
|
|
|
+ <title>Expandable sections</title>
|
|
|
|
+ <link>/patterns/writing/expandable-sections/</link>
|
|
|
|
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
|
|
|
+
|
|
|
|
+ <guid>/patterns/writing/expandable-sections/</guid>
|
|
|
|
+ <description>In some cases, where there is a lot of content, it&rsquo;s helpful to collapse certain sections. That way, readers get an overview of what&rsquo;s in the content and can choose where to focus in. Infusion provides a shortcode method for creating expandable sections which generates accessible markup using aria-expanded.
|
|
|
|
+The expandable shortcode takes three parameters:
|
|
|
|
+ label — This is the label for the the section heading. level — This is the heading level (e.</description>
|
|
|
|
+ </item>
|
|
|
|
+
|
|
|
|
+ <item>
|
|
|
|
+ <title>Code blocks</title>
|
|
|
|
+ <link>/patterns/code/code-blocks/</link>
|
|
|
|
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
|
|
|
+
|
|
|
|
+ <guid>/patterns/code/code-blocks/</guid>
|
|
|
|
+ <description>Markdown already supports code samples both inline (using single backticks like `some code here`) and in blocks. Infusion will syntax highlight HTML, CSS, and JavaScript if you provide the correct language in the formulation of the block.
|
|
|
|
+So, this&hellip;
|
|
|
|
+```html &lt;button aria-pressed="false"toggle me&lt;/button ``` &hellip; will result in this:
|
|
|
|
+&lt;button aria-pressed=&quot;false&quot;&gt;toggle me&lt;/button&gt; Note that the syntax highlighting uses a greyscale theme. Infusion is careful not to use color as part of its own design, because these colors may clash with those of the design being illustrated and discussed.</description>
|
|
|
|
+ </item>
|
|
|
|
+
|
|
|
|
+ <item>
|
|
|
|
+ <title>CodePen embedding</title>
|
|
|
|
+ <link>/patterns/code/codepen-embedding/</link>
|
|
|
|
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
|
|
|
+
|
|
|
|
+ <guid>/patterns/code/codepen-embedding/</guid>
|
|
|
|
+ <description>Sometimes just pictures of the pattern you&rsquo;re documenting aren&rsquo;t enough. Interactive patterns benefit from live demos, so that readers can test their functionality.
|
|
|
|
+Infusion offers a couple of ways to do this. The first is by embedding CodePen demos into the content. The codePen shortcode takes just one argument: the codePen&rsquo;s ID.
|
|
|
|
+&#x7b;{% codePen VpVNKW %}} This will embed the identified codePen into the content wherever you placed the shortcode, with the result view showing by default:</description>
|
|
|
|
+ </item>
|
|
|
|
+
|
|
<item>
|
|
<item>
|
|
<title>Including images</title>
|
|
<title>Including images</title>
|
|
<link>/patterns/writing/including-images/</link>
|
|
<link>/patterns/writing/including-images/</link>
|
|
@@ -55,10 +89,10 @@ brew install hugo Alternatively, you can manually install Hugo from a package. Y
|
|
|
|
|
|
<item>
|
|
<item>
|
|
<title>Library setup</title>
|
|
<title>Library setup</title>
|
|
- <link>/patterns/project-setup/</link>
|
|
|
|
|
|
+ <link>/patterns/library-setup/</link>
|
|
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
|
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
|
|
|
|
|
- <guid>/patterns/project-setup/</guid>
|
|
|
|
|
|
+ <guid>/patterns/library-setup/</guid>
|
|
<description>By now, you should have followed the Installation instructions. You should have Hugo and Node installed, and a local copy of a forked version of Infusion. You should also have run npm install in the root of that codebase.
|
|
<description>By now, you should have followed the Installation instructions. You should have Hugo and Node installed, and a local copy of a forked version of Infusion. You should also have run npm install in the root of that codebase.
|
|
&ldquo;Cleaning&rdquo; the content folder Before you can start documenting patterns, there are a few things still to do in order to get set up. At the moment, your version of Infusion is a facsimile of the original, containing all this documentation content.</description>
|
|
&ldquo;Cleaning&rdquo; the content folder Before you can start documenting patterns, there are a few things still to do in order to get set up. At the moment, your version of Infusion is a facsimile of the original, containing all this documentation content.</description>
|
|
</item>
|
|
</item>
|
|
@@ -79,8 +113,8 @@ Notes You may wish to pick out some content in your pattern&rsquo;s document
|
|
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
|
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
|
|
|
|
|
<guid>/patterns/writing/references/</guid>
|
|
<guid>/patterns/writing/references/</guid>
|
|
- <description>Cross-references Infusion provides an easy mechanism to cross-reference patterns, by name, using the pattern shortcode. For example, I can reference the pattern here. Here&rsquo;s what the markdown looks like, including the shortcode:
|
|
|
|
-I can reference the &#x7b;{% pattern "Notes and warnings" %}} pattern here. This saves you having to worry about pathing and decorates the generated link with a bookmark icon, identifying the link as a pattern reference visually.</description>
|
|
|
|
|
|
+ <description>Cross-references Infusion provides an easy mechanism to cross-reference patterns, by title, using the pattern shortcode. For example, I can reference the Notes &amp; warnings pattern. Here&rsquo;s what the markdown looks like, including the shortcode:
|
|
|
|
+I can reference the &#x7b;{% pattern "Notes & warnings" %}} pattern here. This saves you having to worry about pathing and decorates the generated link with a bookmark icon, identifying the link as a pattern reference visually.</description>
|
|
</item>
|
|
</item>
|
|
|
|
|
|
<item>
|
|
<item>
|
|
@@ -94,5 +128,15 @@ npm run serve This will serve your working library on localhost:1313. Whenever y
|
|
Publishing on Github Pages The easiest way to host your pattern library so you have a link to share is to run the host command.</description>
|
|
Publishing on Github Pages The easiest way to host your pattern library so you have a link to share is to run the host command.</description>
|
|
</item>
|
|
</item>
|
|
|
|
|
|
|
|
+ <item>
|
|
|
|
+ <title>Writing inline demos</title>
|
|
|
|
+ <link>/patterns/code/writing-inline-demos/</link>
|
|
|
|
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
|
|
|
+
|
|
|
|
+ <guid>/patterns/code/writing-inline-demos/</guid>
|
|
|
|
+ <description>There are some issues with CodePen embedding , like them not working offline. They also come with CodePen branding, which will clash with the pattern you&rsquo;re trying to illustrate.
|
|
|
|
+Infusion offers another option: a special demo shortcode that allows you to write HTML, CSS, and JavaScript directly into the markdown file. The outputted demo is encapsulated using Shadow DOM, so you don&rsquo;t have to worry about broken styles and global JS.</description>
|
|
|
|
+ </item>
|
|
|
|
+
|
|
</channel>
|
|
</channel>
|
|
</rss>
|
|
</rss>
|