diff options
Diffstat (limited to 'riki.md')
-rw-r--r-- | riki.md | 114 |
1 files changed, 67 insertions, 47 deletions
@@ -334,7 +334,7 @@ then AST of site/page.mdwn matches that of output/page.html * [x] done ~~~ -## Definition list +### Definition list _Requirement: Markup indicating use of a definition list should be flagged as an error._ @@ -380,40 +380,7 @@ foo ~~~ -## Input files other than Markdown - -_Requirement: Input files that aren't Markdown files must be copied -into the destination directory as-is._ - -~~~scenario -given an installed riki -given file site/image.jpg from image -when I run riki build --plain-body site output -then files site/image.jpg and output/image.jpg match -~~~ - - -~~~{#image .file} -# Dummy -Pretend this is an image. -~~~ - -## Input files in sub=directories - -_Requirement: If an source page or file is in a sub-directory, it -should be put in the corresponding sub-directory in the target -directory._ - -~~~scenario -given an installed riki -given file site/foo/page.mdwn from image -given file site/bar/image.jpg from para -when I run riki build --plain-body site output -then AST of site/foo/page.mdwn matches that of output/foo/page.html -then files site/bar//image.jpg and output/bar/image.jpg match -~~~ - -## Wiki links to other pages on the site +### Wiki links to other pages on the site _Requirement: Pages can link to other pages on the site, the same way ikiwiki does, including subpages._ @@ -442,7 +409,7 @@ Note the uppercase link to the `child` page in the test page below. [[CHILD]] ~~~ -## Wiki links to pages that don't exist +### Wiki links to pages that don't exist _Requirement: Linking to a page that doesn't exist is an error._ @@ -459,6 +426,27 @@ then command fails ## Directives +### `img` + +_Requirement: the `img` directive embeds an image in the generated +HTML page._ + +~~~scenario +given an installed riki +given file site/index.mdwn from img +given file site/img.jpg from jpeg +when I run riki build site output +then file output/index.html contains "<img src="img.jpg"" +~~~ + +~~~{#img .file .markdown} +[[!img img.jpg]]] +~~~ + +~~~{#jpeg .file} +This is a dummy JPEG image. +~~~ + ### `meta title` _Requirement: the `meta title` directive sets page title._ @@ -474,25 +462,22 @@ then file output/index.html contains "<title>Yo</title>" [[!meta title=Yo]]] ~~~ -### `img` +### `shortcut` -_Requirement: the `img` directive embeds an image in the generated -HTML page._ +_Requirement: the `shortcut` directive created a shortcut that looks +like a directive._ ~~~scenario given an installed riki -given file site/index.mdwn from img -given file site/img.jpg from jpeg +given file site/index.mdwn from shortcut when I run riki build site output -then file output/index.html contains "<img src="img.jpg"" +then file output/index.html contains "<a href="https://example.com/foo/123">foo!123</a>" ~~~ -~~~{#img .file .markdown} -[[!img img.jpg]]] -~~~ +~~~{#shortcut .file .markdown} +[[!shortcut name="foo" url="https://example.com/foo/%s" desc="foo!%s"]] -~~~{#jpeg .file} -This is a dummy JPEG image. +[[!foo 123]] ~~~ ## Source file tree @@ -530,6 +515,41 @@ then stdout doesn't contain "index.mdwn~" then stdout doesn't contain "#index.mdwn#" ~~~ + + +## Input files other than Markdown + +_Requirement: Input files that aren't Markdown files must be copied +into the destination directory as-is._ + +~~~scenario +given an installed riki +given file site/image.jpg from image +when I run riki build --plain-body site output +then files site/image.jpg and output/image.jpg match +~~~ + + +~~~{#image .file} +# Dummy +Pretend this is an image. +~~~ + +## Input files in sub-directories + +_Requirement: If an source page or file is in a sub-directory, it +should be put in the corresponding sub-directory in the target +directory._ + +~~~scenario +given an installed riki +given file site/foo/page.mdwn from image +given file site/bar/image.jpg from para +when I run riki build --plain-body site output +then AST of site/foo/page.mdwn matches that of output/foo/page.html +then files site/bar//image.jpg and output/bar/image.jpg match +~~~ + ## Output directory tree ### No markdown files in output tree |