added sub-chapters

master
Kenton Hamaluik 5 years ago
parent 153981379b
commit 628426bed9

2
Cargo.lock generated

@ -411,7 +411,7 @@ dependencies = [
[[package]]
name = "mkbook"
version = "0.1.0"
version = "0.2.0"
dependencies = [
"askama 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"chrono 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)",

@ -1,6 +1,6 @@
[package]
name = "mkbook"
version = "0.1.0"
version = "0.2.0"
authors = ["Kenton Hamaluik <kenton@hamaluik.ca>"]
edition = "2018"
build = "build.rs"

@ -12,5 +12,9 @@
<title>arrow-up</title>
<path fill="currentColor" d="M34.9 289.5l-22.2-22.2c-9.4-9.4-9.4-24.6 0-33.9L207 39c9.4-9.4 24.6-9.4 33.9 0l194.3 194.3c9.4 9.4 9.4 24.6 0 33.9L413 289.4c-9.5 9.5-25 9.3-34.3-.4L264 168.6V456c0 13.3-10.7 24-24 24h-32c-13.3 0-24-10.7-24-24V168.6L69.2 289.1c-9.3 9.8-24.8 10-34.3.4z"></path>
</symbol>
<symbol id="icon-list-ol" viewBox="0 0 448 512">
<title>list-ol</title>
<path fill="currentColor" d="M61.77 401l17.5-20.15a19.92 19.92 0 0 0 5.07-14.19v-3.31C84.34 356 80.5 352 73 352H16a8 8 0 0 0-8 8v16a8 8 0 0 0 8 8h22.83a157.41 157.41 0 0 0-11 12.31l-5.61 7c-4 5.07-5.25 10.13-2.8 14.88l1.05 1.93c3 5.76 6.29 7.88 12.25 7.88h4.73c10.33 0 15.94 2.44 15.94 9.09 0 4.72-4.2 8.22-14.36 8.22a41.54 41.54 0 0 1-15.47-3.12c-6.49-3.88-11.74-3.5-15.6 3.12l-5.59 9.31c-3.72 6.13-3.19 11.72 2.63 15.94 7.71 4.69 20.38 9.44 37 9.44 34.16 0 48.5-22.75 48.5-44.12-.03-14.38-9.12-29.76-28.73-34.88zM496 224H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0-160H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16V80a16 16 0 0 0-16-16zm0 320H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zM16 160h64a8 8 0 0 0 8-8v-16a8 8 0 0 0-8-8H64V40a8 8 0 0 0-8-8H32a8 8 0 0 0-7.14 4.42l-8 16A8 8 0 0 0 24 64h8v64H16a8 8 0 0 0-8 8v16a8 8 0 0 0 8 8zm-3.91 160H80a8 8 0 0 0 8-8v-16a8 8 0 0 0-8-8H41.32c3.29-10.29 48.34-18.68 48.34-56.44 0-29.06-25-39.56-44.47-39.56-21.36 0-33.8 10-40.46 18.75-4.37 5.59-3 10.84 2.8 15.37l8.58 6.88c5.61 4.56 11 2.47 16.12-2.44a13.44 13.44 0 0 1 9.46-3.84c3.33 0 9.28 1.56 9.28 8.75C51 248.19 0 257.31 0 304.59v4C0 316 5.08 320 12.09 320z"></path>
</symbol>
</defs>
</svg>

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

@ -0,0 +1,631 @@
%YAML 1.2
---
# http://www.sublimetext.com/docs/3/syntax.html
name: SCSS
file_extensions:
- scss
scope: source.scss
variables:
unicode: '\\\h{1,6}[ \t\n\f]?'
escape: '(?:{{unicode}}|\\[^\n\f\h])'
nonascii: '[\p{L}\p{M}\p{S}\p{N}&&[^[:ascii:]]]'
nmstart: '(?:[[_a-zA-Z]{{nonascii}}]|{{escape}})'
nmchar: '(?:[[-\w]{{nonascii}}]|{{escape}})'
ident: '(?:--{{nmchar}}+|-?{{nmstart}}{{nmchar}}*)'
combinators: '(?:>{1,3}|[~+])'
element_names: '\b(a|abbr|acronym|address|applet|area|article|aside|audio|b|base|basefont|bdi|bdo|big|blockquote|body|br|button|canvas|caption|cite|code|col|colgroup|content|data|datalist|dd|del|details|dfn|dir|dialog|div|dl|dt|element|em|embed|eventsource|fieldset|figure|figcaption|footer|form|frame|frameset|h[1-6]|head|header|hgroup|hr|html|i|iframe|img|input|ins|isindex|kbd|keygen|label|legend|li|link|main|map|mark|menu|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|picture|pre|progress|q|rp|rt|rtc|s|samp|script|section|select|shadow|small|source|span|strike|strong|style|sub|summary|sup|svg|table|tbody|td|template|textarea|tfoot|th|thead|time|title|tr|track|tt|u|ul|var|video|wbr|xmp|circle|clipPath|defs|ellipse|filter|foreignObject|g|glyph|glyphRef|image|line|linearGradient|marker|mask|path|pattern|polygon|polyline|radialGradient|rect|stop|switch|symbol|text|textPath|tref|tspan|use)\b'
custom_element_chars: |-
(?x:
[-_a-z0-9\x{00B7}]
| \\\.
| [\x{00C0}-\x{00D6}]
| [\x{00D8}-\x{00F6}]
| [\x{00F8}-\x{02FF}]
| [\x{0300}-\x{037D}]
| [\x{037F}-\x{1FFF}]
| [\x{200C}-\x{200D}]
| [\x{203F}-\x{2040}]
| [\x{2070}-\x{218F}]
| [\x{2C00}-\x{2FEF}]
| [\x{3001}-\x{D7FF}]
| [\x{F900}-\x{FDCF}]
| [\x{FDF0}-\x{FFFD}]
| [\x{10000}-\x{EFFFF}]
)
custom_elements: '\b([a-z](?:{{custom_element_chars}})*-(?:{{custom_element_chars}})*)\b(?!{{ident}})'
pseudo_elements: |-
(?x:
(:{1,2})(?:before|after|first-line|first-letter) # CSS1 & CSS2 require : or ::
| (::)(-(?:moz|ms|webkit)-)?(?:{{ident}}) # CSS3 requires ::
)\b
regular_pseudo_classes: '\b(active|any-link|blank|checked|current|default|defined|disabled|drop|empty|enabled|first|first-child|first-of-type|fullscreen|future|focus|focus-visible|focus-within|host|hover|indeterminate|in-range|invalid|last-child|last-of-type|left|link|local-link|only-child|only-of-type|optional|out-of-range|past|placeholder-shown|read-only|read-write|required|right|root|scope|target|target-within|user-invalid|valid|visited)\b(?![-])'
functional_pseudo_classes: '\b(dir|lang|matches|not|has|drop|nth-last-child|nth-child|nth-last-of-type|nth-of-type)\b'
contexts:
main:
- include: Sass.sublime-syntax#frontmatter
- include: Sass.sublime-syntax#comment-block
- include: Sass.sublime-syntax#comment-line
- include: Sass.sublime-syntax#selectors
- include: properties
- include: Sass.sublime-syntax#keyframe-operators
- include: Sass.sublime-syntax#interpolated-selectors
- include: Sass.sublime-syntax#custom-element-selectors
- include: at-rules
- include: curly-braces
- match: '\s*(,)\s*'
captures:
1: punctuation.separator.css
properties:
- include: Sass.sublime-syntax#comment-line
- include: Sass.sublime-syntax#comment-block
- match: '\b(font-family|font|family)\b(?=\s*:)'
scope: meta.property-name.css support.type.property-name.css
push:
- match: '(\s*)(;)'
pop: true
captures:
1: meta.property-value.css
2: punctuation.terminator.rule.css
- match: '(?=\s*[;})])'
pop: true
- match: ':'
scope: punctuation.separator.key-value.css
push:
- meta_content_scope: meta.property-value.css
- match: '(?=\s*([;})]))'
pop: true
- include: Sass.sublime-syntax#comment-line
- include: Sass.sublime-syntax#comment-block
- include: Sass.sublime-syntax#numeric-values
- include: Sass.sublime-syntax#property-value-constants
- include: Sass.sublime-syntax#var-function
- include: Sass.sublime-syntax#sass-maps
- include: Sass.sublime-syntax#sass-variables
- include: Sass.sublime-syntax#sass-functions
- include: Sass.sublime-syntax#sass-custom-functions
- match: '{{ident}}(\s+{{ident}})*\b(?!:)'
scope: string.unquoted.css
- include: Sass.sublime-syntax#literal-string
- include: Sass.sublime-syntax#unquoted-concatenated-string
- include: Sass.sublime-syntax#sass-operators
- match: '\s*(,)\s*'
captures:
1: punctuation.separator.css
- match: '(?={)'
pop: true
- match: ''
pop: true
- match: |-
\b(?x)(
display|width|background-color|height|position|font-family|font-weight
| top|opacity|cursor|background-image|right|visibility|box-sizing
| user-select|left|float|margin-left|margin-top|line-height
| padding-left|z-index|margin-bottom|margin-right|margin
| vertical-align|padding-top|white-space|border-radius|padding-bottom
| padding-right|padding|bottom|clear|max-width|box-shadow|content
| border-color|min-height|min-width|font-style|border-width
| border-collapse|background-size|text-overflow|max-height|text-transform
| text-shadow|text-indent|border-style|overflow-y|list-style-type
| word-wrap|border-spacing|appearance|zoom|overflow-x|border-top-left-radius
| border-bottom-left-radius|border-top-color|pointer-events
| border-bottom-color|align-items|justify-content|letter-spacing
| border-top-right-radius|border-bottom-right-radius|border-right-width
| font-smoothing|border-bottom-width|border-right-color|direction
| border-top-width|src|border-left-color|border-left-width
| tap-highlight-color|table-layout|background-clip|word-break
| transform-origin|resize|filter|backdrop-filter|backface-visibility|text-rendering
| box-orient|transition-property|transition-duration|word-spacing
| quotes|outline-offset|animation-timing-function|animation-duration
| animation-name|transition-timing-function|border-bottom-style
| border-bottom|transition-delay|transition|unicode-bidi|border-top-style
| border-top|unicode-range|list-style-position|orphans|outline-width
| line-clamp|order|flex-direction|box-pack|animation-fill-mode
| outline-color|list-style-image|list-style|touch-action|flex-grow
| border-left-style|border-left|animation-iteration-count
| page-break-inside|box-flex|box-align|page-break-after|animation-delay
| widows|border-right-style|border-right|flex-align|outline-style
| outline|background-origin|animation-direction|fill-opacity
| background-attachment|flex-wrap|transform-style|counter-increment
| overflow-wrap|counter-reset|animation-play-state|animation
| will-change|box-ordinal-group|image-rendering|mask-image|flex-flow
| background-position-y|stroke-width|background-position-x|background-position
| background-blend-mode|flex-shrink|flex-basis|flex-order|flex-item-align
| flex-line-pack|flex-negative|flex-pack|flex-positive|flex-preferred-size
| flex|user-drag|font-stretch|column-count|empty-cells|align-self
| caption-side|mask-size|column-gap|mask-repeat|box-direction
| font-feature-settings|mask-position|align-content|object-fit
| columns|text-fill-color|clip-path|stop-color|font-kerning
| page-break-before|stroke-dasharray|size|fill-rule|border-image-slice
| column-width|break-inside|column-break-before|border-image-width
| stroke-dashoffset|border-image-repeat|border-image-outset|line-break
| stroke-linejoin|stroke-linecap|stroke-miterlimit|stroke-opacity
| stroke|shape-rendering|border-image-source|border-image|border
| tab-size|writing-mode|perspective-origin-y|perspective-origin-x
| perspective-origin|perspective|text-align-last|text-align|clip-rule
| clip|text-anchor|column-rule-color|box-decoration-break|column-fill
| fill|column-rule-style|mix-blend-mode|text-emphasis-color
| baseline-shift|dominant-baseline|page|alignment-baseline
| column-rule-width|column-rule|break-after|font-variant-ligatures
| transform-origin-y|transform-origin-x|transform|object-position
| break-before|column-span|isolation|shape-outside|all
| color-interpolation-filters|marker|marker-end|marker-start
| marker-mid|color-rendering|color-interpolation|background-repeat-x
| background-repeat-y|background-repeat|background|mask-type
| flood-color|flood-opacity|text-orientation|mask-composite
| text-emphasis-style|paint-order|lighting-color|shape-margin
| text-emphasis-position|text-emphasis|shape-image-threshold
| mask-clip|mask-origin|mask|font-variant-caps|font-variant-alternates
| font-variant-east-asian|font-variant-numeric|font-variant-position
| font-variant|font-size-adjust|font-size|font-language-override
| font-display|font-synthesis|font|line-box-contain|text-justify
| text-decoration-color|text-decoration-style|text-decoration-line
| text-decoration|text-underline-position|grid-template-rows
| grid-template-columns|grid-template-areas|grid-template|rotate|scale
| translate|scroll-behavior|grid-column-start|grid-column-end
| grid-column-gap|grid-row-start|grid-row-end|grid-auto-rows
| grid-area|grid-auto-flow|grid-auto-columns|image-orientation
| hyphens|overflow-scrolling|overflow|color-profile|kerning
| nbsp-mode|color|image-resolution|grid-row-gap|grid-row|grid-column
| blend-mode|azimuth|pause-after|pause-before|pause|pitch-range|pitch
| text-height|system|negative|prefix|suffix|range|pad|fallback
| additive-symbols|symbols|speak-as|speak|grid-gap
)\b(?=\s*:)
scope: meta.property-name.css support.type.property-name.css
push:
- include: property-value-wrapper
- match: '(-(?:webkit|moz|ms|o)-)({{ident}})(?=\s*:)'
captures:
0: meta.property-name.css
1: support.type.vendor-prefix.css
2: support.type.property-name.css
push:
- include: property-value-wrapper
- match: '(\$)([a-zA-Z0-9_-][\w-]*)'
captures:
0: variable.declaration.sass
1: punctuation.definition.variable.sass
push:
- include: property-value-wrapper
- match: '(--)({{nmchar}}+)'
captures:
0: meta.property-name.css support.type.custom-property.css
1: punctuation.definition.custom-property.css
2: support.type.custom-property.name.css
push:
- include: property-value-wrapper
# Partial property names, split at "-"
# http://sass-lang.com/documentation/file.SASS_REFERENCE.html#nested_properties
- match: '\b(z|y|x|writing|wrap|word|will|width|white|weight|visibility|vertical|variant-position|variant-numeric|variant-ligatures|variant-east-asian|variant-caps|variant-alternates|variant|user|unicode|underline-position|underline|type|transition|transform|touch|top-width|top-style|top-right-radius|top-left-radius|top-color|top|timing-function|timing|threshold|text|template-rows|template-columns|template-areas|template|tap|table|tab|synthesis|symbols|style-type|style-position|style-image|style|stroke|stretch|stop|state|start|speak|span|spacing|space|source|smoothing|slice|sizing|size-adjust|size|side|shrink|shift|shape|shadow|settings|self|select|scrolling|scroll|rule-width|rule-style|rule-color|rule|rows|row-start|row-gap|row-end|row|right-width|right-style|right-radius|right-color|right|resolution|reset|repeat-y|repeat-x|repeat|rendering|range|radius|property|profile|preferred-size|preferred|positive|position-y|position-x|position|pointer|play-state|play|pitch|perspective|pause|path|paint|page|padding|pack|override|overflow|outside|outset|outline|origin-y|origin-x|origin|orientation|orient|ordinal-group|ordinal|order|opacity|offset|object|numeric|negative|nbsp|name|mode|mix|miterlimit|min|mid|max|mask|marker|margin|list|linejoin|linecap|line-pack|line|lighting|ligatures|letter|left-width|left-style|left-radius|left-color|left|layout|last|language-override|language|kerning|justify|iteration-count|iteration|items|item-align|item|interpolation-filters|interpolation|inside|index|indent|increment|image-width|image-threshold|image-source|image-slice|image-repeat|image-outset|image|highlight-color|highlight|height|grow|group|grid|gap|function|font|flow|flood|flex|fit|filters|fill-mode|fill-color|fill|feature-settings|feature|family|events|end|empty|emphasis-style|emphasis-position|emphasis-color|emphasis|duration|drag|dominant|display|direction|delay|decoration-style|decoration-line|decoration-color|decoration-break|decoration|dashoffset|dasharray|counter|count|content|contain|composite|columns|column-start|column-gap|column-end|column|color|collapse|clip|clamp|change|cells|caption|caps|break-inside|break-before|break-after|break|box-contain|box|bottom-width|bottom-style|bottom-color|bottom|border|blend-mode|blend|bidi|behavior|before|basis|baseline|background|backface|auto-rows|auto-flow|auto-columns|auto|attachment|as|areas|area|animation|anchor|alternates|alignment|align-last|align|after|adjust|additive|action)\b'
scope: meta.property-name.css support.type.property-name.css
push:
- include: property-value-wrapper
- match: '[a-zA-Z0-9_-]*((#)({)((\$)([a-zA-Z0-9_-][\w-]*))(}))[a-zA-Z0-9_-]*'
captures:
0: meta.property-name.css support.type.property-name
1: meta.group.interpolation.sass
2: punctuation.definition.variable.sass
3: punctuation.definition.group.begin.sass
4: variable.other.sass
5: punctuation.definition.variable.sass
7: punctuation.definition.group.end.sass
push:
- include: property-value-wrapper
property-value-wrapper:
- match: '(\s*)(;)'
pop: true
captures:
1: meta.property-value.css
2: punctuation.terminator.rule.css
- match: '(?=\s*[;})])'
pop: true
- match: '\s*(:)'
captures:
1: punctuation.separator.key-value.css
push:
- meta_content_scope: meta.property-value.css
- match: '(?=\s*[;})])'
pop: true
- include: Sass.sublime-syntax#property-values
- match: '(?={)'
pop: true
- match: ''
pop: true
at-rules:
- match: '(@)(each)\b'
scope: keyword.control.flow.sass
captures:
1: punctuation.definition.keyword.sass
push:
- meta_scope: meta.at-rule.each.sass
- include: Sass.sublime-syntax#sass-variables
- include: Sass.sublime-syntax#comma-delimiter
- match: '(?={)'
pop: true
- match: '\b(in)\b'
scope: keyword.operator.sass
push:
- match: '(?={)'
pop: true
- include: Sass.sublime-syntax#comment-block
- include: Sass.sublime-syntax#comment-line
- include: Sass.sublime-syntax#comma-delimiter
- include: Sass.sublime-syntax#var-function
- include: Sass.sublime-syntax#sass-variables
- include: Sass.sublime-syntax#sass-functions
- include: Sass.sublime-syntax#sass-custom-functions
- include: Sass.sublime-syntax#sass-interpolation
- include: Sass.sublime-syntax#sass-maps
- include: Sass.sublime-syntax#unquoted-string
- include: Sass.sublime-syntax#sass-operators
- match: '(@)(for|while)\b'
scope: keyword.control.flow.sass
captures:
1: punctuation.definition.keyword.sass
push:
- meta_scope: meta.at-rule.sass
- match: '(?={)'
pop: true
- include: Sass.sublime-syntax#sass-script-expression
- match: '(@)(if|else if|else)\b'
scope: keyword.control.flow.conditional.sass
captures:
1: punctuation.definition.keyword.sass
push:
- meta_scope: meta.at-rule.sass
- match: '(?={)'
pop: true
- include: Sass.sublime-syntax#sass-script-expression
- match: '(@)(debug|warn|error)\b'
scope: keyword.control.at-rule.sass
captures:
1: punctuation.definition.keyword.sass
push:
- meta_scope: meta.at-rule.sass
- match: '(;)'
scope: punctuation.terminator.rule.sass
pop: true
- include: Sass.sublime-syntax#sass-script-expression
- match: '(@)(at-root)\b'
scope: keyword.control.at-rule.at-root.sass
captures:
1: punctuation.definition.keyword.sass
- match: '(@)(extend)\b'
scope: keyword.control.at-rule.extend.sass
captures:
1: punctuation.definition.keyword.sass
push:
- meta_scope: meta.at-rule.extend.sass
- match: '(;)'
scope: punctuation.terminator.rule.sass
pop: true
- match: \!\s*(default|global|optional)
scope: keyword.other.sass
- include: Sass.sublime-syntax#selectors
- include: Sass.sublime-syntax#custom-element-selectors
- match: '((@)(mixin|function))\s+([\w-]+)'
captures:
1: keyword.control.at-rule.sass
2: punctuation.definition.keyword.sass
4: entity.name.function.sass
push:
- meta_scope: meta.function.declaration.sass
- match: '\s*(?=[\{;])'
pop: true
- match: '\('
scope: punctuation.definition.group.begin.sass
push:
- meta_scope: meta.function.parameters.sass
- match: '\)'
scope: punctuation.definition.group.end.sass
pop: true
- include: Sass.sublime-syntax#comma-delimiter
- match: '(\$)([a-zA-Z0-9_-][\w-]*)'
scope: variable.parameter.sass
captures:
1: punctuation.definition.variable.sass
push:
- match: '(?=[,\)])'
pop: true
- match: ':'
scope: punctuation.separator.key-value.css
- match: '\b(false|true|null)\b'
scope: constant.language.sass
- include: Sass.sublime-syntax#property-values
- match: '\{'
scope: punctuation.section.property-list.begin.sass
push:
- match: '\}'
scope: punctuation.section.property-list.end.sass
pop: true
- include: main
- match: '((@)(include))\s+([\w-]+)'
captures:
0: variable.function.sass
1: keyword.control.at-rule.sass
2: punctuation.definition.keyword.sass
push:
- meta_scope: meta.function-call.sass
- match: '\s*(;)'
captures:
1: punctuation.terminator.rule.sass
pop: true
- match: '\s*(?=[\{;])'
pop: true
- match: '\('
scope: punctuation.definition.group.begin.sass
push:
- meta_scope: meta.function-call.arguments.sass
- include: Sass.sublime-syntax#comment-block
- include: Sass.sublime-syntax#comment-line
- include: Sass.sublime-syntax#sass-variables
- include: Sass.sublime-syntax#sass-functions
- include: Sass.sublime-syntax#sass-operators
- include: Sass.sublime-syntax#comma-delimiter
- include: Sass.sublime-syntax#property-values
- include: Sass.sublime-syntax#literal-string
- match: '{{ident}}'
scope: string.unquoted.sass
- include: Sass.sublime-syntax#selectors
- include: Sass.sublime-syntax#custom-element-selectors
- match: '\)'
scope: punctuation.definition.group.end.sass
pop: true
- match: '(@)(return)\b'
scope: keyword.control.at-rule.return.sass
captures:
1: punctuation.definition.keyword.sass
push:
- meta_scope: meta.at-rule.sass
- match: '\s*(;)'
captures:
1: punctuation.terminator.rule.css
pop: true
- include: Sass.sublime-syntax#property-values
- match: '((@)(?:-(?:webkit|moz|o)-)?(charset|namespace|font-face)\b)'
captures:
1: keyword.control.at-rule.css
2: punctuation.definition.keyword.css
push:
- meta_scope: meta.at-rule.css
- match: '\s*(;)'
captures:
1: punctuation.terminator.rule.sass
pop: true
- match: '\s*(?=[\{;])'
pop: true
- match: (url)(\()
captures:
1: meta.function-call.css support.function.url.css
2: punctuation.definition.group.begin.css
push:
- meta_scope: meta.group.css
- match: '\)'
scope: punctuation.definition.group.end.css
pop: true
- include: Sass.sublime-syntax#literal-string
- include: Sass.sublime-syntax#unquoted-string
- include: Sass.sublime-syntax#comment-block
- include: Sass.sublime-syntax#comment-line
- include: Sass.sublime-syntax#literal-string
- match: '\s*((@)counter-style\b)\s+(?:(?i:\b(decimal|none)\b)|({{ident}}))?\s*(?=\{|$)'
captures:
1: keyword.control.at-rule.counter-style.css
2: punctuation.definition.keyword.css
3: invalid.illegal.counter-style-name.css
4: entity.other.counter-style-name.css
push:
- meta_scope: meta.at-rule.counter-style.css
- include: Sass.sublime-syntax#comment-block
- include: Sass.sublime-syntax#comment-line
- match: '(?=\{)'
pop: true
- match: '(?=\s*@custom-media\b)'
push:
- match: ;
scope: punctuation.terminator.css
pop: true
- match: \s*((@)custom-media)
captures:
1: keyword.control.at-rule.custom-media.css
2: punctuation.definition.keyword.css
3: support.constant.custom-media.css
push:
- meta_scope: meta.at-rule.custom-media.css
- match: \s*(?=;)
pop: true
- include: media-query
- match: '((@)document)'
captures:
1: keyword.control.at-rule.document.css
2: punctuation.definition.keyword.css
push:
- meta_scope: meta.at-rule.document.css
- match: '(?=[\{;])'
pop: true
- include: Sass.sublime-syntax#comment-block
- include: Sass.sublime-syntax#comment-line
- include: Sass.sublime-syntax#url-function
- include: Sass.sublime-syntax#url-prefix-function
- include: Sass.sublime-syntax#domain-function
- include: Sass.sublime-syntax#regexp-function
- include: Sass.sublime-syntax#comma-delimiter
- match: '\s*((@)import\b)\s*'
captures:
1: keyword.control.at-rule.import.css
2: punctuation.definition.keyword.css
push:
- meta_scope: meta.at-rule.import.css
- match: ';'
scope: punctuation.terminator.rule.sass
pop: true
- match: '(\()(reference|inline|less|css|once|multiple|optional)(\))'
captures:
0: meta.at-rule.arguments.sass
1: punctuation.definition.group.begin.sass
2: constant.other.sass
3: punctuation.definition.group.end.sass
- include: Sass.sublime-syntax#comment-block
- include: Sass.sublime-syntax#comment-line
- include: Sass.sublime-syntax#literal-string
- include: Sass.sublime-syntax#url-function
- include: media-query
- match: '\s*((@)(-webkit-|-moz-|-o-)?keyframes)'
captures:
1: keyword.control.at-rule.keyframe.css
2: punctuation.definition.keyword.css
push:
- meta_scope: meta.at-rule.keyframe.css
- match: '\s*(?=[\{;])'
pop: true
- include: Sass.sublime-syntax#comment-block
- include: Sass.sublime-syntax#comment-line
- include: Sass.sublime-syntax#sass-interpolation
- match: '\s*({{ident}})?'
captures:
1: entity.other.animation-name.css
- match: '\s*(?:(,)|(?=[{;]))'
captures:
1: punctuation.definition.arbitrary-repetition.css
- match: '\s*((@)media)\b'
captures:
1: keyword.control.at-rule.media.css
2: punctuation.definition.keyword.css
3: support.constant.media.css
push:
- meta_scope: meta.at-rule.media.css
- include: media-query
- match: '(?=\{)'
pop: true
- match: '\s*((@)namespace)\s+({{ident}}(?!{{nmchar}}|\())?'
captures:
1: keyword.control.at-rule.namespace.css
2: punctuation.definition.keyword.css
3: entity.other.namespace-prefix.css
push:
- meta_scope: meta.at-rule.namespace.css
- include: at-rule-punctuation
- include: Sass.sublime-syntax#literal-string
- include: Sass.sublime-syntax#url-function
- include: Sass.sublime-syntax#comment-block
- include: Sass.sublime-syntax#comment-line
- match: '\s*((@)page)\s*(?:(:)(first|left|right))?\s*'
captures:
1: keyword.control.at-rule.page.css
2: punctuation.definition.keyword.css
3: punctuation.definition.entity.css
4: entity.other.pseudo-class.css
push:
- meta_scope: meta.at-rule.page.css
- include: Sass.sublime-syntax#comment-block
- include: Sass.sublime-syntax#comment-line
- match: '\s*(?=\{)'
pop: true
- match: '((@)supports)'
captures:
1: keyword.control.at-rule.supports.css
2: punctuation.definition.keyword.css
push:
- meta_scope: meta.at-rule.supports.css
- match: '(?=\{)'
pop: true
- include: Sass.sublime-syntax#at-supports-operators
- include: at-supports-parens
- match: '((@)content)'
captures:
1: keyword.control.at-rule.content.sass
2: punctuation.definition.keyword.sass
push:
- match: ';'
scope: punctuation.terminator.rule.sass
pop: true
- match: '(?=$)'
pop: true
at-supports-parens:
- match: '\('
scope: punctuation.definition.group.begin.css
push:
- meta_scope: meta.group.css
- match: '\)'
scope: punctuation.definition.group.end.css
pop: true
- include: Sass.sublime-syntax#at-supports-operators
- include: at-supports-parens
- include: Sass.sublime-syntax#comment-block
- include: Sass.sublime-syntax#comment-line
- include: properties
at-rule-punctuation:
- match: ';'
scope: punctuation.terminator.rule.css
- match: '(?=;|$)'
pop: true
media-query:
- include: Sass.sublime-syntax#comment-block
- include: Sass.sublime-syntax#comment-line
- match: \b(?i:all|aural|braille|embossed|handheld|print|projection|screen|speech|tty|tv)\b
scope: support.constant.media.css
- match: '\b(?i:and|or|not|only)\b'
scope: keyword.operator.logic.media.css
- match: ','
scope: punctuation.definition.arbitrary-repetition.css
- match: \(
scope: punctuation.definition.group.begin.css
push:
- match: \)
scope: punctuation.definition.group.end.css
pop: true
- include: Sass.sublime-syntax#comment-block
- include: Sass.sublime-syntax#comment-line
- match: |-
(?x)
(
(-webkit-|-o-)?
((min|max)-)?
(-moz-)?
(
((device-)?(height|width|aspect-ratio|pixel-ratio))|
(color(-index)?)|monochrome|resolution
)
)|grid|scan|orientation
\s*(?=[:)])
captures:
0: support.type.property-name.media.css
2: support.type.vendor-prefix.css
5: support.type.vendor-prefix.css
push:
- match: (:)|(?=\))
captures:
1: punctuation.separator.key-value.css
pop: true
- match: \b(portrait|landscape|progressive|interlace)
scope: support.constant.property-value.css
- match: \s*(\d+)(/)(\d+)
captures:
1: constant.numeric.css
2: keyword.operator.arithmetic.css
3: constant.numeric.css
- include: Sass.sublime-syntax#numeric-values
- include: Sass.sublime-syntax#sass-value-expression
curly-braces:
- match: '\{'
scope: punctuation.section.property-list.begin.css
- match: '\}'
scope: punctuation.section.property-list.end.css

File diff suppressed because it is too large Load Diff

@ -1,157 +0,0 @@
---
title = "Markdown"
---
_mkbook_ nominally utilizes [CommonMark](https://commonmark.org/) with some [GFM](https://github.github.com/gfm/) extensions through the use of the [comrak](https://crates.io/crates/comrak) crate. In using _comrak_, a specific set of options are used, which are listed here:
```rust
let options: ComrakOptions = ComrakOptions {
hardbreaks: false,
smart: true,
github_pre_lang: false,
default_info_string: None,
unsafe_: true,
ext_strikethrough: true,
ext_tagfilter: false,
ext_table: true,
ext_autolink: true,
ext_tasklist: true,
ext_superscript: true,
ext_header_ids: Some("header".to_owned()),
ext_footnotes: true,
ext_description_lists: true,
..ComrakOptions::default()
};
```
Mostly, know that the following extensions are enabled:
* [Strikethrough](https://github.github.com/gfm/#strikethrough-extension-)
* [Tables](https://github.github.com/gfm/#tables-extension-)
* [Autolinks](https://github.github.com/gfm/#autolinks-extension-)
* [Task Lists](https://github.github.com/gfm/#task-list-items-extension-)
* Superscripts (`e = mc^2^.` → `e = mc<sup>2</sup>.`)
* [Footnotes](https://kramdown.gettalong.org/syntax.html#footnotes)
* Description Lists:
```md
First term
: Details for the **first term**
Second term
: Details for the **second term**
More details in second paragraph.
```
## Syntax Highlight
GFM syntax highlighting is also available by using fenced code tags with a label denoting the language, as such:
~~~md
```c++
#include <stdio>
int main() {
std::cout << "Hello, world!" << std::endl;
return 0;
}
```
~~~
which results in:
```c++
#include <stdio>
int main() {
std::cout << "Hello, world!" << std::endl;
return 0;
}
```
To denote the language you can either use one the language's extensions as the label, or the full name of the language (which is **not** case-sensitive).
The list of supported languages is currently as follows:
| Language Name | Supported Tags / Extensions |
|:-|:-|
| ASP | `asa` |
| ActionScript | `as` |
| AppleScript | `applescript`, `script editor` |
| Batch File | `bat`, `cmd` |
| BibTeX | `bib` |
| Bourne Again Shell (bash) | `sh`, `bash`, `zsh`, `fish`, `.bash_aliases`, `.bash_completions`, `.bash_functions`, `.bash_login`, `.bash_logout`, `.bash_profile`, `.bash_variables`, `.bashrc`, `.profile`, `.textmate_init` |
| C | `c`, `h` |
| C# | `cs`, `csx` |
| C++ | `cpp`, `cc`, `cp`, `cxx`, `c++`, `C`, `h`, `hh`, `hpp`, `hxx`, `h++`, `inl`, `ipp` |
| CSS | `css`, `css.erb`, `css.liquid` |
| Cargo Build Results | `` |
| Clojure | `clj` |
| D | `d`, `di` |
| Diff | `diff`, `patch` |
| Erlang | `erl`, `hrl`, `Emakefile`, `emakefile` |
| Go | `go` |
| Graphviz (DOT) | `dot`, `DOT`, `gv` |
| Groovy | `groovy`, `gvy`, `gradle` |
| HTML (ASP) | `asp` |
| HTML (Erlang) | `yaws` |
| HTML (Rails) | `rails`, `rhtml`, `erb`, `html.erb` |
| HTML (Tcl) | `adp` |
| HTML | `html`, `htm`, `shtml`, `xhtml`, `inc`, `tmpl`, `tpl` |
| Haskell | `hs` |
| Haxe | `hx`, `hxsl`, `hscript` |
| Hxml | `hxml` |
| JSON | `json`, `sublime-settings`, `sublime-menu`, `sublime-keymap`, `sublime-mousemap`, `sublime-theme`, `sublime-build`, `sublime-project`, `sublime-completions`, `sublime-commands`, `sublime-macro`, `sublime-color-scheme` |
| Java Properties | `properties` |
| Java Server Page (JSP) | `jsp` |
| Java | `java`, `bsh` |
| JavaDoc | `` |
| JavaScript (Rails) | `js.erb` |
| JavaScript | `js`, `htc` |
| LaTeX Log | `` |
| LaTeX | `tex`, `ltx` |
| Lisp | `lisp`, `cl`, `clisp`, `l`, `mud`, `el`, `scm`, `ss`, `lsp`, `fasl` |
| Literate Haskell | `lhs` |
| Lua | `lua` |
| MATLAB | `matlab` |
| Make Output | `` |
| Makefile | `make`, `GNUmakefile`, `makefile`, `Makefile`, `OCamlMakefile`, `mak`, `mk` |
| Markdown | `md`, `mdown`, `markdown`, `markdn` |
| MultiMarkdown | `` |
| NAnt Build File | `build` |
| OCaml | `ml`, `mli` |
| OCamllex | `mll` |
| OCamlyacc | `mly` |
| Objective-C | `m`, `h` |
| Objective-C++ | `mm`, `M`, `h` |
| PHP Source | `` |
| PHP | `php`, `php3`, `php4`, `php5`, `php7`, `phps`, `phpt`, `phtml` |
| Pascal | `pas`, `p`, `dpr` |
| Perl | `pl`, `pm`, `pod`, `t`, `PL` |
| Plain Text | `txt` |
| Python | `py`, `py3`, `pyw`, `pyi`, `pyx`, `pyx.in`, `pxd`, `pxd.in`, `pxi`, `pxi.in`, `rpy`, `cpy`, `SConstruct`, `Sconstruct`, `sconstruct`, `SConscript`, `gyp`, `gypi`, `Snakefile`, `wscript` |
| R Console | `` |
| R | `R`, `r`, `s`, `S`, `Rprofile` |
| Rd (R Documentation) | `rd` |
| Regular Expression | `re` |
| Regular Expressions (Javascript) | `` |
| Regular Expressions (Python) | `` |
| Ruby Haml | `haml`, `sass` |
| Ruby on Rails | `rxml`, `builder` |
| Ruby | `rb`, `Appfile`, `Appraisals`, `Berksfile`, `Brewfile`, `capfile`, `cgi`, `Cheffile`, `config.ru`, `Deliverfile`, `Fastfile`, `fcgi`, `Gemfile`, `gemspec`, `Guardfile`, `irbrc`, `jbuilder`, `podspec`, `prawn`, `rabl`, `rake`, `Rakefile`, `Rantfile`, `rbx`, `rjs`, `ruby.rail`, `Scanfile`, `simplecov`, `Snapfile`, `thor`, `Thorfile`, `Vagrantfile` |
| Rust | `rs` |
| SQL (Rails) | `erbsql`, `sql.erb` |
| SQL | `sql`, `ddl`, `dml` |
| Scala | `scala`, `sbt` |
| Shell-Unix-Generic | `` |
| TOML | `toml`, `tml`, `Cargo.lock`, `Gopkg.lock`, `Pipfile` |
| Tcl | `tcl` |
| TeX | `sty`, `cls` |
| Textile | `textile` |
| XML | `xml`, `xsd`, `xslt`, `tld`, `dtml`, `rss`, `opml`, `svg` |
| YAML | `yaml`, `yml`, `sublime-syntax` |
| camlp4 | `` |
| commands-builtin-shell-bash | `` |
| reStructuredText | `rst`, `rest` |

@ -0,0 +1,46 @@
---
title = "Commonmark"
---
_mkbook_ nominally utilizes [CommonMark](https://commonmark.org/) with some [GFM](https://github.github.com/gfm/) extensions through the use of the [comrak](https://crates.io/crates/comrak) crate. In using _comrak_, a specific set of options are used, which are listed here:
```rust
let options: ComrakOptions = ComrakOptions {
hardbreaks: false,
smart: true,
github_pre_lang: false,
default_info_string: None,
unsafe_: true,
ext_strikethrough: true,
ext_tagfilter: false,
ext_table: true,
ext_autolink: true,
ext_tasklist: true,
ext_superscript: true,
ext_header_ids: Some("header".to_owned()),
ext_footnotes: true,
ext_description_lists: true,
..ComrakOptions::default()
};
```
Mostly, know that the following extensions are enabled:
* [Strikethrough](https://github.github.com/gfm/#strikethrough-extension-)
* [Tables](https://github.github.com/gfm/#tables-extension-)
* [Autolinks](https://github.github.com/gfm/#autolinks-extension-)
* [Task Lists](https://github.github.com/gfm/#task-list-items-extension-)
* Superscripts (`e = mc^2^.` → `e = mc<sup>2</sup>.`)
* [Footnotes](https://kramdown.gettalong.org/syntax.html#footnotes)
* Description Lists:
```md
First term
: Details for the **first term**
Second term
: Details for the **second term**
More details in second paragraph.
```

@ -0,0 +1,432 @@
---
title = "Syntax Highlighting"
---
# Syntax Highlighting
GFM syntax highlighting is also available by using fenced code tags with a label denoting the language, as such:
~~~md
```c++
#include <stdio>
int main() {
std::cout << "Hello, world!" << std::endl;
return 0;
}
```
~~~
which results in:
```c++
#include <stdio>
int main() {
std::cout << "Hello, world!" << std::endl;
return 0;
}
```
To denote the language you can either use one the language's extensions as the label, or the full name of the language (which is **not** case-sensitive).
The list of supported languages is currently as follows:
ASP
: `asa`
ActionScript
: `as`
AppleScript
: `applescript`, `script editor`
Batch File
: `bat`, `cmd`
BibTeX
: `bib`
Bourne Again Shell (bash)
: `sh`, `bash`, `zsh`, `fish`, `.bash_aliases`, `.bash_completions`, `.bash_functions`, `.bash_login`, `.bash_logout`, `.bash_profile`, `.bash_variables`, `.bashrc`, `.profile`, `.textmate_init`
C
: `c`, `h`
C#
: `cs`, `csx`
C++
: `cpp`, `cc`, `cp`, `cxx`, `c++`, `C`, `h`, `hh`, `hpp`, `hxx`, `h++`, `inl`, `ipp`
CSS
: `css`, `css.erb`, `css.liquid`
Cargo Build Results
: ``
Clojure
: `clj`
D
: `d`, `di`
Diff
: `diff`, `patch`
Erlang
: `erl`, `hrl`, `Emakefile`, `emakefile`
Go
: `go`
Graphviz (DOT)
: `dot`, `DOT`, `gv`
Groovy
: `groovy`, `gvy`, `gradle`
HTML
: `html`, `htm`, `shtml`, `xhtml`, `inc`, `tmpl`, `tpl`
HTML (ASP)
: `asp`
HTML (Erlang)
: `yaws`
HTML (Rails)
: `rails`, `rhtml`, `erb`, `html.erb`
HTML (Tcl)
: `adp`
Haskell
: `hs`
Haxe
: `hx`, `hxsl`, `hscript`
Hxml
: `hxml`
JSON
: `json`, `sublime-settings`, `sublime-menu`, `sublime-keymap`, `sublime-mousemap`, `sublime-theme`, `sublime-build`, `sublime-project`, `sublime-completions`, `sublime-commands`, `sublime-macro`, `sublime-color-scheme`
Java
: `java`, `bsh`
Java Properties
: `properties`
Java Server Page (JSP)
: `jsp`
JavaDoc
: ``
JavaScript
: `js`, `htc`
JavaScript (Rails)
: `js.erb`
LaTeX
: `tex`, `ltx`
LaTeX Log
: ``
Lisp
: `lisp`, `cl`, `clisp`, `l`, `mud`, `el`, `scm`, `ss`, `lsp`, `fasl`
Literate Haskell
: `lhs`
Lua
: `lua`
MATLAB
: `matlab`
Make Output
: ``
Makefile
: `make`, `GNUmakefile`, `makefile`, `Makefile`, `OCamlMakefile`, `mak`, `mk`
Markdown
: `md`, `mdown`, `markdown`, `markdn`
MultiMarkdown
: ``
NAnt Build File
: `build`
OCaml
: `ml`, `mli`
OCamllex
: `mll`
OCamlyacc
: `mly`
Objective-C
: `m`, `h`
Objective-C++
: `mm`, `M`, `h`
PHP
: `php`, `php3`, `php4`, `php5`, `php7`, `phps`, `phpt`, `phtml`
PHP Source
: ``
Pascal
: `pas`, `p`, `dpr`
Perl
: `pl`, `pm`, `pod`, `t`, `PL`
Plain Text
: `txt`
Python
: `py`, `py3`, `pyw`, `pyi`, `pyx`, `pyx.in`, `pxd`, `pxd.in`, `pxi`, `pxi.in`, `rpy`, `cpy`, `SConstruct`, `Sconstruct`, `sconstruct`, `SConscript`, `gyp`, `gypi`, `Snakefile`, `wscript`
R
: `R`, `r`, `s`, `S`, `Rprofile`
R Console
: ``
Rd (R Documentation)
: `rd`
Regular Expression
: `re`
Regular Expressions (Javascript)
: ``
Regular Expressions (Python)
: ``
Ruby
: `rb`, `Appfile`, `Appraisals`, `Berksfile`, `Brewfile`, `capfile`, `cgi`, `Cheffile`, `config.ru`, `Deliverfile`, `Fastfile`, `fcgi`, `Gemfile`, `gemspec`, `Guardfile`, `irbrc`, `jbuilder`, `podspec`, `prawn`, `rabl`, `rake`, `Rakefile`, `Rantfile`, `rbx`, `rjs`, `ruby.rail`, `Scanfile`, `simplecov`, `Snapfile`, `thor`, `Thorfile`, `Vagrantfile`
Ruby Haml
: `haml`, `sass`
Ruby on Rails
: `rxml`, `builder`
Rust
: `rs`
SCSS
: `scss`
SQL
: `sql`, `ddl`, `dml`
SQL (Rails)
: `erbsql`, `sql.erb`
Sass
: `sass`
Scala
: `scala`, `sbt`
Shell-Unix-Generic
: ``
TOML
: `toml`, `tml`, `Cargo.lock`, `Gopkg.lock`, `Pipfile`
Tcl
: `tcl`
TeX
: `sty`, `cls`
Textile
: `textile`
XML
: `xml`, `xsd`, `xslt`, `tld`, `dtml`, `rss`, `opml`, `svg`
YAML
: `yaml`, `yml`, `sublime-syntax`
camlp4
: ``
commands-builtin-shell-bash
: ``
reStructuredText
: `rst`, `rest`

@ -0,0 +1,5 @@
---
title = "Markdown"
---
_mkbook_ relies pretty extensively on [Markdown](https://daringfireball.net/projects/markdown/) for its ease of use.

@ -4,62 +4,94 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>The mkbook Book | Introduction</title>
<link rel="stylesheet" href="style.css" type="text/css" media="all" />
<link rel="shortcut icon" href="favicon.ico" />
<link rel="stylesheet" href="../style.css" type="text/css" media="all" />
<link rel="shortcut icon" href="../favicon.ico" />
<meta property="og:title" content="The mkbook Book" />
<meta property="og:site_name" content="The mkbook Book" />
<meta property="og:type" content="book" />
<meta property="og:url" content="https://hamaluik.github.io/mkbook//01-introduction.html" />
<meta property="og:url" content="https://hamaluik.github.io/mkbook//01-introduction/index.html" />
<meta property="og:description" content="&lt;p&gt;&lt;em&gt;mkbook&lt;&#x2f;em&gt; is my simpler alternative to &lt;a href=&quot;https:&#x2f;&#x2f;crates.io&#x2f;crates&#x2f;mdbook&quot;&gt;mdbook&lt;&#x2f;a&gt; which is a great tool, but for which I really dislike some of the decisions they took, such as relying on javascript for highlighting and navigation, and including a lot of bells and whistles such as javascript-based search.&lt;&#x2f;p&gt;
&lt;p&gt;This tool aims to work somewhat similarly to &lt;em&gt;mdbook&lt;&#x2f;em&gt;, but is generally intended to be a more minimal alternative that is customized more towards my needs and desires than anything else.&lt;&#x2f;p&gt;
" />
<meta property="book:author" content="Kenton Hamaluik" />
<meta property="book:release_date" content="2019-11-28T20:11:59.813615871+00:00" />
<meta property="book:release_date" content="2019-11-29T21:20:04.527238643+00:00" />
</head>
<body>
<nav class="big">
<header>
<h1><a href="index.html">The mkbook Book</a></h1>
<h1><a href="../index.html">The mkbook Book</a></h1>
<h2>by Kenton Hamaluik</h2>
</header>
<ol>
<li><a href="01-introduction.html" class = "current">Introduction</a></li>
<li>
<a href="../01-introduction/index.html" class = "current">Introduction</a>
</li>
<li><a href="02-markdown.html">Markdown</a></li>
<li>
<a href="../02-markdown/index.html">Markdown</a>
<ol>
<li><a href="../02-markdown/01-commonmark.html">Commonmark</a></li>
<li><a href="../02-markdown/02-syntax-highlighting.html">Syntax Highlighting</a></li>
</ol>
</li>
<li><a href="03-frontmatter.html">Front Matter</a></li>
<li>
<a href="../03-frontmatter/index.html">Front Matter</a>
</li>
<li><a href="04-structure.html">Structure</a></li>
<li>
<a href="../04-structure/index.html">Structure</a>
</li>
<li><a href="05-customization.html">Customization</a></li>
<li>
<a href="../05-customization/index.html">Customization</a>
</li>
<li><a href="06-how-it-works.html">How it Works</a></li>
<li>
<a href="../06-how-it-works/index.html">How it Works</a>
</li>
</ol>
</nav>
<nav class="small">
<a href="index.html" alt="Table of Contents">
<span>
<a href="../index.html" alt="Table of Contents">
<span class="icon">
<svg class="icon-arrow-up">
<use xlink:href="icons.svg#icon-arrow-up">
<svg class="icon-list-ol">
<use xlink:href="../icons.svg#icon-list-ol">
</svg>
</span>
</a>
<span class="placeholder"></span>
</span>
<span class="title">Introduction</span>
<span>
<span class="placeholder"></span>
<a href="02-markdown.html" alt="Markdown">
<span class="icon">
<svg class="icon-arrow-right">
<use xlink:href="icons.svg#icon-arrow-right">
</svg>
</span>
</a>
<a href="../02-markdown&#x2f;index.html" alt="Markdown">
<span class="icon">
<svg class="icon-arrow-right">
<use xlink:href="../icons.svg#icon-arrow-right">
</svg>
</span>
</a>
</span>
</nav>
<article>
<p><em>mkbook</em> is my simpler alternative to <a href="https://crates.io/crates/mdbook"><em>mdbook</em></a> which is a great tool, but for which I really dislike some of the decisions they took, such as relying on javascript for highlighting and navigation, and including a lot of bells and whistles such as javascript-based search.</p>
@ -109,11 +141,11 @@
<div class="next-chapter">
<a href="02-markdown.html">
<a href="../02-markdown&#x2f;index.html">
<span>Next chapter: “Markdown”</span>
<span class="icon">
<svg class="icon-arrow-right">
<use xlink:href="icons.svg#icon-arrow-right">
<use xlink:href="../icons.svg#icon-arrow-right">
</svg>
</span>
</a>

@ -1,469 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>The mkbook Book | Markdown</title>
<link rel="stylesheet" href="style.css" type="text/css" media="all" />
<link rel="shortcut icon" href="favicon.ico" />
<meta property="og:title" content="The mkbook Book" />
<meta property="og:site_name" content="The mkbook Book" />
<meta property="og:type" content="book" />
<meta property="og:url" content="https://hamaluik.github.io/mkbook//02-markdown.html" />
<meta property="og:description" content="&lt;p&gt;&lt;em&gt;mkbook&lt;&#x2f;em&gt; is my simpler alternative to &lt;a href=&quot;https:&#x2f;&#x2f;crates.io&#x2f;crates&#x2f;mdbook&quot;&gt;mdbook&lt;&#x2f;a&gt; which is a great tool, but for which I really dislike some of the decisions they took, such as relying on javascript for highlighting and navigation, and including a lot of bells and whistles such as javascript-based search.&lt;&#x2f;p&gt;
&lt;p&gt;This tool aims to work somewhat similarly to &lt;em&gt;mdbook&lt;&#x2f;em&gt;, but is generally intended to be a more minimal alternative that is customized more towards my needs and desires than anything else.&lt;&#x2f;p&gt;
" />
<meta property="book:author" content="Kenton Hamaluik" />
<meta property="book:release_date" content="2019-11-28T20:11:59.813615871+00:00" />
</head>
<body>
<nav class="big">
<header>
<h1><a href="index.html">The mkbook Book</a></h1>
<h2>by Kenton Hamaluik</h2>
</header>
<ol>
<li><a href="01-introduction.html">Introduction</a></li>
<li><a href="02-markdown.html" class = "current">Markdown</a></li>
<li><a href="03-frontmatter.html">Front Matter</a></li>
<li><a href="04-structure.html">Structure</a></li>
<li><a href="05-customization.html">Customization</a></li>
<li><a href="06-how-it-works.html">How it Works</a></li>
</ol>
</nav>
<nav class="small">
<a href="01-introduction.html" alt="Introduction">
<span class="icon">
<svg class="icon-arrow-left">
<use xlink:href="icons.svg#icon-arrow-left">
</svg>
</span>
</a>
<span class="title">Markdown</span>
<a href="03-frontmatter.html" alt="Front Matter">
<span class="icon">
<svg class="icon-arrow-right">
<use xlink:href="icons.svg#icon-arrow-right">
</svg>
</span>
</a>
</nav>
<article>
<p><em>mkbook</em> nominally utilizes <a href="https://commonmark.org/">CommonMark</a> with some <a href="https://github.github.com/gfm/">GFM</a> extensions through the use of the <a href="https://crates.io/crates/comrak">comrak</a> crate. In using <em>comrak</em>, a specific set of options are used, which are listed here:</p>
<pre style="background-color:#2d2d2d;">
<span style="color:#cc99cc;">let</span><span style="color:#d3d0c8;"> options: ComrakOptions = ComrakOptions {
</span><span style="color:#d3d0c8;"> hardbreaks: </span><span style="color:#f99157;">false</span><span style="color:#d3d0c8;">,
</span><span style="color:#d3d0c8;"> smart: </span><span style="color:#f99157;">true</span><span style="color:#d3d0c8;">,
</span><span style="color:#d3d0c8;"> github_pre_lang: </span><span style="color:#f99157;">false</span><span style="color:#d3d0c8;">,
</span><span style="color:#d3d0c8;"> default_info_string: None,
</span><span style="color:#d3d0c8;"> unsafe_: </span><span style="color:#f99157;">true</span><span style="color:#d3d0c8;">,
</span><span style="color:#d3d0c8;"> ext_strikethrough: </span><span style="color:#f99157;">true</span><span style="color:#d3d0c8;">,
</span><span style="color:#d3d0c8;"> ext_tagfilter: </span><span style="color:#f99157;">false</span><span style="color:#d3d0c8;">,
</span><span style="color:#d3d0c8;"> ext_table: </span><span style="color:#f99157;">true</span><span style="color:#d3d0c8;">,
</span><span style="color:#d3d0c8;"> ext_autolink: </span><span style="color:#f99157;">true</span><span style="color:#d3d0c8;">,
</span><span style="color:#d3d0c8;"> ext_tasklist: </span><span style="color:#f99157;">true</span><span style="color:#d3d0c8;">,
</span><span style="color:#d3d0c8;"> ext_superscript: </span><span style="color:#f99157;">true</span><span style="color:#d3d0c8;">,
</span><span style="color:#d3d0c8;"> ext_header_ids: Some(&quot;</span><span style="color:#99cc99;">header</span><span style="color:#d3d0c8;">&quot;.</span><span style="color:#66cccc;">to_owned</span><span style="color:#d3d0c8;">()),
</span><span style="color:#d3d0c8;"> ext_footnotes: </span><span style="color:#f99157;">true</span><span style="color:#d3d0c8;">,
</span><span style="color:#d3d0c8;"> ext_description_lists: </span><span style="color:#f99157;">true</span><span style="color:#d3d0c8;">,
</span><span style="color:#d3d0c8;"> ..ComrakOptions::default()
</span><span style="color:#d3d0c8;">};
</span></pre>
<p>Mostly, know that the following extensions are enabled:</p>
<ul>
<li><a href="https://github.github.com/gfm/#strikethrough-extension-">Strikethrough</a></li>
<li><a href="https://github.github.com/gfm/#tables-extension-">Tables</a></li>
<li><a href="https://github.github.com/gfm/#autolinks-extension-">Autolinks</a></li>
<li><a href="https://github.github.com/gfm/#task-list-items-extension-">Task Lists</a></li>
<li>Superscripts (<code>e = mc^2^.</code><code>e = mc&lt;sup&gt;2&lt;/sup&gt;.</code>)</li>
<li><a href="https://kramdown.gettalong.org/syntax.html#footnotes">Footnotes</a></li>
<li>Description Lists:
<pre style="background-color:#2d2d2d;">
<span style="color:#d3d0c8;">First term
</span><span style="color:#d3d0c8;">
</span><span style="color:#d3d0c8;">: Details for the </span><span style="font-weight:bold;color:#ffcc66;">**first term**
</span><span style="color:#d3d0c8;">
</span><span style="color:#d3d0c8;">Second term
</span><span style="color:#d3d0c8;">
</span><span style="color:#d3d0c8;">: Details for the </span><span style="font-weight:bold;color:#ffcc66;">**second term**
</span><span style="color:#d3d0c8;">
</span><span style="color:#d3d0c8;"> More details in second paragraph.
</span></pre>
</li>
</ul>
<h2><a href="#syntax-highlight" aria-hidden="true" class="anchor" id="headersyntax-highlight"></a>Syntax Highlight</h2>
<p>GFM syntax highlighting is also available by using fenced code tags with a label denoting the language, as such:</p>
<pre style="background-color:#2d2d2d;">
<span style="color:#d3d0c8;">```</span><span style="color:#f99157;">c</span><span style="color:#d3d0c8;">++
</span><span style="color:#d3d0c8;">#include &lt;stdio&gt;
</span><span style="color:#d3d0c8;">
</span><span style="color:#d3d0c8;">int main() {
</span><span style="color:#d3d0c8;"> std::cout &lt;&lt; &quot;Hello, world!&quot; &lt;&lt; std::endl;
</span><span style="color:#d3d0c8;"> return 0;
</span><span style="color:#d3d0c8;">}
</span><span style="color:#d3d0c8;">```
</span></pre>
<p>which results in:</p>
<pre style="background-color:#2d2d2d;">
<span style="color:#cc99cc;">#include </span><span style="color:#d3d0c8;">&lt;</span><span style="color:#99cc99;">stdio</span><span style="color:#d3d0c8;">&gt;
</span><span style="color:#d3d0c8;">
</span><span style="color:#cc99cc;">int </span><span style="color:#6699cc;">main</span><span style="color:#d3d0c8;">() {
</span><span style="color:#d3d0c8;"> std::cout &lt;&lt; &quot;</span><span style="color:#99cc99;">Hello, world!</span><span style="color:#d3d0c8;">&quot; &lt;&lt; std::endl;
</span><span style="color:#d3d0c8;"> </span><span style="color:#cc99cc;">return </span><span style="color:#f99157;">0</span><span style="color:#d3d0c8;">;
</span><span style="color:#d3d0c8;">}
</span></pre>
<p>To denote the language you can either use one the languages extensions as the label, or the full name of the language (which is <strong>not</strong> case-sensitive).</p>
<p>The list of supported languages is currently as follows:</p>
<table>
<thead>
<tr>
<th align="left">Language Name</th>
<th align="left">Supported Tags / Extensions</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left">ASP</td>
<td align="left"><code>asa</code></td>
</tr>
<tr>
<td align="left">ActionScript</td>
<td align="left"><code>as</code></td>
</tr>
<tr>
<td align="left">AppleScript</td>
<td align="left"><code>applescript</code>, <code>script editor</code></td>
</tr>
<tr>
<td align="left">Batch File</td>
<td align="left"><code>bat</code>, <code>cmd</code></td>
</tr>
<tr>
<td align="left">BibTeX</td>
<td align="left"><code>bib</code></td>
</tr>
<tr>
<td align="left">Bourne Again Shell (bash)</td>
<td align="left"><code>sh</code>, <code>bash</code>, <code>zsh</code>, <code>fish</code>, <code>.bash_aliases</code>, <code>.bash_completions</code>, <code>.bash_functions</code>, <code>.bash_login</code>, <code>.bash_logout</code>, <code>.bash_profile</code>, <code>.bash_variables</code>, <code>.bashrc</code>, <code>.profile</code>, <code>.textmate_init</code></td>
</tr>
<tr>
<td align="left">C</td>
<td align="left"><code>c</code>, <code>h</code></td>
</tr>
<tr>
<td align="left">C#</td>
<td align="left"><code>cs</code>, <code>csx</code></td>
</tr>
<tr>
<td align="left">C++</td>
<td align="left"><code>cpp</code>, <code>cc</code>, <code>cp</code>, <code>cxx</code>, <code>c++</code>, <code>C</code>, <code>h</code>, <code>hh</code>, <code>hpp</code>, <code>hxx</code>, <code>h++</code>, <code>inl</code>, <code>ipp</code></td>
</tr>
<tr>
<td align="left">CSS</td>
<td align="left"><code>css</code>, <code>css.erb</code>, <code>css.liquid</code></td>
</tr>
<tr>
<td align="left">Cargo Build Results</td>
<td align="left">``</td>
</tr>
<tr>
<td align="left">Clojure</td>
<td align="left"><code>clj</code></td>
</tr>
<tr>
<td align="left">D</td>
<td align="left"><code>d</code>, <code>di</code></td>
</tr>
<tr>
<td align="left">Diff</td>
<td align="left"><code>diff</code>, <code>patch</code></td>
</tr>
<tr>
<td align="left">Erlang</td>
<td align="left"><code>erl</code>, <code>hrl</code>, <code>Emakefile</code>, <code>emakefile</code></td>
</tr>
<tr>
<td align="left">Go</td>
<td align="left"><code>go</code></td>
</tr>
<tr>
<td align="left">Graphviz (DOT)</td>
<td align="left"><code>dot</code>, <code>DOT</code>, <code>gv</code></td>
</tr>
<tr>
<td align="left">Groovy</td>
<td align="left"><code>groovy</code>, <code>gvy</code>, <code>gradle</code></td>
</tr>
<tr>
<td align="left">HTML (ASP)</td>
<td align="left"><code>asp</code></td>
</tr>
<tr>
<td align="left">HTML (Erlang)</td>
<td align="left"><code>yaws</code></td>
</tr>
<tr>
<td align="left">HTML (Rails)</td>
<td align="left"><code>rails</code>, <code>rhtml</code>, <code>erb</code>, <code>html.erb</code></td>
</tr>
<tr>
<td align="left">HTML (Tcl)</td>
<td align="left"><code>adp</code></td>
</tr>
<tr>
<td align="left">HTML</td>
<td align="left"><code>html</code>, <code>htm</code>, <code>shtml</code>, <code>xhtml</code>, <code>inc</code>, <code>tmpl</code>, <code>tpl</code></td>
</tr>
<tr>
<td align="left">Haskell</td>
<td align="left"><code>hs</code></td>
</tr>
<tr>
<td align="left">Haxe</td>
<td align="left"><code>hx</code>, <code>hxsl</code>, <code>hscript</code></td>
</tr>
<tr>
<td align="left">Hxml</td>
<td align="left"><code>hxml</code></td>
</tr>
<tr>
<td align="left">JSON</td>
<td align="left"><code>json</code>, <code>sublime-settings</code>, <code>sublime-menu</code>, <code>sublime-keymap</code>, <code>sublime-mousemap</code>, <code>sublime-theme</code>, <code>sublime-build</code>, <code>sublime-project</code>, <code>sublime-completions</code>, <code>sublime-commands</code>, <code>sublime-macro</code>, <code>sublime-color-scheme</code></td>
</tr>
<tr>
<td align="left">Java Properties</td>
<td align="left"><code>properties</code></td>
</tr>
<tr>
<td align="left">Java Server Page (JSP)</td>
<td align="left"><code>jsp</code></td>
</tr>
<tr>
<td align="left">Java</td>
<td align="left"><code>java</code>, <code>bsh</code></td>
</tr>
<tr>
<td align="left">JavaDoc</td>
<td align="left">``</td>
</tr>
<tr>
<td align="left">JavaScript (Rails)</td>
<td align="left"><code>js.erb</code></td>
</tr>
<tr>
<td align="left">JavaScript</td>
<td align="left"><code>js</code>, <code>htc</code></td>
</tr>
<tr>
<td align="left">LaTeX Log</td>
<td align="left">``</td>
</tr>
<tr>
<td align="left">LaTeX</td>
<td align="left"><code>tex</code>, <code>ltx</code></td>
</tr>
<tr>
<td align="left">Lisp</td>
<td align="left"><code>lisp</code>, <code>cl</code>, <code>clisp</code>, <code>l</code>, <code>mud</code>, <code>el</code>, <code>scm</code>, <code>ss</code>, <code>lsp</code>, <code>fasl</code></td>
</tr>
<tr>
<td align="left">Literate Haskell</td>
<td align="left"><code>lhs</code></td>
</tr>
<tr>
<td align="left">Lua</td>
<td align="left"><code>lua</code></td>
</tr>
<tr>
<td align="left">MATLAB</td>
<td align="left"><code>matlab</code></td>
</tr>
<tr>
<td align="left">Make Output</td>
<td align="left">``</td>
</tr>
<tr>
<td align="left">Makefile</td>
<td align="left"><code>make</code>, <code>GNUmakefile</code>, <code>makefile</code>, <code>Makefile</code>, <code>OCamlMakefile</code>, <code>mak</code>, <code>mk</code></td>
</tr>
<tr>
<td align="left">Markdown</td>
<td align="left"><code>md</code>, <code>mdown</code>, <code>markdown</code>, <code>markdn</code></td>
</tr>
<tr>
<td align="left">MultiMarkdown</td>
<td align="left">``</td>
</tr>
<tr>
<td align="left">NAnt Build File</td>
<td align="left"><code>build</code></td>
</tr>
<tr>
<td align="left">OCaml</td>
<td align="left"><code>ml</code>, <code>mli</code></td>
</tr>
<tr>
<td align="left">OCamllex</td>
<td align="left"><code>mll</code></td>
</tr>
<tr>
<td align="left">OCamlyacc</td>
<td align="left"><code>mly</code></td>
</tr>
<tr>
<td align="left">Objective-C</td>
<td align="left"><code>m</code>, <code>h</code></td>
</tr>
<tr>
<td align="left">Objective-C++</td>
<td align="left"><code>mm</code>, <code>M</code>, <code>h</code></td>
</tr>
<tr>
<td align="left">PHP Source</td>
<td align="left">``</td>
</tr>
<tr>
<td align="left">PHP</td>
<td align="left"><code>php</code>, <code>php3</code>, <code>php4</code>, <code>php5</code>, <code>php7</code>, <code>phps</code>, <code>phpt</code>, <code>phtml</code></td>
</tr>
<tr>
<td align="left">Pascal</td>
<td align="left"><code>pas</code>, <code>p</code>, <code>dpr</code></td>
</tr>
<tr>
<td align="left">Perl</td>
<td align="left"><code>pl</code>, <code>pm</code>, <code>pod</code>, <code>t</code>, <code>PL</code></td>
</tr>
<tr>
<td align="left">Plain Text</td>
<td align="left"><code>txt</code></td>
</tr>
<tr>
<td align="left">Python</td>
<td align="left"><code>py</code>, <code>py3</code>, <code>pyw</code>, <code>pyi</code>, <code>pyx</code>, <code>pyx.in</code>, <code>pxd</code>, <code>pxd.in</code>, <code>pxi</code>, <code>pxi.in</code>, <code>rpy</code>, <code>cpy</code>, <code>SConstruct</code>, <code>Sconstruct</code>, <code>sconstruct</code>, <code>SConscript</code>, <code>gyp</code>, <code>gypi</code>, <code>Snakefile</code>, <code>wscript</code></td>
</tr>
<tr>
<td align="left">R Console</td>
<td align="left">``</td>
</tr>
<tr>
<td align="left">R</td>
<td align="left"><code>R</code>, <code>r</code>, <code>s</code>, <code>S</code>, <code>Rprofile</code></td>
</tr>
<tr>
<td align="left">Rd (R Documentation)</td>
<td align="left"><code>rd</code></td>
</tr>
<tr>
<td align="left">Regular Expression</td>
<td align="left"><code>re</code></td>
</tr>
<tr>
<td align="left">Regular Expressions (Javascript)</td>
<td align="left">``</td>
</tr>
<tr>
<td align="left">Regular Expressions (Python)</td>
<td align="left">``</td>
</tr>
<tr>
<td align="left">Ruby Haml</td>
<td align="left"><code>haml</code>, <code>sass</code></td>
</tr>
<tr>
<td align="left">Ruby on Rails</td>
<td align="left"><code>rxml</code>, <code>builder</code></td>
</tr>
<tr>
<td align="left">Ruby</td>
<td align="left"><code>rb</code>, <code>Appfile</code>, <code>Appraisals</code>, <code>Berksfile</code>, <code>Brewfile</code>, <code>capfile</code>, <code>cgi</code>, <code>Cheffile</code>, <code>config.ru</code>, <code>Deliverfile</code>, <code>Fastfile</code>, <code>fcgi</code>, <code>Gemfile</code>, <code>gemspec</code>, <code>Guardfile</code>, <code>irbrc</code>, <code>jbuilder</code>, <code>podspec</code>, <code>prawn</code>, <code>rabl</code>, <code>rake</code>, <code>Rakefile</code>, <code>Rantfile</code>, <code>rbx</code>, <code>rjs</code>, <code>ruby.rail</code>, <code>Scanfile</code>, <code>simplecov</code>, <code>Snapfile</code>, <code>thor</code>, <code>Thorfile</code>, <code>Vagrantfile</code></td>
</tr>
<tr>
<td align="left">Rust</td>
<td align="left"><code>rs</code></td>
</tr>
<tr>
<td align="left">SQL (Rails)</td>
<td align="left"><code>erbsql</code>, <code>sql.erb</code></td>
</tr>
<tr>
<td align="left">SQL</td>
<td align="left"><code>sql</code>, <code>ddl</code>, <code>dml</code></td>
</tr>
<tr>
<td align="left">Scala</td>
<td align="left"><code>scala</code>, <code>sbt</code></td>
</tr>
<tr>
<td align="left">Shell-Unix-Generic</td>
<td align="left">``</td>
</tr>
<tr>
<td align="left">TOML</td>
<td align="left"><code>toml</code>, <code>tml</code>, <code>Cargo.lock</code>, <code>Gopkg.lock</code>, <code>Pipfile</code></td>
</tr>
<tr>
<td align="left">Tcl</td>
<td align="left"><code>tcl</code></td>
</tr>
<tr>
<td align="left">TeX</td>
<td align="left"><code>sty</code>, <code>cls</code></td>
</tr>
<tr>
<td align="left">Textile</td>
<td align="left"><code>textile</code></td>
</tr>
<tr>
<td align="left">XML</td>
<td align="left"><code>xml</code>, <code>xsd</code>, <code>xslt</code>, <code>tld</code>, <code>dtml</code>, <code>rss</code>, <code>opml</code>, <code>svg</code></td>
</tr>
<tr>
<td align="left">YAML</td>
<td align="left"><code>yaml</code>, <code>yml</code>, <code>sublime-syntax</code></td>
</tr>
<tr>
<td align="left">camlp4</td>
<td align="left">``</td>
</tr>
<tr>
<td align="left">commands-builtin-shell-bash</td>
<td align="left">``</td>
</tr>
<tr>
<td align="left">reStructuredText</td>
<td align="left"><code>rst</code>, <code>rest</code></td>
</tr>
</tbody>
</table>
<div class="next-chapter">
<a href="03-frontmatter.html">
<span>Next chapter: “Front Matter”</span>
<span class="icon">
<svg class="icon-arrow-right">
<use xlink:href="icons.svg#icon-arrow-right">
</svg>
</span>
</a>
</div>
<footer><p>&copy; 2019 Kenton Hamaluik</p></footer>
</article>
</body>
</html>

@ -0,0 +1,164 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>The mkbook Book | Commonmark</title>
<link rel="stylesheet" href="../style.css" type="text/css" media="all" />
<link rel="shortcut icon" href="../favicon.ico" />
<meta property="og:title" content="The mkbook Book" />
<meta property="og:site_name" content="The mkbook Book" />
<meta property="og:type" content="book" />
<meta property="og:url" content="https://hamaluik.github.io/mkbook//02-markdown/01-commonmark.html" />
<meta property="og:description" content="&lt;p&gt;&lt;em&gt;mkbook&lt;&#x2f;em&gt; is my simpler alternative to &lt;a href=&quot;https:&#x2f;&#x2f;crates.io&#x2f;crates&#x2f;mdbook&quot;&gt;mdbook&lt;&#x2f;a&gt; which is a great tool, but for which I really dislike some of the decisions they took, such as relying on javascript for highlighting and navigation, and including a lot of bells and whistles such as javascript-based search.&lt;&#x2f;p&gt;
&lt;p&gt;This tool aims to work somewhat similarly to &lt;em&gt;mdbook&lt;&#x2f;em&gt;, but is generally intended to be a more minimal alternative that is customized more towards my needs and desires than anything else.&lt;&#x2f;p&gt;
" />
<meta property="book:author" content="Kenton Hamaluik" />
<meta property="book:release_date" content="2019-11-29T21:20:04.527238643+00:00" />
</head>
<body>
<nav class="big">
<header>
<h1><a href="../index.html">The mkbook Book</a></h1>
<h2>by Kenton Hamaluik</h2>
</header>
<ol>
<li>
<a href="../01-introduction/index.html">Introduction</a>
</li>
<li>
<a href="../02-markdown/index.html">Markdown</a>
<ol>
<li><a href="../02-markdown/01-commonmark.html" class = "current">Commonmark</a></li>
<li><a href="../02-markdown/02-syntax-highlighting.html">Syntax Highlighting</a></li>
</ol>
</li>
<li>
<a href="../03-frontmatter/index.html">Front Matter</a>
</li>
<li>
<a href="../04-structure/index.html">Structure</a>
</li>
<li>
<a href="../05-customization/index.html">Customization</a>
</li>
<li>
<a href="../06-how-it-works/index.html">How it Works</a>
</li>
</ol>
</nav>
<nav class="small">
<span>
<a href="../index.html" alt="Table of Contents">
<span class="icon">
<svg class="icon-list-ol">
<use xlink:href="../icons.svg#icon-list-ol">
</svg>
</span>
</a>
<a href="../02-markdown&#x2f;index.html" alt="Markdown">
<span class="icon">
<svg class="icon-arrow-left">
<use xlink:href="../icons.svg#icon-arrow-left">
</svg>
</span>
</a>
</span>
<span class="title">Commonmark</span>
<span>
<span class="placeholder"></span>
<a href="../02-markdown&#x2f;02-syntax-highlighting.html" alt="Syntax Highlighting">
<span class="icon">
<svg class="icon-arrow-right">
<use xlink:href="../icons.svg#icon-arrow-right">
</svg>
</span>
</a>
</span>
</nav>
<article>
<p><em>mkbook</em> nominally utilizes <a href="https://commonmark.org/">CommonMark</a> with some <a href="https://github.github.com/gfm/">GFM</a> extensions through the use of the <a href="https://crates.io/crates/comrak">comrak</a> crate. In using <em>comrak</em>, a specific set of options are used, which are listed here:</p>
<pre style="background-color:#2d2d2d;">
<span style="color:#cc99cc;">let</span><span style="color:#d3d0c8;"> options: ComrakOptions = ComrakOptions {
</span><span style="color:#d3d0c8;"> hardbreaks: </span><span style="color:#f99157;">false</span><span style="color:#d3d0c8;">,
</span><span style="color:#d3d0c8;"> smart: </span><span style="color:#f99157;">true</span><span style="color:#d3d0c8;">,
</span><span style="color:#d3d0c8;"> github_pre_lang: </span><span style="color:#f99157;">false</span><span style="color:#d3d0c8;">,
</span><span style="color:#d3d0c8;"> default_info_string: None,
</span><span style="color:#d3d0c8;"> unsafe_: </span><span style="color:#f99157;">true</span><span style="color:#d3d0c8;">,
</span><span style="color:#d3d0c8;"> ext_strikethrough: </span><span style="color:#f99157;">true</span><span style="color:#d3d0c8;">,
</span><span style="color:#d3d0c8;"> ext_tagfilter: </span><span style="color:#f99157;">false</span><span style="color:#d3d0c8;">,
</span><span style="color:#d3d0c8;"> ext_table: </span><span style="color:#f99157;">true</span><span style="color:#d3d0c8;">,
</span><span style="color:#d3d0c8;"> ext_autolink: </span><span style="color:#f99157;">true</span><span style="color:#d3d0c8;">,
</span><span style="color:#d3d0c8;"> ext_tasklist: </span><span style="color:#f99157;">true</span><span style="color:#d3d0c8;">,
</span><span style="color:#d3d0c8;"> ext_superscript: </span><span style="color:#f99157;">true</span><span style="color:#d3d0c8;">,
</span><span style="color:#d3d0c8;"> ext_header_ids: Some(&quot;</span><span style="color:#99cc99;">header</span><span style="color:#d3d0c8;">&quot;.</span><span style="color:#66cccc;">to_owned</span><span style="color:#d3d0c8;">()),
</span><span style="color:#d3d0c8;"> ext_footnotes: </span><span style="color:#f99157;">true</span><span style="color:#d3d0c8;">,
</span><span style="color:#d3d0c8;"> ext_description_lists: </span><span style="color:#f99157;">true</span><span style="color:#d3d0c8;">,
</span><span style="color:#d3d0c8;"> ..ComrakOptions::default()
</span><span style="color:#d3d0c8;">};
</span></pre>
<p>Mostly, know that the following extensions are enabled:</p>
<ul>
<li><a href="https://github.github.com/gfm/#strikethrough-extension-">Strikethrough</a></li>
<li><a href="https://github.github.com/gfm/#tables-extension-">Tables</a></li>
<li><a href="https://github.github.com/gfm/#autolinks-extension-">Autolinks</a></li>
<li><a href="https://github.github.com/gfm/#task-list-items-extension-">Task Lists</a></li>
<li>Superscripts (<code>e = mc^2^.</code><code>e = mc&lt;sup&gt;2&lt;/sup&gt;.</code>)</li>
<li><a href="https://kramdown.gettalong.org/syntax.html#footnotes">Footnotes</a></li>
<li>Description Lists:
<pre style="background-color:#2d2d2d;">
<span style="color:#d3d0c8;">First term
</span><span style="color:#d3d0c8;">
</span><span style="color:#d3d0c8;">: Details for the </span><span style="font-weight:bold;color:#ffcc66;">**first term**
</span><span style="color:#d3d0c8;">
</span><span style="color:#d3d0c8;">Second term
</span><span style="color:#d3d0c8;">
</span><span style="color:#d3d0c8;">: Details for the </span><span style="font-weight:bold;color:#ffcc66;">**second term**
</span><span style="color:#d3d0c8;">
</span><span style="color:#d3d0c8;"> More details in second paragraph.
</span></pre>
</li>
</ul>
<div class="next-chapter">
<a href="../02-markdown&#x2f;02-syntax-highlighting.html">
<span>Next chapter: “Syntax Highlighting”</span>
<span class="icon">
<svg class="icon-arrow-right">
<use xlink:href="../icons.svg#icon-arrow-right">
</svg>
</span>
</a>
</div>
<footer><p>&copy; 2019 Kenton Hamaluik</p></footer>
</article>
</body>
</html>

@ -0,0 +1,626 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>The mkbook Book | Syntax Highlighting</title>
<link rel="stylesheet" href="../style.css" type="text/css" media="all" />
<link rel="shortcut icon" href="../favicon.ico" />
<meta property="og:title" content="The mkbook Book" />
<meta property="og:site_name" content="The mkbook Book" />
<meta property="og:type" content="book" />
<meta property="og:url" content="https://hamaluik.github.io/mkbook//02-markdown/02-syntax-highlighting.html" />
<meta property="og:description" content="&lt;p&gt;&lt;em&gt;mkbook&lt;&#x2f;em&gt; is my simpler alternative to &lt;a href=&quot;https:&#x2f;&#x2f;crates.io&#x2f;crates&#x2f;mdbook&quot;&gt;mdbook&lt;&#x2f;a&gt; which is a great tool, but for which I really dislike some of the decisions they took, such as relying on javascript for highlighting and navigation, and including a lot of bells and whistles such as javascript-based search.&lt;&#x2f;p&gt;
&lt;p&gt;This tool aims to work somewhat similarly to &lt;em&gt;mdbook&lt;&#x2f;em&gt;, but is generally intended to be a more minimal alternative that is customized more towards my needs and desires than anything else.&lt;&#x2f;p&gt;
" />
<meta property="book:author" content="Kenton Hamaluik" />
<meta property="book:release_date" content="2019-11-29T21:20:04.527238643+00:00" />
</head>
<body>
<nav class="big">
<header>
<h1><a href="../index.html">The mkbook Book</a></h1>
<h2>by Kenton Hamaluik</h2>
</header>
<ol>
<li>
<a href="../01-introduction/index.html">Introduction</a>
</li>
<li>
<a href="../02-markdown/index.html">Markdown</a>
<ol>
<li><a href="../02-markdown/01-commonmark.html">Commonmark</a></li>
<li><a href="../02-markdown/02-syntax-highlighting.html" class = "current">Syntax Highlighting</a></li>
</ol>
</li>
<li>
<a href="../03-frontmatter/index.html">Front Matter</a>
</li>
<li>
<a href="../04-structure/index.html">Structure</a>
</li>
<li>
<a href="../05-customization/index.html">Customization</a>
</li>
<li>
<a href="../06-how-it-works/index.html">How it Works</a>
</li>
</ol>
</nav>
<nav class="small">
<span>
<a href="../index.html" alt="Table of Contents">
<span class="icon">
<svg class="icon-list-ol">
<use xlink:href="../icons.svg#icon-list-ol">
</svg>
</span>
</a>
<a href="../02-markdown&#x2f;01-commonmark.html" alt="Commonmark">
<span class="icon">
<svg class="icon-arrow-left">
<use xlink:href="../icons.svg#icon-arrow-left">
</svg>
</span>
</a>
</span>
<span class="title">Syntax Highlighting</span>
<span>
<span class="placeholder"></span>
<a href="../03-frontmatter&#x2f;index.html" alt="Front Matter">
<span class="icon">
<svg class="icon-arrow-right">
<use xlink:href="../icons.svg#icon-arrow-right">
</svg>
</span>
</a>
</span>
</nav>
<article>
<h1><a href="#syntax-highlighting" aria-hidden="true" class="anchor" id="headersyntax-highlighting"></a>Syntax Highlighting</h1>
<p>GFM syntax highlighting is also available by using fenced code tags with a label denoting the language, as such:</p>
<pre style="background-color:#2d2d2d;">
<span style="color:#d3d0c8;">```</span><span style="color:#f99157;">c</span><span style="color:#d3d0c8;">++
</span><span style="color:#d3d0c8;">#include &lt;stdio&gt;
</span><span style="color:#d3d0c8;">
</span><span style="color:#d3d0c8;">int main() {
</span><span style="color:#d3d0c8;"> std::cout &lt;&lt; &quot;Hello, world!&quot; &lt;&lt; std::endl;
</span><span style="color:#d3d0c8;"> return 0;
</span><span style="color:#d3d0c8;">}
</span><span style="color:#d3d0c8;">```
</span></pre>
<p>which results in:</p>
<pre style="background-color:#2d2d2d;">
<span style="color:#cc99cc;">#include </span><span style="color:#d3d0c8;">&lt;</span><span style="color:#99cc99;">stdio</span><span style="color:#d3d0c8;">&gt;
</span><span style="color:#d3d0c8;">
</span><span style="color:#cc99cc;">int </span><span style="color:#6699cc;">main</span><span style="color:#d3d0c8;">() {
</span><span style="color:#d3d0c8;"> std::cout &lt;&lt; &quot;</span><span style="color:#99cc99;">Hello, world!</span><span style="color:#d3d0c8;">&quot; &lt;&lt; std::endl;
</span><span style="color:#d3d0c8;"> </span><span style="color:#cc99cc;">return </span><span style="color:#f99157;">0</span><span style="color:#d3d0c8;">;
</span><span style="color:#d3d0c8;">}
</span></pre>
<p>To denote the language you can either use one the languages extensions as the label, or the full name of the language (which is <strong>not</strong> case-sensitive).</p>
<p>The list of supported languages is currently as follows:</p>
<dl><dt>
<p>ASP</p>
</dt>
<dd>
<p><code>asa</code></p>
</dd>
<dt>
<p>ActionScript</p>
</dt>
<dd>
<p><code>as</code></p>
</dd>
<dt>
<p>AppleScript</p>
</dt>
<dd>
<p><code>applescript</code>, <code>script editor</code></p>
</dd>
<dt>
<p>Batch File</p>
</dt>
<dd>
<p><code>bat</code>, <code>cmd</code></p>
</dd>
<dt>
<p>BibTeX</p>
</dt>
<dd>
<p><code>bib</code></p>
</dd>
<dt>
<p>Bourne Again Shell (bash)</p>
</dt>
<dd>
<p><code>sh</code>, <code>bash</code>, <code>zsh</code>, <code>fish</code>, <code>.bash_aliases</code>, <code>.bash_completions</code>, <code>.bash_functions</code>, <code>.bash_login</code>, <code>.bash_logout</code>, <code>.bash_profile</code>, <code>.bash_variables</code>, <code>.bashrc</code>, <code>.profile</code>, <code>.textmate_init</code></p>
</dd>
<dt>
<p>C</p>
</dt>
<dd>
<p><code>c</code>, <code>h</code></p>
</dd>
<dt>
<p>C#</p>
</dt>
<dd>
<p><code>cs</code>, <code>csx</code></p>
</dd>
<dt>
<p>C++</p>
</dt>
<dd>
<p><code>cpp</code>, <code>cc</code>, <code>cp</code>, <code>cxx</code>, <code>c++</code>, <code>C</code>, <code>h</code>, <code>hh</code>, <code>hpp</code>, <code>hxx</code>, <code>h++</code>, <code>inl</code>, <code>ipp</code></p>
</dd>
<dt>
<p>CSS</p>
</dt>
<dd>
<p><code>css</code>, <code>css.erb</code>, <code>css.liquid</code></p>
</dd>
<dt>
<p>Cargo Build Results</p>
</dt>
<dd>
<p>``</p>
</dd>
<dt>
<p>Clojure</p>
</dt>
<dd>
<p><code>clj</code></p>
</dd>
<dt>
<p>D</p>
</dt>
<dd>
<p><code>d</code>, <code>di</code></p>
</dd>
<dt>
<p>Diff</p>
</dt>
<dd>
<p><code>diff</code>, <code>patch</code></p>
</dd>
<dt>
<p>Erlang</p>
</dt>
<dd>
<p><code>erl</code>, <code>hrl</code>, <code>Emakefile</code>, <code>emakefile</code></p>
</dd>
<dt>
<p>Go</p>
</dt>
<dd>
<p><code>go</code></p>
</dd>
<dt>
<p>Graphviz (DOT)</p>
</dt>
<dd>
<p><code>dot</code>, <code>DOT</code>, <code>gv</code></p>
</dd>
<dt>
<p>Groovy</p>
</dt>
<dd>
<p><code>groovy</code>, <code>gvy</code>, <code>gradle</code></p>
</dd>
<dt>
<p>HTML</p>
</dt>
<dd>
<p><code>html</code>, <code>htm</code>, <code>shtml</code>, <code>xhtml</code>, <code>inc</code>, <code>tmpl</code>, <code>tpl</code></p>
</dd>
<dt>
<p>HTML (ASP)</p>
</dt>
<dd>
<p><code>asp</code></p>
</dd>
<dt>
<p>HTML (Erlang)</p>
</dt>
<dd>
<p><code>yaws</code></p>
</dd>
<dt>
<p>HTML (Rails)</p>
</dt>
<dd>
<p><code>rails</code>, <code>rhtml</code>, <code>erb</code>, <code>html.erb</code></p>
</dd>
<dt>
<p>HTML (Tcl)</p>
</dt>
<dd>
<p><code>adp</code></p>
</dd>
<dt>
<p>Haskell</p>
</dt>
<dd>
<p><code>hs</code></p>
</dd>
<dt>
<p>Haxe</p>
</dt>
<dd>
<p><code>hx</code>, <code>hxsl</code>, <code>hscript</code></p>
</dd>
<dt>
<p>Hxml</p>
</dt>
<dd>
<p><code>hxml</code></p>
</dd>
<dt>
<p>JSON</p>
</dt>
<dd>
<p><code>json</code>, <code>sublime-settings</code>, <code>sublime-menu</code>, <code>sublime-keymap</code>, <code>sublime-mousemap</code>, <code>sublime-theme</code>, <code>sublime-build</code>, <code>sublime-project</code>, <code>sublime-completions</code>, <code>sublime-commands</code>, <code>sublime-macro</code>, <code>sublime-color-scheme</code></p>
</dd>
<dt>
<p>Java</p>
</dt>
<dd>
<p><code>java</code>, <code>bsh</code></p>
</dd>
<dt>
<p>Java Properties</p>
</dt>
<dd>
<p><code>properties</code></p>
</dd>
<dt>
<p>Java Server Page (JSP)</p>
</dt>
<dd>
<p><code>jsp</code></p>
</dd>
<dt>
<p>JavaDoc</p>
</dt>
<dd>
<p>``</p>
</dd>
<dt>
<p>JavaScript</p>
</dt>
<dd>
<p><code>js</code>, <code>htc</code></p>
</dd>
<dt>
<p>JavaScript (Rails)</p>
</dt>
<dd>
<p><code>js.erb</code></p>
</dd>
<dt>
<p>LaTeX</p>
</dt>
<dd>
<p><code>tex</code>, <code>ltx</code></p>
</dd>
<dt>
<p>LaTeX Log</p>
</dt>
<dd>
<p>``</p>
</dd>
<dt>
<p>Lisp</p>
</dt>
<dd>
<p><code>lisp</code>, <code>cl</code>, <code>clisp</code>, <code>l</code>, <code>mud</code>, <code>el</code>, <code>scm</code>, <code>ss</code>, <code>lsp</code>, <code>fasl</code></p>
</dd>
<dt>
<p>Literate Haskell</p>
</dt>
<dd>
<p><code>lhs</code></p>
</dd>
<dt>
<p>Lua</p>
</dt>
<dd>
<p><code>lua</code></p>
</dd>
<dt>
<p>MATLAB</p>
</dt>
<dd>
<p><code>matlab</code></p>
</dd>
<dt>
<p>Make Output</p>
</dt>
<dd>
<p>``</p>
</dd>
<dt>
<p>Makefile</p>
</dt>
<dd>
<p><code>make</code>, <code>GNUmakefile</code>, <code>makefile</code>, <code>Makefile</code>, <code>OCamlMakefile</code>, <code>mak</code>, <code>mk</code></p>
</dd>
<dt>
<p>Markdown</p>
</dt>
<dd>
<p><code>md</code>, <code>mdown</code>, <code>markdown</code>, <code>markdn</code></p>
</dd>
<dt>
<p>MultiMarkdown</p>
</dt>
<dd>
<p>``</p>
</dd>
<dt>
<p>NAnt Build File</p>
</dt>
<dd>
<p><code>build</code></p>
</dd>
<dt>
<p>OCaml</p>
</dt>
<dd>
<p><code>ml</code>, <code>mli</code></p>
</dd>
<dt>
<p>OCamllex</p>
</dt>
<dd>
<p><code>mll</code></p>
</dd>
<dt>
<p>OCamlyacc</p>
</dt>
<dd>
<p><code>mly</code></p>
</dd>
<dt>
<p>Objective-C</p>
</dt>
<dd>
<p><code>m</code>, <code>h</code></p>
</dd>
<dt>
<p>Objective-C++</p>
</dt>
<dd>
<p><code>mm</code>, <code>M</code>, <code>h</code></p>
</dd>
<dt>
<p>PHP</p>
</dt>
<dd>
<p><code>php</code>, <code>php3</code>, <code>php4</code>, <code>php5</code>, <code>php7</code>, <code>phps</code>, <code>phpt</code>, <code>phtml</code></p>
</dd>
<dt>
<p>PHP Source</p>
</dt>
<dd>
<p>``</p>
</dd>
<dt>
<p>Pascal</p>
</dt>
<dd>
<p><code>pas</code>, <code>p</code>, <code>dpr</code></p>
</dd>
<dt>
<p>Perl</p>
</dt>
<dd>
<p><code>pl</code>, <code>pm</code>, <code>pod</code>, <code>t</code>, <code>PL</code></p>
</dd>
<dt>
<p>Plain Text</p>
</dt>
<dd>
<p><code>txt</code></p>
</dd>
<dt>
<p>Python</p>
</dt>
<dd>
<p><code>py</code>, <code>py3</code>, <code>pyw</code>, <code>pyi</code>, <code>pyx</code>, <code>pyx.in</code>, <code>pxd</code>, <code>pxd.in</code>, <code>pxi</code>, <code>pxi.in</code>, <code>rpy</code>, <code>cpy</code>, <code>SConstruct</code>, <code>Sconstruct</code>, <code>sconstruct</code>, <code>SConscript</code>, <code>gyp</code>, <code>gypi</code>, <code>Snakefile</code>, <code>wscript</code></p>
</dd>
<dt>
<p>R</p>
</dt>
<dd>
<p><code>R</code>, <code>r</code>, <code>s</code>, <code>S</code>, <code>Rprofile</code></p>
</dd>
<dt>
<p>R Console</p>
</dt>
<dd>
<p>``</p>
</dd>
<dt>
<p>Rd (R Documentation)</p>
</dt>
<dd>
<p><code>rd</code></p>
</dd>
<dt>
<p>Regular Expression</p>
</dt>
<dd>
<p><code>re</code></p>
</dd>
<dt>
<p>Regular Expressions (Javascript)</p>
</dt>
<dd>
<p>``</p>
</dd>
<dt>
<p>Regular Expressions (Python)</p>
</dt>
<dd>
<p>``</p>
</dd>
<dt>
<p>Ruby</p>
</dt>
<dd>
<p><code>rb</code>, <code>Appfile</code>, <code>Appraisals</code>, <code>Berksfile</code>, <code>Brewfile</code>, <code>capfile</code>, <code>cgi</code>, <code>Cheffile</code>, <code>config.ru</code>, <code>Deliverfile</code>, <code>Fastfile</code>, <code>fcgi</code>, <code>Gemfile</code>, <code>gemspec</code>, <code>Guardfile</code>, <code>irbrc</code>, <code>jbuilder</code>, <code>podspec</code>, <code>prawn</code>, <code>rabl</code>, <code>rake</code>, <code>Rakefile</code>, <code>Rantfile</code>, <code>rbx</code>, <code>rjs</code>, <code>ruby.rail</code>, <code>Scanfile</code>, <code>simplecov</code>, <code>Snapfile</code>, <code>thor</code>, <code>Thorfile</code>, <code>Vagrantfile</code></p>
</dd>
<dt>
<p>Ruby Haml</p>
</dt>
<dd>
<p><code>haml</code>, <code>sass</code></p>
</dd>
<dt>
<p>Ruby on Rails</p>
</dt>
<dd>
<p><code>rxml</code>, <code>builder</code></p>
</dd>
<dt>
<p>Rust</p>
</dt>
<dd>
<p><code>rs</code></p>
</dd>
<dt>
<p>SCSS</p>
</dt>
<dd>
<p><code>scss</code></p>
</dd>
<dt>
<p>SQL</p>
</dt>
<dd>
<p><code>sql</code>, <code>ddl</code>, <code>dml</code></p>
</dd>
<dt>
<p>SQL (Rails)</p>
</dt>
<dd>
<p><code>erbsql</code>, <code>sql.erb</code></p>
</dd>
<dt>
<p>Sass</p>
</dt>
<dd>
<p><code>sass</code></p>
</dd>
<dt>
<p>Scala</p>
</dt>
<dd>
<p><code>scala</code>, <code>sbt</code></p>
</dd>
<dt>
<p>Shell-Unix-Generic</p>
</dt>
<dd>
<p>``</p>
</dd>
<dt>
<p>TOML</p>
</dt>
<dd>
<p><code>toml</code>, <code>tml</code>, <code>Cargo.lock</code>, <code>Gopkg.lock</code>, <code>Pipfile</code></p>
</dd>
<dt>
<p>Tcl</p>
</dt>
<dd>
<p><code>tcl</code></p>
</dd>
<dt>
<p>TeX</p>
</dt>
<dd>
<p><code>sty</code>, <code>cls</code></p>
</dd>
<dt>
<p>Textile</p>
</dt>
<dd>
<p><code>textile</code></p>
</dd>
<dt>
<p>XML</p>
</dt>
<dd>
<p><code>xml</code>, <code>xsd</code>, <code>xslt</code>, <code>tld</code>, <code>dtml</code>, <code>rss</code>, <code>opml</code>, <code>svg</code></p>
</dd>
<dt>
<p>YAML</p>
</dt>
<dd>
<p><code>yaml</code>, <code>yml</code>, <code>sublime-syntax</code></p>
</dd>
<dt>
<p>camlp4</p>
</dt>
<dd>
<p>``</p>
</dd>
<dt>
<p>commands-builtin-shell-bash</p>
</dt>
<dd>
<p>``</p>
</dd>
<dt>
<p>reStructuredText</p>
</dt>
<dd>
<p><code>rst</code>, <code>rest</code></p>
</dd>
</dl>
<div class="next-chapter">
<a href="../03-frontmatter&#x2f;index.html">
<span>Next chapter: “Front Matter”</span>
<span class="icon">
<svg class="icon-arrow-right">
<use xlink:href="../icons.svg#icon-arrow-right">
</svg>
</span>
</a>
</div>
<footer><p>&copy; 2019 Kenton Hamaluik</p></footer>
</article>
</body>
</html>

@ -0,0 +1,123 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>The mkbook Book | Markdown</title>
<link rel="stylesheet" href="../style.css" type="text/css" media="all" />
<link rel="shortcut icon" href="../favicon.ico" />
<meta property="og:title" content="The mkbook Book" />
<meta property="og:site_name" content="The mkbook Book" />
<meta property="og:type" content="book" />
<meta property="og:url" content="https://hamaluik.github.io/mkbook//02-markdown/index.html" />
<meta property="og:description" content="&lt;p&gt;&lt;em&gt;mkbook&lt;&#x2f;em&gt; is my simpler alternative to &lt;a href=&quot;https:&#x2f;&#x2f;crates.io&#x2f;crates&#x2f;mdbook&quot;&gt;mdbook&lt;&#x2f;a&gt; which is a great tool, but for which I really dislike some of the decisions they took, such as relying on javascript for highlighting and navigation, and including a lot of bells and whistles such as javascript-based search.&lt;&#x2f;p&gt;
&lt;p&gt;This tool aims to work somewhat similarly to &lt;em&gt;mdbook&lt;&#x2f;em&gt;, but is generally intended to be a more minimal alternative that is customized more towards my needs and desires than anything else.&lt;&#x2f;p&gt;
" />
<meta property="book:author" content="Kenton Hamaluik" />
<meta property="book:release_date" content="2019-11-29T21:20:04.527238643+00:00" />
</head>
<body>
<nav class="big">
<header>
<h1><a href="../index.html">The mkbook Book</a></h1>
<h2>by Kenton Hamaluik</h2>
</header>
<ol>
<li>
<a href="../01-introduction/index.html">Introduction</a>
</li>
<li>
<a href="../02-markdown/index.html" class = "current">Markdown</a>
<ol>
<li><a href="../02-markdown/01-commonmark.html">Commonmark</a></li>
<li><a href="../02-markdown/02-syntax-highlighting.html">Syntax Highlighting</a></li>
</ol>
</li>
<li>
<a href="../03-frontmatter/index.html">Front Matter</a>
</li>
<li>
<a href="../04-structure/index.html">Structure</a>
</li>
<li>
<a href="../05-customization/index.html">Customization</a>
</li>
<li>
<a href="../06-how-it-works/index.html">How it Works</a>
</li>
</ol>
</nav>
<nav class="small">
<span>
<a href="../index.html" alt="Table of Contents">
<span class="icon">
<svg class="icon-list-ol">
<use xlink:href="../icons.svg#icon-list-ol">
</svg>
</span>
</a>
<a href="../01-introduction&#x2f;index.html" alt="Introduction">
<span class="icon">
<svg class="icon-arrow-up">
<use xlink:href="../icons.svg#icon-arrow-up">
</svg>
</span>
</a>
</span>
<span class="title">Markdown</span>
<span>
<span class="placeholder"></span>
<a href="../02-markdown&#x2f;01-commonmark.html" alt="Commonmark">
<span class="icon">
<svg class="icon-arrow-right">
<use xlink:href="../icons.svg#icon-arrow-right">
</svg>
</span>
</a>
</span>
</nav>
<article>
<p><em>mkbook</em> relies pretty extensively on <a href="https://daringfireball.net/projects/markdown/">Markdown</a> for its ease of use.</p>
<div class="next-chapter">
<a href="../02-markdown&#x2f;01-commonmark.html">
<span>Next chapter: “Commonmark”</span>
<span class="icon">
<svg class="icon-arrow-right">
<use xlink:href="../icons.svg#icon-arrow-right">
</svg>
</span>
</a>
</div>
<footer><p>&copy; 2019 Kenton Hamaluik</p></footer>
</article>
</body>
</html>

@ -4,62 +4,102 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>The mkbook Book | Front Matter</title>
<link rel="stylesheet" href="style.css" type="text/css" media="all" />
<link rel="shortcut icon" href="favicon.ico" />
<link rel="stylesheet" href="../style.css" type="text/css" media="all" />
<link rel="shortcut icon" href="../favicon.ico" />
<meta property="og:title" content="The mkbook Book" />
<meta property="og:site_name" content="The mkbook Book" />
<meta property="og:type" content="book" />
<meta property="og:url" content="https://hamaluik.github.io/mkbook//03-frontmatter.html" />
<meta property="og:url" content="https://hamaluik.github.io/mkbook//03-frontmatter/index.html" />
<meta property="og:description" content="&lt;p&gt;&lt;em&gt;mkbook&lt;&#x2f;em&gt; is my simpler alternative to &lt;a href=&quot;https:&#x2f;&#x2f;crates.io&#x2f;crates&#x2f;mdbook&quot;&gt;mdbook&lt;&#x2f;a&gt; which is a great tool, but for which I really dislike some of the decisions they took, such as relying on javascript for highlighting and navigation, and including a lot of bells and whistles such as javascript-based search.&lt;&#x2f;p&gt;
&lt;p&gt;This tool aims to work somewhat similarly to &lt;em&gt;mdbook&lt;&#x2f;em&gt;, but is generally intended to be a more minimal alternative that is customized more towards my needs and desires than anything else.&lt;&#x2f;p&gt;
" />
<meta property="book:author" content="Kenton Hamaluik" />
<meta property="book:release_date" content="2019-11-28T20:11:59.813615871+00:00" />
<meta property="book:release_date" content="2019-11-29T21:20:04.527238643+00:00" />
</head>
<body>
<nav class="big">
<header>
<h1><a href="index.html">The mkbook Book</a></h1>
<h1><a href="../index.html">The mkbook Book</a></h1>
<h2>by Kenton Hamaluik</h2>
</header>
<ol>
<li><a href="01-introduction.html">Introduction</a></li>
<li>
<a href="../01-introduction/index.html">Introduction</a>
</li>
<li><a href="02-markdown.html">Markdown</a></li>
<li>
<a href="../02-markdown/index.html">Markdown</a>
<ol>
<li><a href="../02-markdown/01-commonmark.html">Commonmark</a></li>
<li><a href="../02-markdown/02-syntax-highlighting.html">Syntax Highlighting</a></li>
</ol>
</li>
<li><a href="03-frontmatter.html" class = "current">Front Matter</a></li>
<li>
<a href="../03-frontmatter/index.html" class = "current">Front Matter</a>
</li>
<li><a href="04-structure.html">Structure</a></li>
<li>
<a href="../04-structure/index.html">Structure</a>
</li>
<li><a href="05-customization.html">Customization</a></li>
<li>
<a href="../05-customization/index.html">Customization</a>
</li>
<li><a href="06-how-it-works.html">How it Works</a></li>
<li>
<a href="../06-how-it-works/index.html">How it Works</a>
</li>
</ol>
</nav>
<nav class="small">
<a href="02-markdown.html" alt="Markdown">
<span>
<a href="../index.html" alt="Table of Contents">
<span class="icon">
<svg class="icon-arrow-left">
<use xlink:href="icons.svg#icon-arrow-left">
<svg class="icon-list-ol">
<use xlink:href="../icons.svg#icon-list-ol">
</svg>
</span>
</a>
<a href="../02-markdown&#x2f;02-syntax-highlighting.html" alt="Syntax Highlighting">
<span class="icon">
<svg class="icon-arrow-left">
<use xlink:href="../icons.svg#icon-arrow-left">
</svg>
</span>
</a>
</span>
<span class="title">Front Matter</span>
<span>
<span class="placeholder"></span>
<a href="04-structure.html" alt="Structure">
<span class="icon">
<svg class="icon-arrow-right">
<use xlink:href="icons.svg#icon-arrow-right">
</svg>
</span>
</a>
<a href="../04-structure&#x2f;index.html" alt="Structure">
<span class="icon">
<svg class="icon-arrow-right">
<use xlink:href="../icons.svg#icon-arrow-right">
</svg>
</span>
</a>
</span>
</nav>
<article>
<p>Each <code>.md</code> file can optionally contain a header with metadata describing the document. If the header isnt present, default values will be used which may look ugly.</p>
@ -84,11 +124,11 @@
<div class="next-chapter">
<a href="04-structure.html">
<a href="../04-structure&#x2f;index.html">
<span>Next chapter: “Structure”</span>
<span class="icon">
<svg class="icon-arrow-right">
<use xlink:href="icons.svg#icon-arrow-right">
<use xlink:href="../icons.svg#icon-arrow-right">
</svg>
</span>
</a>

@ -4,62 +4,102 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>The mkbook Book | Structure</title>
<link rel="stylesheet" href="style.css" type="text/css" media="all" />
<link rel="shortcut icon" href="favicon.ico" />
<link rel="stylesheet" href="../style.css" type="text/css" media="all" />
<link rel="shortcut icon" href="../favicon.ico" />
<meta property="og:title" content="The mkbook Book" />
<meta property="og:site_name" content="The mkbook Book" />
<meta property="og:type" content="book" />
<meta property="og:url" content="https://hamaluik.github.io/mkbook//04-structure.html" />
<meta property="og:url" content="https://hamaluik.github.io/mkbook//04-structure/index.html" />
<meta property="og:description" content="&lt;p&gt;&lt;em&gt;mkbook&lt;&#x2f;em&gt; is my simpler alternative to &lt;a href=&quot;https:&#x2f;&#x2f;crates.io&#x2f;crates&#x2f;mdbook&quot;&gt;mdbook&lt;&#x2f;a&gt; which is a great tool, but for which I really dislike some of the decisions they took, such as relying on javascript for highlighting and navigation, and including a lot of bells and whistles such as javascript-based search.&lt;&#x2f;p&gt;
&lt;p&gt;This tool aims to work somewhat similarly to &lt;em&gt;mdbook&lt;&#x2f;em&gt;, but is generally intended to be a more minimal alternative that is customized more towards my needs and desires than anything else.&lt;&#x2f;p&gt;
" />
<meta property="book:author" content="Kenton Hamaluik" />
<meta property="book:release_date" content="2019-11-28T20:11:59.813615871+00:00" />
<meta property="book:release_date" content="2019-11-29T21:20:04.527238643+00:00" />
</head>
<body>
<nav class="big">
<header>
<h1><a href="index.html">The mkbook Book</a></h1>
<h1><a href="../index.html">The mkbook Book</a></h1>
<h2>by Kenton Hamaluik</h2>
</header>
<ol>
<li><a href="01-introduction.html">Introduction</a></li>
<li>
<a href="../01-introduction/index.html">Introduction</a>
</li>
<li><a href="02-markdown.html">Markdown</a></li>
<li>
<a href="../02-markdown/index.html">Markdown</a>
<ol>
<li><a href="../02-markdown/01-commonmark.html">Commonmark</a></li>
<li><a href="../02-markdown/02-syntax-highlighting.html">Syntax Highlighting</a></li>
</ol>
</li>
<li><a href="03-frontmatter.html">Front Matter</a></li>
<li>
<a href="../03-frontmatter/index.html">Front Matter</a>
</li>
<li><a href="04-structure.html" class = "current">Structure</a></li>
<li>
<a href="../04-structure/index.html" class = "current">Structure</a>
</li>
<li><a href="05-customization.html">Customization</a></li>
<li>
<a href="../05-customization/index.html">Customization</a>
</li>
<li><a href="06-how-it-works.html">How it Works</a></li>
<li>
<a href="../06-how-it-works/index.html">How it Works</a>
</li>
</ol>
</nav>
<nav class="small">
<a href="03-frontmatter.html" alt="Front Matter">
<span>
<a href="../index.html" alt="Table of Contents">
<span class="icon">
<svg class="icon-arrow-left">
<use xlink:href="icons.svg#icon-arrow-left">
<svg class="icon-list-ol">
<use xlink:href="../icons.svg#icon-list-ol">
</svg>
</span>
</a>
<a href="../03-frontmatter&#x2f;index.html" alt="Front Matter">
<span class="icon">
<svg class="icon-arrow-left">
<use xlink:href="../icons.svg#icon-arrow-left">
</svg>
</span>
</a>
</span>
<span class="title">Structure</span>
<span>
<span class="placeholder"></span>
<a href="05-customization.html" alt="Customization">
<span class="icon">
<svg class="icon-arrow-right">
<use xlink:href="icons.svg#icon-arrow-right">
</svg>
</span>
</a>
<a href="../05-customization&#x2f;index.html" alt="Customization">
<span class="icon">
<svg class="icon-arrow-right">
<use xlink:href="../icons.svg#icon-arrow-right">
</svg>
</span>
</a>
</span>
</nav>
<article>
<p><em>mkbook</em> follows a fairly simple directory structure for now, with a <code>mkbook.toml</code> file declaring the books metadata, and <code>.md</code> files defining each chapter of the book.</p>
@ -135,11 +175,11 @@
<div class="next-chapter">
<a href="05-customization.html">
<a href="../05-customization&#x2f;index.html">
<span>Next chapter: “Customization”</span>
<span class="icon">
<svg class="icon-arrow-right">
<use xlink:href="icons.svg#icon-arrow-right">
<use xlink:href="../icons.svg#icon-arrow-right">
</svg>
</span>
</a>

@ -1,83 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>The mkbook Book | Customization</title>
<link rel="stylesheet" href="style.css" type="text/css" media="all" />
<link rel="shortcut icon" href="favicon.ico" />
<meta property="og:title" content="The mkbook Book" />
<meta property="og:site_name" content="The mkbook Book" />
<meta property="og:type" content="book" />
<meta property="og:url" content="https://hamaluik.github.io/mkbook//05-customization.html" />
<meta property="og:description" content="&lt;p&gt;&lt;em&gt;mkbook&lt;&#x2f;em&gt; is my simpler alternative to &lt;a href=&quot;https:&#x2f;&#x2f;crates.io&#x2f;crates&#x2f;mdbook&quot;&gt;mdbook&lt;&#x2f;a&gt; which is a great tool, but for which I really dislike some of the decisions they took, such as relying on javascript for highlighting and navigation, and including a lot of bells and whistles such as javascript-based search.&lt;&#x2f;p&gt;
&lt;p&gt;This tool aims to work somewhat similarly to &lt;em&gt;mdbook&lt;&#x2f;em&gt;, but is generally intended to be a more minimal alternative that is customized more towards my needs and desires than anything else.&lt;&#x2f;p&gt;
" />
<meta property="book:author" content="Kenton Hamaluik" />
<meta property="book:release_date" content="2019-11-28T20:11:59.813615871+00:00" />
</head>
<body>
<nav class="big">
<header>
<h1><a href="index.html">The mkbook Book</a></h1>
<h2>by Kenton Hamaluik</h2>
</header>
<ol>
<li><a href="01-introduction.html">Introduction</a></li>
<li><a href="02-markdown.html">Markdown</a></li>
<li><a href="03-frontmatter.html">Front Matter</a></li>
<li><a href="04-structure.html">Structure</a></li>
<li><a href="05-customization.html" class = "current">Customization</a></li>
<li><a href="06-how-it-works.html">How it Works</a></li>
</ol>
</nav>
<nav class="small">
<a href="04-structure.html" alt="Structure">
<span class="icon">
<svg class="icon-arrow-left">
<use xlink:href="icons.svg#icon-arrow-left">
</svg>
</span>
</a>
<span class="title">Customization</span>
<a href="06-how-it-works.html" alt="How it Works">
<span class="icon">
<svg class="icon-arrow-right">
<use xlink:href="icons.svg#icon-arrow-right">
</svg>
</span>
</a>
</nav>
<article>
<p>There isnt any way to customize the templates nor the CSS yet, though I will investigate this if the need arises.</p>
<div class="next-chapter">
<a href="06-how-it-works.html">
<span>Next chapter: “How it Works”</span>
<span class="icon">
<svg class="icon-arrow-right">
<use xlink:href="icons.svg#icon-arrow-right">
</svg>
</span>
</a>
</div>
<footer><p>&copy; 2019 Kenton Hamaluik</p></footer>
</article>
</body>
</html>

@ -0,0 +1,123 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>The mkbook Book | Customization</title>
<link rel="stylesheet" href="../style.css" type="text/css" media="all" />
<link rel="shortcut icon" href="../favicon.ico" />
<meta property="og:title" content="The mkbook Book" />
<meta property="og:site_name" content="The mkbook Book" />
<meta property="og:type" content="book" />
<meta property="og:url" content="https://hamaluik.github.io/mkbook//05-customization/index.html" />
<meta property="og:description" content="&lt;p&gt;&lt;em&gt;mkbook&lt;&#x2f;em&gt; is my simpler alternative to &lt;a href=&quot;https:&#x2f;&#x2f;crates.io&#x2f;crates&#x2f;mdbook&quot;&gt;mdbook&lt;&#x2f;a&gt; which is a great tool, but for which I really dislike some of the decisions they took, such as relying on javascript for highlighting and navigation, and including a lot of bells and whistles such as javascript-based search.&lt;&#x2f;p&gt;
&lt;p&gt;This tool aims to work somewhat similarly to &lt;em&gt;mdbook&lt;&#x2f;em&gt;, but is generally intended to be a more minimal alternative that is customized more towards my needs and desires than anything else.&lt;&#x2f;p&gt;
" />
<meta property="book:author" content="Kenton Hamaluik" />
<meta property="book:release_date" content="2019-11-29T21:20:04.527238643+00:00" />
</head>
<body>
<nav class="big">
<header>
<h1><a href="../index.html">The mkbook Book</a></h1>
<h2>by Kenton Hamaluik</h2>
</header>
<ol>
<li>
<a href="../01-introduction/index.html">Introduction</a>
</li>
<li>
<a href="../02-markdown/index.html">Markdown</a>
<ol>
<li><a href="../02-markdown/01-commonmark.html">Commonmark</a></li>
<li><a href="../02-markdown/02-syntax-highlighting.html">Syntax Highlighting</a></li>
</ol>
</li>
<li>
<a href="../03-frontmatter/index.html">Front Matter</a>
</li>
<li>
<a href="../04-structure/index.html">Structure</a>
</li>
<li>
<a href="../05-customization/index.html" class = "current">Customization</a>
</li>
<li>
<a href="../06-how-it-works/index.html">How it Works</a>
</li>
</ol>
</nav>
<nav class="small">
<span>
<a href="../index.html" alt="Table of Contents">
<span class="icon">
<svg class="icon-list-ol">
<use xlink:href="../icons.svg#icon-list-ol">
</svg>
</span>
</a>
<a href="../04-structure&#x2f;index.html" alt="Structure">
<span class="icon">
<svg class="icon-arrow-left">
<use xlink:href="../icons.svg#icon-arrow-left">
</svg>
</span>
</a>
</span>
<span class="title">Customization</span>
<span>
<span class="placeholder"></span>
<a href="../06-how-it-works&#x2f;index.html" alt="How it Works">
<span class="icon">
<svg class="icon-arrow-right">
<use xlink:href="../icons.svg#icon-arrow-right">
</svg>
</span>
</a>
</span>
</nav>
<article>
<p>There isnt any way to customize the templates nor the CSS yet, though I will investigate this if the need arises.</p>
<div class="next-chapter">
<a href="../06-how-it-works&#x2f;index.html">
<span>Next chapter: “How it Works”</span>
<span class="icon">
<svg class="icon-arrow-right">
<use xlink:href="../icons.svg#icon-arrow-right">
</svg>
</span>
</a>
</div>
<footer><p>&copy; 2019 Kenton Hamaluik</p></footer>
</article>
</body>
</html>

@ -4,56 +4,96 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>The mkbook Book | How it Works</title>
<link rel="stylesheet" href="style.css" type="text/css" media="all" />
<link rel="shortcut icon" href="favicon.ico" />
<link rel="stylesheet" href="../style.css" type="text/css" media="all" />
<link rel="shortcut icon" href="../favicon.ico" />
<meta property="og:title" content="The mkbook Book" />
<meta property="og:site_name" content="The mkbook Book" />
<meta property="og:type" content="book" />
<meta property="og:url" content="https://hamaluik.github.io/mkbook//06-how-it-works.html" />
<meta property="og:url" content="https://hamaluik.github.io/mkbook//06-how-it-works/index.html" />
<meta property="og:description" content="&lt;p&gt;&lt;em&gt;mkbook&lt;&#x2f;em&gt; is my simpler alternative to &lt;a href=&quot;https:&#x2f;&#x2f;crates.io&#x2f;crates&#x2f;mdbook&quot;&gt;mdbook&lt;&#x2f;a&gt; which is a great tool, but for which I really dislike some of the decisions they took, such as relying on javascript for highlighting and navigation, and including a lot of bells and whistles such as javascript-based search.&lt;&#x2f;p&gt;
&lt;p&gt;This tool aims to work somewhat similarly to &lt;em&gt;mdbook&lt;&#x2f;em&gt;, but is generally intended to be a more minimal alternative that is customized more towards my needs and desires than anything else.&lt;&#x2f;p&gt;
" />
<meta property="book:author" content="Kenton Hamaluik" />
<meta property="book:release_date" content="2019-11-28T20:11:59.813615871+00:00" />
<meta property="book:release_date" content="2019-11-29T21:20:04.527238643+00:00" />
</head>
<body>
<nav class="big">
<header>
<h1><a href="index.html">The mkbook Book</a></h1>
<h1><a href="../index.html">The mkbook Book</a></h1>
<h2>by Kenton Hamaluik</h2>
</header>
<ol>
<li><a href="01-introduction.html">Introduction</a></li>
<li>
<a href="../01-introduction/index.html">Introduction</a>
</li>
<li><a href="02-markdown.html">Markdown</a></li>
<li>
<a href="../02-markdown/index.html">Markdown</a>
<ol>
<li><a href="../02-markdown/01-commonmark.html">Commonmark</a></li>
<li><a href="../02-markdown/02-syntax-highlighting.html">Syntax Highlighting</a></li>
</ol>
</li>
<li><a href="03-frontmatter.html">Front Matter</a></li>
<li>
<a href="../03-frontmatter/index.html">Front Matter</a>
</li>
<li><a href="04-structure.html">Structure</a></li>
<li>
<a href="../04-structure/index.html">Structure</a>
</li>
<li><a href="05-customization.html">Customization</a></li>
<li>
<a href="../05-customization/index.html">Customization</a>
</li>
<li><a href="06-how-it-works.html" class = "current">How it Works</a></li>
<li>
<a href="../06-how-it-works/index.html" class = "current">How it Works</a>
</li>
</ol>
</nav>
<nav class="small">
<a href="05-customization.html" alt="Customization">
<span>
<a href="../index.html" alt="Table of Contents">
<span class="icon">
<svg class="icon-arrow-left">
<use xlink:href="icons.svg#icon-arrow-left">
<svg class="icon-list-ol">
<use xlink:href="../icons.svg#icon-list-ol">
</svg>
</span>
</a>
<span class="title">How it Works</span>
<a href="../05-customization&#x2f;index.html" alt="Customization">
<span class="icon">
<svg class="icon-arrow-left">
<use xlink:href="../icons.svg#icon-arrow-left">
</svg>
</span>
</a>
</span>
<span class="title">How it Works</span>
<span>
<span class="placeholder"></span>
<span class="placeholder"></span>
</span>
</nav>
<article>
<p><em>mkbook</em> generates a completely static, javascript-free website from a series of Markdown files. All of the layout and styling is controlled purely by hand-crafted CSS specific to this books purpose.</p>

@ -12,5 +12,9 @@
<title>arrow-up</title>
<path fill="currentColor" d="M34.9 289.5l-22.2-22.2c-9.4-9.4-9.4-24.6 0-33.9L207 39c9.4-9.4 24.6-9.4 33.9 0l194.3 194.3c9.4 9.4 9.4 24.6 0 33.9L413 289.4c-9.5 9.5-25 9.3-34.3-.4L264 168.6V456c0 13.3-10.7 24-24 24h-32c-13.3 0-24-10.7-24-24V168.6L69.2 289.1c-9.3 9.8-24.8 10-34.3.4z"></path>
</symbol>
<symbol id="icon-list-ol" viewBox="0 0 448 512">
<title>list-ol</title>
<path fill="currentColor" d="M61.77 401l17.5-20.15a19.92 19.92 0 0 0 5.07-14.19v-3.31C84.34 356 80.5 352 73 352H16a8 8 0 0 0-8 8v16a8 8 0 0 0 8 8h22.83a157.41 157.41 0 0 0-11 12.31l-5.61 7c-4 5.07-5.25 10.13-2.8 14.88l1.05 1.93c3 5.76 6.29 7.88 12.25 7.88h4.73c10.33 0 15.94 2.44 15.94 9.09 0 4.72-4.2 8.22-14.36 8.22a41.54 41.54 0 0 1-15.47-3.12c-6.49-3.88-11.74-3.5-15.6 3.12l-5.59 9.31c-3.72 6.13-3.19 11.72 2.63 15.94 7.71 4.69 20.38 9.44 37 9.44 34.16 0 48.5-22.75 48.5-44.12-.03-14.38-9.12-29.76-28.73-34.88zM496 224H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0-160H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16V80a16 16 0 0 0-16-16zm0 320H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zM16 160h64a8 8 0 0 0 8-8v-16a8 8 0 0 0-8-8H64V40a8 8 0 0 0-8-8H32a8 8 0 0 0-7.14 4.42l-8 16A8 8 0 0 0 24 64h8v64H16a8 8 0 0 0-8 8v16a8 8 0 0 0 8 8zm-3.91 160H80a8 8 0 0 0 8-8v-16a8 8 0 0 0-8-8H41.32c3.29-10.29 48.34-18.68 48.34-56.44 0-29.06-25-39.56-44.47-39.56-21.36 0-33.8 10-40.46 18.75-4.37 5.59-3 10.84 2.8 15.37l8.58 6.88c5.61 4.56 11 2.47 16.12-2.44a13.44 13.44 0 0 1 9.46-3.84c3.33 0 9.28 1.56 9.28 8.75C51 248.19 0 257.31 0 304.59v4C0 316 5.08 320 12.09 320z"></path>
</symbol>
</defs>
</svg>

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

@ -14,13 +14,13 @@
&lt;p&gt;This tool aims to work somewhat similarly to &lt;em&gt;mdbook&lt;&#x2f;em&gt;, but is generally intended to be a more minimal alternative that is customized more towards my needs and desires than anything else.&lt;&#x2f;p&gt;
" />
<meta property="book:author" content="Kenton Hamaluik" />
<meta property="book:release_date" content="2019-11-28T20:11:59.813615871+00:00" />
<meta property="book:release_date" content="2019-11-29T21:20:04.527238643+00:00" />
</head>
<body class="toc">
<header>
<h1>The mkbook Book</h1>
<h2>by Kenton Hamaluik</h2>
<time datetime="2019-11-28T20:11:59.813615871+00:00">Nov 28, 2019</time>
<time datetime="2019-11-29T21:20:04.527238643+00:00">Nov 29, 2019</time>
</header>
<article>
<p><em>mkbook</em> is my simpler alternative to <a href="https://crates.io/crates/mdbook">mdbook</a> which is a great tool, but for which I really dislike some of the decisions they took, such as relying on javascript for highlighting and navigation, and including a lot of bells and whistles such as javascript-based search.</p>
@ -31,17 +31,43 @@
<h1>Table of Contents</h1>
<ol>
<li><a href="01-introduction.html">Introduction</a></li>
<li>
<a href="01-introduction/index.html">Introduction</a>
</li>
<li><a href="02-markdown.html">Markdown</a></li>
<li>
<a href="02-markdown/index.html">Markdown</a>
<ol>
<li><a href="02-markdown/01-commonmark.html">Commonmark</a></li>
<li><a href="02-markdown/02-syntax-highlighting.html">Syntax Highlighting</a></li>
</ol>
</li>
<li><a href="03-frontmatter.html">Front Matter</a></li>
<li>
<a href="03-frontmatter/index.html">Front Matter</a>
</li>
<li><a href="04-structure.html">Structure</a></li>
<li>
<a href="04-structure/index.html">Structure</a>
</li>
<li><a href="05-customization.html">Customization</a></li>
<li>
<a href="05-customization/index.html">Customization</a>
</li>
<li><a href="06-how-it-works.html">How it Works</a></li>
<li>
<a href="06-how-it-works/index.html">How it Works</a>
</li>
</ol>
</nav>

File diff suppressed because one or more lines are too long

@ -16,6 +16,8 @@ pub const ASSET_DEFAULT_INTRODUCTION: &'static [u8] = include_bytes!(concat!(env
pub const SYNTAX_TOML: &'static str = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/assets/syntaxes/TOML.sublime-syntax"));
pub const SYNTAX_HAXE: &'static str = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/assets/syntaxes/haxe.sublime-syntax"));
pub const SYNTAX_HXML: &'static str = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/assets/syntaxes/hxml.sublime-syntax"));
pub const SYNTAX_SASS: &'static str = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/assets/syntaxes/Sass.sublime-syntax"));
pub const SYNTAX_SCSS: &'static str = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/assets/syntaxes/SCSS.sublime-syntax"));
lazy_static! {
static ref HIGHLIGHT_SYNTAX_SETS: SyntaxSet = {
@ -26,13 +28,17 @@ lazy_static! {
ssb.add(SyntaxDefinition::load_from_str(SYNTAX_TOML, true, None).expect("valid TOML syntax definition"));
ssb.add(SyntaxDefinition::load_from_str(SYNTAX_HAXE, true, None).expect("valid haxe syntax definition"));
ssb.add(SyntaxDefinition::load_from_str(SYNTAX_HXML, true, None).expect("valid hxml syntax definition"));
ssb.add(SyntaxDefinition::load_from_str(SYNTAX_SASS, true, None).expect("valid sass syntax definition"));
ssb.add(SyntaxDefinition::load_from_str(SYNTAX_SCSS, true, None).expect("valid scss syntax definition"));
let ss = ssb.build();
//if cfg!(debug_assertions) {
// println!("| Language Name | Supported Tags / Extensions |");
// println!("|:-|:-|");
// for s in ss.syntaxes().iter() {
// println!("| {} | `{}` |", s.name, s.file_extensions.iter().map(|s| &**s).collect::<Vec<&str>>().join("`, `"));
// let mut syntaxes: Vec<(String, String)> = ss.syntaxes().iter()
// .map(|s| (s.name.clone(), s.file_extensions.iter().map(|s| &**s).collect::<Vec<&str>>().join("`, `")))
// .collect();
// syntaxes.sort_by(|a, b| a.0.cmp(&b.0));
// for syntax in syntaxes {
// println!("{}\n\n: `{}`\n\n", syntax.0, syntax.1);
// }
//}
@ -65,6 +71,7 @@ mod filters;
use models::frontmatter::{ParsedFrontMatter, FrontMatter};
use models::book::{ParsedBook, Book};
use models::chapter::{Chapter};
fn format_code(lang: &str, src: &str) -> Result<String, Box<dyn std::error::Error>> {
use syntect::parsing::SyntaxReference;
@ -165,10 +172,10 @@ fn format_markdown(src: &str) -> Result<String, Box<dyn std::error::Error>> {
#[template(path = "index.html")]
struct IndexTemplate<'a, 'b> {
book: &'a Book,
chapters: &'b Vec<models::chapter::Chapter>,
chapters: &'b Vec<Chapter>,
}
fn generate_index<W: io::Write>(book: &Book, chapters: &Vec<models::chapter::Chapter>, mut output: W) -> Result<(), Box<dyn std::error::Error>> {
fn generate_index<W: io::Write>(book: &Book, chapters: &Vec<Chapter>, mut output: W) -> Result<(), Box<dyn std::error::Error>> {
// fill out our template
let template = IndexTemplate {
book,
@ -185,33 +192,19 @@ fn generate_index<W: io::Write>(book: &Book, chapters: &Vec<models::chapter::Cha
#[derive(Template)]
#[template(path = "page.html")]
struct PageTemplate<'a, 'b, 'c, 'd, 'e, 'f, 'g> {
title: &'a str,
chapter: &'a Chapter,
content: &'b str,
url: &'f str,
chapters: &'c Vec<models::chapter::Chapter>,
prev_chapter: Option<&'d models::chapter::Chapter>,
next_chapter: Option<&'e models::chapter::Chapter>,
chapters: &'c Vec<Chapter>,
prev_chapter: Option<&'d Chapter>,
next_chapter: Option<&'e Chapter>,
book: &'g Book,
}
fn format_page<W: io::Write>(book: &Book, frontmatter: FrontMatter, chapters: &Vec<models::chapter::Chapter>, url: &str, content: &str, mut output: W) -> Result<(), Box<dyn std::error::Error>> {
let this_index = chapters.iter().enumerate().find(|(_, chap)| chap.url == url).map(|(i, _)| i).expect("chapter exists");
let prev_chapter = if this_index > 0 {
Some(chapters.iter().nth(this_index - 1).expect("chapter n-1 exists"))
}
else {
None
};
let next_chapter = if this_index < chapters.len() - 1 {
Some(chapters.iter().nth(this_index + 1).expect("chapter n+1 exists"))
}
else {
None
};
fn format_page<W: io::Write>(book: &Book, chapter: &Chapter, chapters: &Vec<Chapter>, prev_chapter: Option<&Chapter>, next_chapter: Option<&Chapter>, url: &str, content: &str, mut output: W) -> Result<(), Box<dyn std::error::Error>> {
// fill out our template
let template = PageTemplate {
title: &frontmatter.title,
chapter,
content,
url,
chapters,
@ -274,25 +267,84 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
let book: Book = parsed_book.into();
// load all our chapters
let mut chapters: Vec<models::chapter::Chapter> = Vec::default();
let mut chapters: Vec<Chapter> = Vec::default();
for entry in src.read_dir()? {
let entry = entry?;
let path = entry.path();
if let Some("md") = path.extension().map(std::ffi::OsStr::to_str).flatten() {
if entry.file_type()?.is_dir() {
// try to find a `chapter.toml` file and parse it to get the chapter's title, fall back to the directory
// name if we can't do that
let chapter_name = path.file_name().map(std::ffi::OsStr::to_str).flatten().unwrap_or_default();
let index_path = path.join("index.md");
let (front, contents) = if index_path.exists() {
let contents = fs::read_to_string(&index_path)?;
let (front, contents) = extract_frontmatter(&contents)?;
let front = front.unwrap_or_default().into_front(chapter_name);
(front, contents)
}
else {
(FrontMatter {
title: chapter_name.to_owned(),
}, String::new())
};
let mut chapter: Chapter = Chapter {
url: format!("{}/index.html", chapter_name),
front,
sections: Vec::default(),
source: path.clone(),
contents,
};
for entry in path.read_dir()? {
let entry = entry?;
let path = entry.path();
if let Some("md") = path.extension().map(std::ffi::OsStr::to_str).flatten() {
let name = path.file_stem().map(std::ffi::OsStr::to_str).flatten();
if name.is_none() { continue; }
let name = name.unwrap();
if name == "index" {
continue;
}
let contents = fs::read_to_string(&path)?;
let (front, contents) = extract_frontmatter(&contents)?;
let front = front.unwrap_or_default().into_front(name);
chapter.sections.push(Chapter {
url: format!("{}/{}.html", chapter_name, name),
front,
sections: Vec::new(),
source: path,
contents,
});
}
}
chapters.push(chapter);
}
else if let Some("md") = path.extension().map(std::ffi::OsStr::to_str).flatten() {
let name = path.file_stem().map(std::ffi::OsStr::to_str).flatten();
if name.is_none() { continue; }
let name = name.unwrap();
let contents = fs::read_to_string(&path)?;
let (front, _) = extract_frontmatter(&contents)?;
let (front, contents) = extract_frontmatter(&contents)?;
let front = front.unwrap_or_default().into_front(name);
chapters.push(models::chapter::Chapter {
url: format!("{}.html", name),
title: front.title,
chapters.push(Chapter {
url: format!("{}/index.html", name),
front,
sections: Vec::new(),
source: path,
contents,
});
}
}
// sort all the chapters
chapters.sort_by(|a, b| a.url.cmp(&b.url));
for chapter in chapters.iter_mut() {
chapter.sections.sort_by(|a, b| a.url.cmp(&b.url));
}
// generate our index
let index_out_path = dest.join("index.html");
@ -301,26 +353,61 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
generate_index(&book, &chapters, index_out)?;
println!("Rendered index into `{}`", index_out_path.display());
// compile markdown
for entry in src.read_dir()? {
let entry = entry?;
let path = entry.path();
if let Some("md") = path.extension().map(std::ffi::OsStr::to_str).flatten() {
let name = path.file_stem().map(std::ffi::OsStr::to_str).flatten();
if name.is_none() { continue; }
let name = name.unwrap();
let out = dest.join(format!("{}.html", name));
// compile markdown and write the actual pages
let mut prev_chapter = None;
for (chapter_index, chapter) in chapters.iter().enumerate() {
// render the index
let chapter_root = dest.join(chapter.source.file_stem().map(std::ffi::OsStr::to_str).flatten().unwrap());
let out = chapter_root.join("index.html");
print!("Rendering `{}` into `{}`...", chapter.source.display(), out.display());
fs::create_dir_all(&chapter_root)?;
let outfile = fs::File::create(&out)?;
let outfile = io::BufWriter::new(outfile);
let contents = format_markdown(&chapter.contents)?;
let next_chapter =
if chapter.sections.len() > 0 {
Some(chapter.sections.iter().nth(0).expect("section 0 exists"))
}
else if chapter_index < chapters.len() - 1 {
Some(chapters.iter().nth(chapter_index + 1).expect("chapter n+1 exists"))
}
else {
None
};
format_page(&book, &chapter, &chapters, prev_chapter, next_chapter, &chapter.url, &contents, outfile)?;
prev_chapter = Some(chapter);
println!(" done!");
// now the sections
for (section_index, section) in chapter.sections.iter().enumerate() {
let name = section.source.file_stem().map(std::ffi::OsStr::to_str).flatten().unwrap();
let out = chapter_root.join(&format!("{}.html", name));
print!("Rendering `{}` into `{}`...", section.source.display(), out.display());
let outfile = fs::File::create(&out)?;
let outfile = io::BufWriter::new(outfile);
let contents = fs::read_to_string(&path)?;
let (front, contents) = extract_frontmatter(&contents)?;
let front = front.unwrap_or_default().into_front(name);
let contents = format_markdown(&contents)?;
format_page(&book, front, &chapters, &format!("{}.html", name), &contents, outfile)?;
println!("Rendered `{}` into `{}`", path.display(), out.display());
let contents = format_markdown(&section.contents)?;
let next_chapter = if section_index < chapter.sections.len() - 1 {
Some(chapter.sections.iter().nth(section_index + 1).expect("chapter n+1 exists"))
}
else if chapter_index < chapters.len() - 1 {
Some(chapters.iter().nth(chapter_index + 1).expect("chapter n+1 exists"))
}
else {
None
};
format_page(&book, &section, &chapters, prev_chapter, next_chapter, &section.url, &contents, outfile)?;
prev_chapter = Some(section);
println!(" done!");
}
}

@ -1,4 +1,11 @@
use std::path::PathBuf;
use super::frontmatter::FrontMatter;
#[derive(Debug)]
pub struct Chapter {
pub url: String,
pub title: String,
pub front: FrontMatter,
pub sections: Vec<Chapter>,
pub source: PathBuf,
pub contents: String,
}

@ -1,10 +1,11 @@
use serde::Deserialize;
#[derive(Deserialize, Default)]
#[derive(Deserialize, Default, Debug)]
pub struct ParsedFrontMatter {
pub title: Option<String>,
}
#[derive(Debug)]
pub struct FrontMatter {
pub title: String,
}

@ -38,7 +38,7 @@ figure {
figcaption {
display: block;
font-size: 0.75em;
font-size: 0.75rem;
text-align: center;
}
}
@ -50,7 +50,7 @@ code, kbd {
border-radius: 3px;
word-break: break-all;
font-family: $font-mono;
font-size: 0.75em;
font-size: 0.75rem;
}
kbd {
@ -62,24 +62,24 @@ kbd {
pre {
overflow-x: auto;
font-family: $font-mono;
padding: 0.5em;
padding: 0.5rem;
}
dl {
display: grid;
grid-template-columns: auto 1fr;
grid-template-columns: auto auto;
dt {
font-weight: 700;
margin: 0;
padding: 0 0.5em 0.25em;
padding: 0 0.5em 0.25rem;
border-right: 1px solid #dddddd;
text-align: right;
}
dd {
margin: 0;
padding: 0 0.5em 0.25em;
padding: 0 0.5em 0.25rem;
}
dt, dd {
@ -96,14 +96,14 @@ p {
footer {
color: #444444;
p {
margin-right: 0.5em;
margin-right: 0.5rem;
}
}
table {
margin: 0 auto;
border-collapse: collapse;
border-spacing: 0.5em;
border-spacing: 0.5rem;
th {
border-bottom: 1px solid #eee;
@ -113,3 +113,32 @@ table {
vertical-align: top;
}
}
// sub-list numbering
// taken from: https://stackoverflow.com/a/26245056
ol {
list-style-type: none;
counter-reset: item;
margin: 0;
padding: 0;
}
ol > li {
display: table;
counter-increment: item;
margin-bottom: 0.6rem;
}
ol > li:before {
content: counters(item, ".") ". ";
display: table-cell;
padding-right: 0.6rem;
}
li ol > li {
margin: 0;
}
li ol > li:before {
content: counters(item, ".") " ";
}

@ -23,4 +23,8 @@ span.icon {
.icon-arrow-up {
width: 0.875em;
}
.icon-list-ol {
width: 1em;
}

@ -12,20 +12,20 @@ body {
nav.big {
background: #2c2c38;
padding: 0.5em 1em 1em;
padding: 0.5em 1em 1rem;
display: flex;
flex-direction: column;
header {
margin: 0 0 1em;
margin: 0 0 1rem;
display: flex;
flex-direction: column;
align-items: stretch;
border-bottom: 2px solid #888888;
h1 {
font-size: 1.5em;
font-size: 1.5rem;
font-weight: 700;
font-family: $font-sansserif;
margin-bottom: 0;
@ -44,7 +44,7 @@ body {
}
h2 {
font-size: 1em;
font-size: 1rem;
font-weight: 600;
font-family: $font-sansserif;
margin-bottom: 0;
@ -53,11 +53,11 @@ body {
}
ol {
margin: 0 2em;
margin: 0 2rem;
padding: 0;
li {
width: 100%;
font-size: 1.25em;
font-size: 1.25rem;
font-family: $font-sansserif;
color: #eeeeee;
a {
@ -77,8 +77,16 @@ body {
}
}
}
ol {
margin: 0 0 0 1rem;
}
}
}
/*ol { counter-reset: item }
li{ display: block }
li:before { content: counters(item, ".") " "; counter-increment: item }*/
}
nav.small {
@ -90,7 +98,7 @@ body {
padding: 0;
>* {
margin: 0.5em;
margin: 0.5rem;
}
a {
@ -103,10 +111,24 @@ body {
}
}
span {
display: inline-flex;
align-items: center;
>* {
margin-right: 0.5rem;
&:last-child {
margin-right: 0;
}
}
}
span.title {
text-decoration: none;
font-family: $font-sansserif;
color: #fefefe;
justify-self: center;
}
span.placeholder {
@ -121,8 +143,8 @@ body {
}
article {
max-width: 38em;
padding: 0.5em 2em 0 2em;
max-width: 38rem;
padding: 0.5em 2em 0 2rem;
>* {
max-width: 100%;
@ -136,9 +158,9 @@ body {
display: flex;
align-items: center;
justify-content: flex-end;
margin-right: 0.5em;
margin-right: 0.5rem;
font-size: 1.2em;
font-size: 1.2rem;
text-decoration: none;
font-family: $font-sansserif;
color: #5babd1;
@ -148,7 +170,7 @@ body {
}
span:first-child {
margin-right: 0.5em;
margin-right: 0.5rem;
}
}
}
@ -177,7 +199,7 @@ body {
}
article {
padding: 1em 0.5em 0 0.5em;
padding: 1em 0.5em 0 0.5rem;
}
}
}

@ -1,101 +1,114 @@
body.toc {
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: center;
> * {
width: 36rem;
}
header {
margin-top: 1rem;
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: center;
>* {
width: 36em;
h1 {
font-size: 3rem;
font-weight: 700;
font-family: $font-sansserif;
margin-bottom: 0;
}
header {
margin-top: 1em;
display: flex;
flex-direction: column;
align-items: center;
h1 {
font-size: 3em;
font-weight: 700;
font-family: $font-sansserif;
margin-bottom: 0;
}
h2 {
font-size: 1em;
font-weight: 600;
font-family: $font-sansserif;
margin-bottom: 0;
}
h2 {
font-size: 1rem;
font-weight: 600;
font-family: $font-sansserif;
margin-bottom: 0;
}
time {
font-size: 1em;
font-weight: 400;
font-family: $font-serif;
}
time {
font-size: 1rem;
font-weight: 400;
font-family: $font-serif;
}
}
nav {
background: none;
display: flex;
flex-direction: column;
align-items: stretch;
h1 {
text-align: left;
font-size: 2.5em;
font-weight: 600;
margin-bottom: 0;
nav {
background: none;
display: flex;
flex-direction: column;
align-items: stretch;
h1 {
text-align: left;
font-size: 2.5rem;
font-weight: 600;
margin-bottom: 0;
}
ol {
li {
font-size: 1.5rem;
font-family: $font-sansserif;
a {
text-decoration: none;
margin: 0 0 0.25em 0;
color: #5babd1;
&:hover {
color: #cf5ccd;
}
}
ol {
margin: 0.25em 0 0;
li {
font-size: 1.5em;
font-family: $font-sansserif;
a {
text-decoration: none;
margin: 0 0 0.25em 0;
color: #5babd1;
&:hover {
color: #cf5ccd;
}
}
}
li {
font-size: 1.25rem;
}
}
}
}
> ol {
margin-left: 0.5rem;
margin-right: 0.5rem;
}
}
footer {
flex: 1;
article,
nav {
padding: 0;
> * {
margin-left: 0.5rem;
margin-right: 0.5rem;
}
}
footer {
flex: 1;
}
}
@media screen and (max-width: 768px) {
body.toc {
>* {
width: 100%;
}
header {
h1, h2, time {
text-align: center;
}
}
body.toc {
> * {
width: 100%;
}
article, nav {
padding: 0;
>* {
margin-left: 0.5em;
margin-right: 0.5em;
}
}
header {
h1,
h2,
time {
text-align: center;
}
}
nav {
h1 {
font-size: 1.75em;
}
}
nav {
h1 {
font-size: 1.75rem;
}
}
}
}
}

@ -27,7 +27,16 @@
<h1>Table of Contents</h1>
<ol>
{% for chapter in chapters %}
<li><a href="{{ chapter.url|safe }}">{{ chapter.title }}</a></li>
<li>
<a href="{{ chapter.url|safe }}">{{ chapter.front.title }}</a>
{% if chapter.sections.len() > 0 %}
<ol>
{% for section in chapter.sections %}
<li><a href="{{ section.url|safe }}">{{ section.front.title }}</a></li>
{% endfor %}
</ol>
{% endif %}
</li>
{% endfor %}
</ol>
</nav>

@ -3,9 +3,9 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{ book.title }} | {{ title }}</title>
<link rel="stylesheet" href="style.css" type="text/css" media="all" />
<link rel="shortcut icon" href="favicon.ico" />
<title>{{ book.title }} | {{ chapter.front.title }}</title>
<link rel="stylesheet" href="../style.css" type="text/css" media="all" />
<link rel="shortcut icon" href="../favicon.ico" />
<meta property="og:title" content="{{ book.title }}" />
<meta property="og:site_name" content="{{ book.title }}" />
<meta property="og:type" content="book" />
@ -17,58 +17,79 @@
<body>
<nav class="big">
<header>
<h1><a href="index.html">{{ book.title }}</a></h1>
<h1><a href="../index.html">{{ book.title }}</a></h1>
<h2>by {{ book.author }}</h2>
</header>
<ol>
{% for chapter in chapters %}
<li><a href="{{ chapter.url|safe }}"{% if url == chapter.url %} class = "current"{% endif %}>{{ chapter.title }}</a></li>
<li>
<a href="../{{ chapter.url|safe }}"{% if url == chapter.url %} class = "current"{% endif %}>{{ chapter.front.title }}</a>
{% if chapter.sections.len() > 0 %}
<ol>
{% for section in chapter.sections %}
<li><a href="../{{ section.url|safe }}"{% if url == section.url %} class = "current"{% endif %}>{{ section.front.title }}</a></li>
{% endfor %}
</ol>
{% endif %}
</li>
{% endfor %}
</ol>
</nav>
<nav class="small">
{% match prev_chapter %}
{% when Some with (chapter) %}
<a href="{{ chapter.url }}" alt="{{ chapter.title }}">
<span>
<a href="../index.html" alt="Table of Contents">
<span class="icon">
<svg class="icon-arrow-left">
<use xlink:href="icons.svg#icon-arrow-left">
<svg class="icon-list-ol">
<use xlink:href="../icons.svg#icon-list-ol">
</svg>
</span>
</a>
{% when None %}
<a href="index.html" alt="Table of Contents">
<span class="icon">
<svg class="icon-arrow-up">
<use xlink:href="icons.svg#icon-arrow-up">
</svg>
</span>
</a>
{% endmatch %}
<span class="title">{{ title }}</span>
{% match next_chapter %}
{% when Some with (chapter) %}
<a href="{{ chapter.url }}" alt="{{ chapter.title }}">
<span class="icon">
<svg class="icon-arrow-right">
<use xlink:href="icons.svg#icon-arrow-right">
</svg>
</span>
</a>
{% when None %}
{% match prev_chapter %}
{% when Some with (chap) %}
<a href="../{{ chap.url }}" alt="{{ chap.front.title }}">
<span class="icon">
{% if chapter.sections.len() > 0 && chapter.url.ends_with("index.html") %}
<svg class="icon-arrow-up">
<use xlink:href="../icons.svg#icon-arrow-up">
</svg>
{% else %}
<svg class="icon-arrow-left">
<use xlink:href="../icons.svg#icon-arrow-left">
</svg>
{% endif %}
</span>
</a>
{% when None %}
<span class="placeholder"></span>
{% endmatch %}
</span>
<span class="title">{{ chapter.front.title }}</span>
<span>
<span class="placeholder"></span>
{% endmatch %}
{% match next_chapter %}
{% when Some with (chapter) %}
<a href="../{{ chapter.url }}" alt="{{ chapter.front.title }}">
<span class="icon">
<svg class="icon-arrow-right">
<use xlink:href="../icons.svg#icon-arrow-right">
</svg>
</span>
</a>
{% when None %}
<span class="placeholder"></span>
{% endmatch %}
</span>
</nav>
<article>
{{ content|safe }}
{% match next_chapter %}
{% when Some with (chapter) %}
<div class="next-chapter">
<a href="{{ chapter.url }}">
<span>Next chapter: “{{ chapter.title }}”</span>
<a href="../{{ chapter.url }}">
<span>Next chapter: “{{ chapter.front.title }}”</span>
<span class="icon">
<svg class="icon-arrow-right">
<use xlink:href="icons.svg#icon-arrow-right">
<use xlink:href="../icons.svg#icon-arrow-right">
</svg>
</span>
</a>

Loading…
Cancel
Save