site: bring back table of contents, hurrah
This commit is contained in:
parent
5732e42cc3
commit
29b4ac9d04
@ -41,11 +41,11 @@ main = hakyllWithConfiguration cfg $ do
|
|||||||
|
|
||||||
cfg :: HakyllConfiguration
|
cfg :: HakyllConfiguration
|
||||||
cfg = (defaultHakyllConfiguration baseurl) {
|
cfg = (defaultHakyllConfiguration baseurl) {
|
||||||
-- ,additionalContext = Context -- An additional context to use when rendering. This additional context is used globally.
|
-- additionalContext = Context, -- An additional context to use when rendering. This additional context is used globally.
|
||||||
-- ,siteDirectory = FilePath -- Directory where the site is placed.
|
-- siteDirectory = FilePath, -- Directory where the site is placed.
|
||||||
-- ,cacheDirectory = FilePath -- Directory for cache files.
|
-- cacheDirectory = FilePath, -- Directory for cache files.
|
||||||
-- ,enableIndexUrl = Bool -- Enable index links.
|
-- enableIndexUrl = False, -- Enable index links.
|
||||||
-- ,previewPollDelay = Int -- Delay between polls in preview mode.
|
-- previewPollDelay = Int, -- Delay between polls in preview mode.
|
||||||
pandocParserState = defaultParserState {
|
pandocParserState = defaultParserState {
|
||||||
-- stateParseRaw = False, -- ^ Parse raw HTML and LaTeX?
|
-- stateParseRaw = False, -- ^ Parse raw HTML and LaTeX?
|
||||||
-- stateParserContext = NullState, -- ^ Inside list?
|
-- stateParserContext = NullState, -- ^ Inside list?
|
||||||
@ -64,27 +64,43 @@ cfg = (defaultHakyllConfiguration baseurl) {
|
|||||||
-- stateColumns = 80, -- ^ Number of columns in terminal
|
-- stateColumns = 80, -- ^ Number of columns in terminal
|
||||||
-- stateHeaderTable = [], -- ^ Ordered list of header types used
|
-- stateHeaderTable = [], -- ^ Ordered list of header types used
|
||||||
-- stateIndentedCodeClasses = [] -- ^ Classes to use for indented code blocks
|
-- stateIndentedCodeClasses = [] -- ^ Classes to use for indented code blocks
|
||||||
}
|
},
|
||||||
,pandocWriterOptions = defaultWriterOptions {
|
pandocWriterOptions = defaultWriterOptions {
|
||||||
writerStandalone = False -- ^ Include header and footer
|
writerStandalone = True, -- ^ Include header and footer
|
||||||
-- ,writerTemplate = "" -- ^ Template to use in standalone mode
|
writerTemplate = pandocTemplate, -- ^ Template to use in standalone mode
|
||||||
-- ,writerVariables = [] -- ^ Variables to set in template
|
-- writerVariables = [], -- ^ Variables to set in template
|
||||||
-- ,writerIncludeBefore = "" -- ^ Text to include before the body
|
-- writerIncludeBefore = "", -- ^ Text to include before the body
|
||||||
-- ,writerIncludeAfter = "" -- ^ Text to include after the body
|
-- writerIncludeAfter = "", -- ^ Text to include after the body
|
||||||
-- ,writerTabStop = 4 -- ^ Tabstop for conversion btw spaces and tabs
|
-- writerTabStop = 4, -- ^ Tabstop for conversion btw spaces and tabs
|
||||||
-- ,writerTableOfContents = False -- ^ Include table of contents
|
writerTableOfContents = True -- ^ Include table of contents
|
||||||
-- ,writerS5 = False -- ^ We're writing S5
|
-- writerS5 = False, -- ^ We're writing S5
|
||||||
-- ,writerXeTeX = False -- ^ Create latex suitable for use by xetex
|
-- writerXeTeX = False, -- ^ Create latex suitable for use by xetex
|
||||||
-- ,writerHTMLMathMethod = PlainMath -- ^ How to print math in HTML
|
-- writerHTMLMathMethod = PlainMath, -- ^ How to print math in HTML
|
||||||
-- ,writerIgnoreNotes = False -- ^ Ignore footnotes (used in making toc)
|
-- writerIgnoreNotes = False, -- ^ Ignore footnotes (used in making toc)
|
||||||
-- ,writerIncremental = False -- ^ Incremental S5 lists
|
-- writerIncremental = False, -- ^ Incremental S5 lists
|
||||||
-- ,writerNumberSections = False -- ^ Number sections in LaTeX
|
-- writerNumberSections = False, -- ^ Number sections in LaTeX
|
||||||
-- ,writerStrictMarkdown = False -- ^ Use strict markdown syntax
|
-- writerStrictMarkdown = False, -- ^ Use strict markdown syntax
|
||||||
-- ,writerReferenceLinks = False -- ^ Use reference links in writing markdown, rst
|
-- writerReferenceLinks = False, -- ^ Use reference links in writing markdown, rst
|
||||||
-- ,writerWrapText = True -- ^ Wrap text to line length
|
-- writerWrapText = True, -- ^ Wrap text to line length
|
||||||
-- ,writerLiterateHaskell = False -- ^ Write as literate haskell
|
-- writerLiterateHaskell = False, -- ^ Write as literate haskell
|
||||||
-- ,writerEmailObfuscation = JavascriptObfuscation -- ^ How to obfuscate emails
|
-- writerEmailObfuscation = JavascriptObfuscation, -- ^ How to obfuscate emails
|
||||||
-- ,writerIdentifierPrefix = "" -- ^ Prefix for section & note ids in HTML
|
-- writerIdentifierPrefix = "", -- ^ Prefix for section & note ids in HTML
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
-- the body part of pandoc 1.5.1.1's html output template, so we can have a TOC
|
||||||
|
pandocTemplate = "\
|
||||||
|
\$if(title)$\
|
||||||
|
\<h1 class=\"title\">$title$</h1>\
|
||||||
|
\$endif$\
|
||||||
|
\$for(include-before)$\
|
||||||
|
\$include-before$\
|
||||||
|
\$endfor$\
|
||||||
|
\$if(toc)$\
|
||||||
|
\$toc$\
|
||||||
|
\$endif$\
|
||||||
|
\$body$\
|
||||||
|
\$for(include-after)$\
|
||||||
|
\$include-after$\
|
||||||
|
\$endfor$\
|
||||||
|
\"
|
||||||
|
|||||||
@ -123,4 +123,16 @@ img {
|
|||||||
.screenshot {
|
.screenshot {
|
||||||
border: 10px solid #F8F8F8; /* Soft grey border */
|
border: 10px solid #F8F8F8; /* Soft grey border */
|
||||||
}
|
}
|
||||||
#toc,#TOC { float:right; }
|
|
||||||
|
#TOC {
|
||||||
|
float:right;
|
||||||
|
font-size:small;
|
||||||
|
margin:2em 0 1em 1em;
|
||||||
|
border:thin solid #ddd;
|
||||||
|
background-color:#f0f0f0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#TOC ul {
|
||||||
|
list-style-type: none;
|
||||||
|
padding:0 1em 0 1em;
|
||||||
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user