aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorLibravatarAgustin Henze <tin@sluc.org.ar>2015-07-08 07:35:06 -0300
committerLibravatarAgustin Henze <tin@sluc.org.ar>2015-07-08 07:35:06 -0300
commit055d72d76b44b0e627c8a17c48dbecd62e44197b (patch)
treee2c8d5475477c46115461fe9547c1ee797873635 /docs
parent61f3aad02cd6492cb38e41b66f2ed8ec56e98981 (diff)
parentb0b24795b24ee6809397fbbadf42f31f310a219f (diff)
Merge tag 'upstream/7.6.0'
Upstream version 7.6.0
Diffstat (limited to 'docs')
-rw-r--r--docs/architecture/nikola-architecture-draw-io.pngbin0 -> 90059 bytes
-rw-r--r--docs/architecture/nikola-architecture-draw-io.svg1
-rw-r--r--docs/architecture/nikola-architecture-draw-io.xml1
-rw-r--r--docs/creating-a-site.txt78
-rw-r--r--docs/creating-a-theme.txt1033
-rw-r--r--docs/extending.txt70
-rw-r--r--docs/internals.txt20
-rw-r--r--docs/man/nikola.191
-rw-r--r--docs/man/nikola.1.gzbin0 -> 1777 bytes
-rw-r--r--docs/man/nikola.rst118
-rw-r--r--docs/manual.txt709
-rw-r--r--docs/social_buttons.txt2
-rw-r--r--docs/sphinx/conf.py6
-rw-r--r--docs/sphinx/index.txt3
l---------docs/sphinx/upgrading-to-v6.txt1
-rw-r--r--docs/support.rst (renamed from docs/getting-help.txt)4
-rw-r--r--docs/theming.txt52
-rw-r--r--docs/upgrading-to-v6.txt111
18 files changed, 1549 insertions, 751 deletions
diff --git a/docs/architecture/nikola-architecture-draw-io.png b/docs/architecture/nikola-architecture-draw-io.png
new file mode 100644
index 0000000..0e0f391
--- /dev/null
+++ b/docs/architecture/nikola-architecture-draw-io.png
Binary files differ
diff --git a/docs/architecture/nikola-architecture-draw-io.svg b/docs/architecture/nikola-architecture-draw-io.svg
new file mode 100644
index 0000000..9470c32
--- /dev/null
+++ b/docs/architecture/nikola-architecture-draw-io.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="2556px" height="548px" version="1.1"><defs><linearGradient x1="0%" y1="0%" x2="0%" y2="100%" id="mx-gradient-e1d5e7-1-8c6c9c-1-s-0"><stop offset="0%" style="stop-color:#E1D5E7"/><stop offset="100%" style="stop-color:#8C6C9C"/></linearGradient><linearGradient x1="0%" y1="0%" x2="0%" y2="100%" id="mx-gradient-ffffff-0.9-ffffff-0.1-s-0"><stop offset="0%" style="stop-color:#ffffff;stop-opacity:0.9"/><stop offset="100%" style="stop-color:#ffffff;stop-opacity:0.1"/></linearGradient><linearGradient x1="0%" y1="0%" x2="0%" y2="100%" id="mx-gradient-dae8fc-1-7ea6e0-1-s-0"><stop offset="0%" style="stop-color:#DAE8FC"/><stop offset="100%" style="stop-color:#7EA6E0"/></linearGradient><linearGradient x1="0%" y1="100%" x2="0%" y2="0%" id="mx-gradient-ffffff-1-ffff33-1-s-0"><stop offset="0%" style="stop-color:#FFFF33"/><stop offset="100%" style="stop-color:#ffffff"/></linearGradient><linearGradient x1="0%" y1="0%" x2="0%" y2="100%" id="mx-gradient-f8cecc-1-66ff66-1-s-0"><stop offset="0%" style="stop-color:#F8CECC"/><stop offset="100%" style="stop-color:#66FF66"/></linearGradient><linearGradient x1="0%" y1="0%" x2="0%" y2="100%" id="mx-gradient-ffffff-1-ff66b3-1-s-0"><stop offset="0%" style="stop-color:#ffffff"/><stop offset="100%" style="stop-color:#FF66B3"/></linearGradient><linearGradient x1="0%" y1="0%" x2="0%" y2="100%" id="mx-gradient-ffffff-1-ff9933-1-s-0"><stop offset="0%" style="stop-color:#ffffff"/><stop offset="100%" style="stop-color:#FF9933"/></linearGradient><linearGradient x1="0%" y1="0%" x2="0%" y2="100%" id="mx-gradient-ffffff-1-66ff66-1-s-0"><stop offset="0%" style="stop-color:#ffffff"/><stop offset="100%" style="stop-color:#66FF66"/></linearGradient><linearGradient x1="0%" y1="0%" x2="0%" y2="100%" id="mx-gradient-ffffff-1-66ffff-1-s-0"><stop offset="0%" style="stop-color:#ffffff"/><stop offset="100%" style="stop-color:#66FFFF"/></linearGradient><linearGradient x1="0%" y1="0%" x2="0%" y2="100%" id="mx-gradient-ffffff-1-ffff66-1-s-0"><stop offset="0%" style="stop-color:#ffffff"/><stop offset="100%" style="stop-color:#FFFF66"/></linearGradient></defs><g transform="translate(0.5,0.5)"><rect x="2.58" y="425.61" width="1530" height="56" fill="#d0d0d0" stroke="#d0d0d0" transform="translate(2,3)" opacity="1"/><rect x="2.58" y="425.61" width="1530" height="56" fill="url(#mx-gradient-e1d5e7-1-8c6c9c-1-s-0)" stroke="#000000" pointer-events="none"/><path d="M 1.58 424.61 L 1.58 448.01 Q 767.58 464.81 1533.58 448.01 L 1533.58 424.61 Z" fill="url(#mx-gradient-ffffff-0.9-ffffff-0.1-s-0)" stroke="none" pointer-events="none"/><g transform="translate(712,415)"><switch><foreignObject pointer-events="all" width="109" height="78" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.26; vertical-align: top; width: 109px; white-space: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;"><h1><font style="font-size: 35px ; font-weight: normal">Yapsy</font></h1></div></div></foreignObject><text x="55" y="45" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><rect x="1550.58" y="425.61" width="1001" height="60" fill="#d0d0d0" stroke="#d0d0d0" transform="translate(2,3)" opacity="1"/><rect x="1550.58" y="425.61" width="1001" height="60" fill="url(#mx-gradient-dae8fc-1-7ea6e0-1-s-0)" stroke="#000000" pointer-events="none"/><path d="M 1549.58 424.61 L 1549.58 449.61 Q 2051.08 467.61 2552.58 449.61 L 2552.58 424.61 Z" fill="url(#mx-gradient-ffffff-0.9-ffffff-0.1-s-0)" stroke="none" pointer-events="none"/><g transform="translate(2019,420)"><switch><foreignObject pointer-events="all" width="62" height="71" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.26; vertical-align: top; width: 62px; white-space: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;"><h2><font style="font-size: 31px ; font-weight: normal">doit</font></h2></div></div></foreignObject><text x="31" y="42" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><rect x="2.58" y="377.61" width="1529" height="38" fill="url(#mx-gradient-ffffff-1-ffff33-1-s-0)" stroke="#000000" pointer-events="none"/><g transform="translate(730,371)"><switch><foreignObject pointer-events="all" width="72" height="52" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.26; vertical-align: top; width: 72px; white-space: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;"><h3><font style="font-size: 18px">IPlugin</font></h3></div></div></foreignObject><text x="36" y="32" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><rect x="3.58" y="287.61" width="1526" height="79" fill="#d0d0d0" stroke="#d0d0d0" transform="translate(2,3)" opacity="1"/><rect x="3.58" y="287.61" width="1526" height="79" fill="url(#mx-gradient-f8cecc-1-66ff66-1-s-0)" stroke="#000000" pointer-events="none"/><path d="M 2.58 286.61 L 2.58 319.21 Q 766.58 342.91 1530.58 319.21 L 1530.58 286.61 Z" fill="url(#mx-gradient-ffffff-0.9-ffffff-0.1-s-0)" stroke="none" pointer-events="none"/><rect x="162.58" y="297.61" width="149" height="30" fill="#ffffff" stroke="#000000" pointer-events="none"/><g transform="translate(215,304)"><switch><foreignObject pointer-events="all" width="42" height="18" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.26; vertical-align: top; width: 42px; white-space: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;"><b><font style="font-size: 13px">Task</font></b></div></div></foreignObject><text x="21" y="15" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><rect x="464.58" y="297.61" width="149" height="30" fill="#ffffff" stroke="#000000" pointer-events="none"/><g transform="translate(480,304)"><switch><foreignObject pointer-events="all" width="116" height="18" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.26; vertical-align: top; width: 116px; white-space: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;"><b><font style="font-size: 13px">TemplateSystem</font></b></div></div></foreignObject><text x="58" y="15" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><rect x="1370.58" y="297.61" width="149" height="30" fill="#ffffff" stroke="#000000" pointer-events="none"/><g transform="translate(1398,304)"><switch><foreignObject pointer-events="all" width="92" height="18" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.26; vertical-align: top; width: 92px; white-space: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;"><b><font style="font-size: 13px">ConfigPlugin</font></b></div></div></foreignObject><text x="46" y="15" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><rect x="1068.58" y="297.61" width="149" height="30" fill="#ffffff" stroke="#000000" pointer-events="none"/><g transform="translate(1073,304)"><switch><foreignObject pointer-events="all" width="138" height="18" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.26; vertical-align: top; width: 138px; white-space: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;"><b><font style="font-size: 13px">MarkdownExtension</font></b></div></div></foreignObject><text x="69" y="15" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><rect x="914.58" y="297.61" width="149" height="30" fill="#ffffff" stroke="#000000" pointer-events="none"/><g transform="translate(938,304)"><switch><foreignObject pointer-events="all" width="100" height="17" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.26; vertical-align: top; width: 100px; white-space: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;"><span style="line-height: 13.8599996566772px"><b><font style="font-size: 13px">TaskMultiplier</font></b></span></div></div></foreignObject><text x="50" y="15" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><rect x="766.58" y="297.61" width="143" height="30" fill="#ffffff" stroke="#000000" pointer-events="none"/><g transform="translate(786,304)"><switch><foreignObject pointer-events="all" width="102" height="18" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.26; vertical-align: top; width: 102px; white-space: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;"><b><font style="font-size: 13px">RestExtension</font></b></div></div></foreignObject><text x="51" y="15" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><rect x="1222.58" y="297.61" width="143" height="30" fill="#ffffff" stroke="#000000" pointer-events="none"/><g transform="translate(1243,304)"><switch><foreignObject pointer-events="all" width="100" height="18" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.26; vertical-align: top; width: 100px; white-space: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;"><b><font style="font-size: 13px">SignalHandler</font></b></div></div></foreignObject><text x="50" y="15" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><rect x="14.58" y="297.61" width="143" height="30" fill="#ffffff" stroke="#000000" pointer-events="none"/><g transform="translate(47,304)"><switch><foreignObject pointer-events="all" width="76" height="18" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.26; vertical-align: top; width: 76px; white-space: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;"><b><font style="font-size: 13px">Command</font></b></div></div></foreignObject><text x="38" y="15" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><rect x="316.58" y="297.61" width="143" height="30" fill="#ffffff" stroke="#000000" pointer-events="none"/><g transform="translate(353,304)"><switch><foreignObject pointer-events="all" width="68" height="18" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.26; vertical-align: top; width: 68px; white-space: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;"><b><font style="font-size: 13px">LateTask</font></b></div></div></foreignObject><text x="34" y="15" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><rect x="618.58" y="297.61" width="143" height="30" fill="#ffffff" stroke="#000000" pointer-events="none"/><g transform="translate(639,304)"><switch><foreignObject pointer-events="all" width="100" height="18" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.26; vertical-align: top; width: 100px; white-space: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;"><b><font style="font-size: 13px">PageCompiler</font></b></div></div></foreignObject><text x="50" y="15" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><rect x="615.58" y="334.61" width="295" height="25" fill="none" stroke="none" pointer-events="none"/><g transform="translate(703,339)"><switch><foreignObject pointer-events="all" width="121" height="19" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.26; vertical-align: top; overflow: hidden; max-height: 21px; max-width: 291px; width: 121px; white-space: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;"><b><font style="font-size: 14px">Plugin Categories</font></b></div></div></foreignObject><text x="61" y="16" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><rect x="14.58" y="109.61" width="143" height="169" fill="none" stroke="#000000" pointer-events="none"/><g transform="translate(79,186)"><switch><foreignObject pointer-events="all" width="12" height="17" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.26; vertical-align: top; width: 12px; white-space: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;"><div style="text-align: left"><br /></div></div></div></foreignObject><text x="6" y="15" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><rect x="23.58" y="118.61" width="129" height="22" fill="none" stroke="none" pointer-events="none"/><g transform="translate(52,122)"><switch><foreignObject pointer-events="all" width="73" height="18" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.26; vertical-align: top; overflow: hidden; max-height: 18px; max-width: 125px; width: 73px; white-space: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;"><b><font style="font-size: 13px">Commands</font></b><div><br /></div></div></div></foreignObject><text x="37" y="15" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><rect x="29.58" y="140.61" width="114" height="129" fill="none" stroke="none" pointer-events="none"/><g transform="translate(51,145)"><switch><foreignObject pointer-events="all" width="72" height="122" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.26; vertical-align: top; overflow: hidden; max-height: 125px; max-width: 110px; width: 72px; white-space: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;">init<div>install_theme</div><div>new_post</div><div>new_page</div><div>deploy</div><div>serve</div><div>...</div><div><br /></div></div></div></foreignObject><text x="36" y="67" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><rect x="163.58" y="110.61" width="143" height="169" fill="none" stroke="#000000" pointer-events="none"/><g transform="translate(228,187)"><switch><foreignObject pointer-events="all" width="12" height="17" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.26; vertical-align: top; width: 12px; white-space: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;"><div style="text-align: left"><br /></div></div></div></foreignObject><text x="6" y="15" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><rect x="174.58" y="118.61" width="129" height="22" fill="none" stroke="none" pointer-events="none"/><g transform="translate(220,122)"><switch><foreignObject pointer-events="all" width="39" height="18" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.26; vertical-align: top; overflow: hidden; max-height: 18px; max-width: 125px; width: 39px; white-space: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;"><b><font style="font-size: 13px">Tasks</font></b></div></div></foreignObject><text x="20" y="15" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><rect x="181.58" y="141.61" width="114" height="129" fill="none" stroke="none" pointer-events="none"/><g transform="translate(216,146)"><switch><foreignObject pointer-events="all" width="46" height="122" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.26; vertical-align: top; overflow: hidden; max-height: 125px; max-width: 110px; width: 46px; white-space: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;"><div>archives</div><div>galleries</div><div>indexes</div><div>pages</div><div>posts</div><div>rss</div><div>tags</div><div>...</div></div></div></foreignObject><text x="23" y="67" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><rect x="482.58" y="169.61" width="114" height="55" fill="none" stroke="none" pointer-events="none"/><g transform="translate(524,182)"><switch><foreignObject pointer-events="all" width="32" height="32" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.26; vertical-align: top; overflow: hidden; max-height: 51px; max-width: 110px; width: 32px; white-space: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;">jinja<div>mako</div></div></div></foreignObject><text x="16" y="22" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><rect x="467.58" y="109.61" width="143" height="169" fill="none" stroke="#000000" pointer-events="none"/><g transform="translate(532,186)"><switch><foreignObject pointer-events="all" width="12" height="17" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.26; vertical-align: top; width: 12px; white-space: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;"><div style="text-align: left"><br /></div></div></div></foreignObject><text x="6" y="15" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><rect x="477.58" y="118.61" width="129" height="22" fill="none" stroke="none" pointer-events="none"/><g transform="translate(484,122)"><switch><foreignObject pointer-events="all" width="117" height="18" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.26; vertical-align: top; overflow: hidden; max-height: 18px; max-width: 125px; width: 117px; white-space: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;"><b><font style="font-size: 13px">Template Systems</font></b></div></div></foreignObject><text x="59" y="15" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><rect x="619.58" y="109.61" width="143" height="169" fill="none" stroke="#000000" pointer-events="none"/><g transform="translate(656,156)"><switch><foreignObject pointer-events="all" width="68" height="77" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.26; vertical-align: top; width: 68px; white-space: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;"><div style="text-align: left">ipynb</div><div style="text-align: left">markdown</div><div style="text-align: left">rest</div><div style="text-align: left">php</div><div style="text-align: left">pandoc</div></div></div></foreignObject><text x="34" y="45" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><rect x="626.58" y="119.61" width="129" height="22" fill="none" stroke="none" pointer-events="none"/><g transform="translate(641,123)"><switch><foreignObject pointer-events="all" width="101" height="18" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.26; vertical-align: top; overflow: hidden; max-height: 18px; max-width: 125px; width: 101px; white-space: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;"><b><font style="font-size: 13px">Page Compilers</font></b></div></div></foreignObject><text x="51" y="15" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><rect x="1879.58" y="274.61" width="544" height="85" fill="none" stroke="#000000" pointer-events="none"/><g transform="translate(2145,309)"><switch><foreignObject pointer-events="all" width="12" height="17" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.26; vertical-align: top; width: 12px; white-space: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;"><br /></div></div></foreignObject><text x="6" y="15" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><rect x="1550.58" y="378.61" width="320" height="37" fill="url(#mx-gradient-ffffff-1-ff66b3-1-s-0)" stroke="#000000" pointer-events="none"/><g transform="translate(1664,388)"><switch><foreignObject pointer-events="all" width="91" height="19" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.26; vertical-align: top; width: 91px; white-space: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;"><font style="font-size: 14px"><b>TaskLoader</b></font></div></div></foreignObject><text x="46" y="16" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><rect x="1550.58" y="333.61" width="320" height="37" fill="url(#mx-gradient-ffffff-1-ff9933-1-s-0)" stroke="#000000" pointer-events="none"/><g transform="translate(1643,343)"><switch><foreignObject pointer-events="all" width="133" height="19" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.26; vertical-align: top; width: 133px; white-space: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;"><font style="font-size: 14px"><b>NikolaTaskLoader</b></font></div></div></foreignObject><text x="67" y="16" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><rect x="1887.58" y="286.61" width="128" height="32" fill="url(#mx-gradient-ffffff-1-ff9933-1-s-0)" stroke="#000000" pointer-events="none"/><g transform="translate(1931,293)"><switch><foreignObject pointer-events="all" width="39" height="19" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.26; vertical-align: top; width: 39px; white-space: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;"><b><font style="font-size: 14px">Run</font></b></div></div></foreignObject><text x="20" y="16" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><rect x="2288.58" y="286.61" width="128" height="32" fill="url(#mx-gradient-ffffff-1-ffff33-1-s-0)" stroke="#000000" pointer-events="none"/><g transform="translate(2330,293)"><switch><foreignObject pointer-events="all" width="43" height="19" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.26; vertical-align: top; width: 43px; white-space: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;"><b><font style="font-size: 14px">Auto</font></b></div></div></foreignObject><text x="22" y="16" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><rect x="2155.58" y="286.61" width="128" height="32" fill="url(#mx-gradient-ffffff-1-66ff66-1-s-0)" stroke="#000000" pointer-events="none"/><g transform="translate(2197,293)"><switch><foreignObject pointer-events="all" width="43" height="19" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.26; vertical-align: top; width: 43px; white-space: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;"><b><font style="font-size: 14px">Help</font></b></div></div></foreignObject><text x="22" y="16" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><rect x="2022.58" y="286.61" width="128" height="32" fill="url(#mx-gradient-ffffff-1-66ffff-1-s-0)" stroke="#000000" pointer-events="none"/><g transform="translate(2060,293)"><switch><foreignObject pointer-events="all" width="51" height="19" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.26; vertical-align: top; width: 51px; white-space: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;"><b><font style="font-size: 14px">Clean</font></b></div></div></foreignObject><text x="26" y="16" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><rect x="1890.58" y="314.61" width="525" height="40" fill="none" stroke="none" pointer-events="none"/><g transform="translate(2075,318)"><switch><foreignObject pointer-events="all" width="157" height="36" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.26; vertical-align: top; overflow: hidden; max-height: 36px; max-width: 521px; width: 157px; white-space: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;"><h3><b><font style="font-size: 16px">doit Sub Commands</font></b></h3><div><br /></div></div></div></foreignObject><text x="79" y="24" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><rect x="1879.58" y="186.61" width="544" height="79" fill="none" stroke="#000000" pointer-events="none"/><g transform="translate(2145,218)"><switch><foreignObject pointer-events="all" width="12" height="17" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.26; vertical-align: top; width: 12px; white-space: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;"><br /></div></div></foreignObject><text x="6" y="15" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><rect x="1889.58" y="177.61" width="525" height="40" fill="none" stroke="none" pointer-events="none"/><g transform="translate(2064,181)"><switch><foreignObject pointer-events="all" width="177" height="36" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.26; vertical-align: top; overflow: hidden; max-height: 36px; max-width: 521px; width: 177px; white-space: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;"><h3><b><font style="font-size: 16px">Nikola Sub Commands</font></b></h3><div><br /></div></div></div></foreignObject><text x="89" y="24" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><rect x="1887.58" y="225.61" width="128" height="32" fill="url(#mx-gradient-ffffff-1-ff9933-1-s-0)" stroke="#000000" pointer-events="none"/><g transform="translate(1927,232)"><switch><foreignObject pointer-events="all" width="47" height="19" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.26; vertical-align: top; width: 47px; white-space: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;"><b><font style="font-size: 14px">Build</font></b></div></div></foreignObject><text x="24" y="16" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><rect x="2021.58" y="225.61" width="128" height="32" fill="url(#mx-gradient-ffffff-1-66ffff-1-s-0)" stroke="#000000" pointer-events="none"/><g transform="translate(2059,232)"><switch><foreignObject pointer-events="all" width="51" height="19" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.26; vertical-align: top; width: 51px; white-space: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;"><b><font style="font-size: 14px">Clean</font></b></div></div></foreignObject><text x="26" y="16" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><rect x="2155.58" y="225.61" width="128" height="32" fill="url(#mx-gradient-ffffff-1-66ff66-1-s-0)" stroke="#000000" pointer-events="none"/><g transform="translate(2197,232)"><switch><foreignObject pointer-events="all" width="43" height="19" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.26; vertical-align: top; width: 43px; white-space: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;"><b><font style="font-size: 14px">Help</font></b></div></div></foreignObject><text x="22" y="16" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><rect x="2288.58" y="225.61" width="128" height="32" fill="url(#mx-gradient-ffffff-1-ffff66-1-s-0)" stroke="#000000" pointer-events="none"/><g transform="translate(2330,232)"><switch><foreignObject pointer-events="all" width="43" height="19" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.26; vertical-align: top; width: 43px; white-space: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;"><b><font style="font-size: 14px">Auto</font></b></div></div></foreignObject><text x="22" y="16" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><rect x="1550.58" y="150.61" width="321" height="138" fill="none" stroke="#000000" pointer-events="none"/><g transform="translate(1704,211)"><switch><foreignObject pointer-events="all" width="12" height="17" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.26; vertical-align: top; width: 12px; white-space: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;"><br /></div></div></foreignObject><text x="6" y="15" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><rect x="1593.58" y="122.61" width="232" height="59" fill="none" stroke="none" pointer-events="none"/><g transform="translate(1671,130)"><switch><foreignObject pointer-events="all" width="78" height="47" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.26; vertical-align: top; overflow: hidden; max-height: 55px; max-width: 228px; width: 78px; white-space: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;"><b><br /></b><div><div><b><br /></b></div><div><b>default_tasks</b></div></div></div></div></foreignObject><text x="39" y="30" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><path d="M 1710.76 122.88 L 1710.76 122.88" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 1710.76 122.88 L 1710.76 122.88 L 1710.76 122.88 L 1710.76 122.88 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><rect x="1552.58" y="296.61" width="318" height="28" fill="none" stroke="#000000" pointer-events="none"/><g transform="translate(1668,301)"><switch><foreignObject pointer-events="all" width="85" height="19" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.26; vertical-align: top; width: 85px; white-space: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;"><b><font style="font-size: 14px">load_tasks</font></b></div></div></foreignObject><text x="43" y="16" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><rect x="1561.58" y="189.61" width="138" height="80" fill="none" stroke="#000000" pointer-events="none"/><g transform="translate(1562,206)"><switch><foreignObject pointer-events="all" width="135" height="47" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.26; vertical-align: top; width: 133px; white-space: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;"><b>render_site</b><div>Group of tasks to render the site<br /></div></div></div></foreignObject><text x="68" y="30" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><rect x="1713.58" y="190.61" width="141" height="79" fill="none" stroke="#000000" pointer-events="none"/><g transform="translate(1714,199)"><switch><foreignObject pointer-events="all" width="138" height="62" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.26; vertical-align: top; width: 136px; white-space: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;"><div><b>post_render</b></div>Group of tasks to be executed after site is rendered.</div></div></foreignObject><text x="69" y="37" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><path d="M 1950.15 225.91 L 1950.15 41.61 L 1710.76 41.61 L 1710.76 143.78" fill="none" stroke="#d0d0d0" stroke-miterlimit="10" stroke-dasharray="3 3" transform="translate(2,3)" opacity="1"/><path d="M 1950.15 225.91 L 1950.15 41.61 L 1710.76 41.61 L 1710.76 143.78" fill="none" stroke="#000000" stroke-miterlimit="10" stroke-dasharray="3 3" pointer-events="none"/><path d="M 1710.76 149.03 L 1707.26 142.03 L 1710.76 143.78 L 1714.26 142.03 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><g transform="translate(1771,13)"><switch><foreignObject pointer-events="all" width="92" height="73" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.26; vertical-align: top; white-space: nowrap; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;background-color:#ffffff;"><h2><b><font color="#cc0000" style="font-size: 21px">executes</font></b></h2><div><br /></div></div></div></foreignObject><text x="46" y="43" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><path d="M 1628.94 186.52 L 1628.94 32.61 L 235 32.61 L 235 104.39" fill="none" stroke="#d0d0d0" stroke-miterlimit="10" stroke-dasharray="3 3" transform="translate(2,3)" opacity="1"/><path d="M 1628.94 186.52 L 1628.94 32.61 L 235 32.61 L 235 104.39" fill="none" stroke="#000000" stroke-miterlimit="10" stroke-dasharray="3 3" pointer-events="none"/><path d="M 235 109.64 L 231.5 102.64 L 235 104.39 L 238.5 102.64 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><g transform="translate(861,3)"><switch><foreignObject pointer-events="all" width="193" height="60" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.26; vertical-align: top; white-space: nowrap; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;background-color:#ffffff;"><h4><font style="font-size: 21px" color="#cc0000">implemented using</font></h4></div></div></foreignObject><text x="97" y="36" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><path d="M 1783.48 189.55 L 1784.08 82.61 L 388.08 82.61 L 389.5 292.27" fill="none" stroke="#d0d0d0" stroke-miterlimit="10" stroke-dasharray="3 3" transform="translate(2,3)" opacity="1"/><path d="M 1783.48 189.55 L 1784.08 82.61 L 388.08 82.61 L 389.5 292.27" fill="none" stroke="#000000" stroke-miterlimit="10" stroke-dasharray="3 3" pointer-events="none"/><path d="M 389.54 297.52 L 385.99 290.54 L 389.5 292.27 L 392.99 290.49 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><g transform="translate(1007,53)"><switch><foreignObject pointer-events="all" width="193" height="60" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.26; vertical-align: top; white-space: nowrap; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;background-color:#ffffff;"><h4><font style="font-size: 21px" color="#cc0000">implemented using</font></h4></div></div></foreignObject><text x="97" y="36" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><rect x="2429.58" y="370.61" width="120" height="49" fill="#ffffff" stroke="#000000" pointer-events="none"/><g transform="translate(2449,384)"><switch><foreignObject pointer-events="all" width="79" height="22" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.26; vertical-align: top; width: 79px; white-space: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;"><b><font style="font-size: 16px">DoitMain</font></b></div></div></foreignObject><text x="40" y="17" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><rect x="2429.58" y="310.61" width="120" height="49" fill="#ffffff" stroke="#000000" pointer-events="none"/><g transform="translate(2443,324)"><switch><foreignObject pointer-events="all" width="91" height="22" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.26; vertical-align: top; width: 91px; white-space: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;"><b><font style="font-size: 16px">DoitNikola</font></b></div></div></foreignObject><text x="46" y="17" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><rect x="1879.58" y="368.61" width="543" height="51" fill="#ffffff" stroke="#000000" pointer-events="none"/><g transform="translate(2100,382)"><switch><foreignObject pointer-events="all" width="100" height="24" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.26; vertical-align: top; width: 100px; white-space: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;"><b><font style="font-size: 18px">Command</font></b></div></div></foreignObject><text x="50" y="18" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><path d="M 86.52 268.33 L 86.52 533.61 L 2150.15 533.61 L 2150.15 426.22" fill="none" stroke="#000000" stroke-miterlimit="10" stroke-dasharray="3 3" pointer-events="none"/><path d="M 2150.15 420.97 L 2153.65 427.97 L 2150.15 426.22 L 2146.65 427.97 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><g transform="translate(1051,521)"><switch><foreignObject pointer-events="all" width="193" height="28" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.26; vertical-align: top; white-space: nowrap; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;background-color:#ffffff;"><font style="font-size: 21px" color="#cc0000"><b>implemented using</b></font></div></div></foreignObject><text x="97" y="20" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g></g></svg> \ No newline at end of file
diff --git a/docs/architecture/nikola-architecture-draw-io.xml b/docs/architecture/nikola-architecture-draw-io.xml
new file mode 100644
index 0000000..d5aeec7
--- /dev/null
+++ b/docs/architecture/nikola-architecture-draw-io.xml
@@ -0,0 +1 @@
+<mxfile type="device"><diagram>7V1bc6M6Ev41eXQKTMD24yQzmdmqM1tTJ6d2d55SxMi2TjB4Aecyv/60oNuWhHCwudjJ2C82QjSgr29qtdoXzs3y5Wvirxbf44CFF0MreLlwPl8Mh0PXHV26Y/glGl+LRtv1rEvPLhrnCQ+wedtwx38xbLSwdc0DliodszgOM75SG6dxFLFpprTN4lC9xcqfE/ltw93UD8ut/+VBtsB3GVv4MOLEN8bnC7zP5kSavRKNgM38dZgN8iY4J04vfaKV93e+wMAlcQxUxK/lyw0LxeDRgBREbyvObh4yYRE+x+4LnOKCJz9c4zNeDL0QLr1eAC1vLn5RyywGmvL7eP9fi+fMTwzSHJ5P0MFxVy/wlV8J4wznnnFcxNkoTpY+PAJdTHf56a/SV7oVPHBxN/UJoFl+LG10nxc8Y3crfyqOn4HzxFtkyxCObPi5Wicr0fU6zZL4kd3EYZzkFzpW/ikPHY7mE0syhrybN+FQfmXxkmUJPLRFZ4kzkamvHDx+3nKM7VLjQuIW1yvafOTc+Yb2Fjz4gfiZsbyqxlL8OgxL+xAsg5gL7N6CUnqq/aB8yN+wSyA90k+7kLQsJCwj6WHHJkiOqpEEgT0MSXsskNSR+tePcD3nUQ2wpBvvB9aMh6GE0S18HAfa54kfcIBIOjfLP9K5zzwBxc3jCM4Ds4mR71F8nTHqaEV8h5My6A5ySxPQkYQC+n4jnTAgZRpXz7u99byOxw4vwbEbToxjh2pOHrsRjmeTsSPgDBLzcLDAOCaB+ctPH9+WFumm+0HYAhLDkcbFlgGJKxMTt6C5iAt6AIItV6EPY/maZmx52pC4I4TgKJC4fUFyE0czPq9rUY4JiH01Uu17v4hU2/eWEfnuJ49B/Bx9eclYlAo7etqw2CM0EEeBxWSBi3FJVz4MnQGFkEdsQA9S4HA5difw8VzPG42GJlQ6NE3fYXrJVyFnyV5Ib9qKFz0eA1jk9RyDAYwuWCdQ/cnS7J3I5HiE88qdiGAcoXVEEOnuEbnj88gPv/lREO4pO/0LiUNDewxIiEYf7sRyCXicOBi1FFZXWPTmbf8BnvbpT32uKAZ2FDDwXt2D8QNCzSAcK37yqmpEE/6jAFId3D4ckCsjIDjlsW5ATOZxwmFVogEuMLh5rG8LhRq3ieJIhD/lwBo2+SGYMTicAmTAG861gIrDIsYnPLHkARg4OGHCPobeszB+hpYF9GNwQTtMgEAQEzho1SUmGE5wliozwRDbGjFBtQcR8Ccj5GL4BziSAvOQzQR+VU68EEEd25x083Apolod0Wvfftk2qtC3JNT2WojbXfXtTOwnlxKfNAT9g4m0TZ4HcQ2JuMw1pkA5cVsjpil7PTzaLjhJMPAozfwwvM8WbMmqkCpdFbHn+1WcyitYNS4Qy8d1LwjYKozlxc7d3VOWPNUnfnl5WbvvmZ+JnzEkR/x8haZH5mfSjIoWJCZvxNDVnuPZRuUrGpq2oZB2PzaqCzeyMoB3dhwl3Gn99ShWpjqdQpIcP5ku+JPi7u/WuHOwR0ybIOy+gkcBe9mjv7BEe/QGQ1e/d5LW75v58/qddxitj87jyL8by4Masx/LU54d/c2jv30DQkv/Mf49IXInarjVpoj4WxC5Lcxf3eoQ39k3yJfWcZCPMn91e4v5UboDdCgyHs6OgsQEY40J+nQU3Gr/sJmE8tVrJCB8y4IefIMlZgd0eY8EVjq7pL9arDolDzGjePouNeOI0kiPoxmr3ecOVkNE6B0XRM56UWIBR10Ps2l9rBe9iExs4gDJ5+hChm5vJ5M8x7jDfNfJWBWvTR6rNLYuTSLlsSVb1WhsqzPImq1klWRUxCT+iP1AWWk0ZQ6pstYoRbyUBq5A63nXHUOrJ/8747I74eDGGnXVEmFpBG11ElLL0P6bP8ahf3oAdy+7JYApf78XgLvIaTIi/ue6y9yyKnwOQbsNfUwryJsNCEhDsXWIs4JpC7aONv10j+mndSaHYU4U1HyLTwvBMWei5o/0C2oX2VVGUL+xUJ7FnCSo7a3mDD01H6RfULuI2BhBvQlZnkt98qje3raBqq0lpfaL6o59zKUdk4fj7JlwLja7WndroCtmoYemmWibLM9r9dWWXvPebMPMi3LHZE6jbKNGnLYjrvEBZ7W2QYqNs9o2dnF61TvVOpfiYjJ0luNe5VjjNcN26+7keEd0ql0/4HrNodTI7zsPM1VO6MwP6GJn5dm7k6LER0G1i31554lYeSLWK6i9hcHeS8ikHVBLIZM+QR3tyJX8AN6xHje2KcNHiRsbigLZbRSIobSjOhJjdC7r7GwwOaqHEa+ffL5Ni8/Lo91nWh5sTdK/mfs8oupTm8VddH7kbVUk1EpaWgtTNarTII0vC6BeHh6KUk3xPIYd1V+2rddJvIZcVkFBaEcJCPbCs/+J5ksXj35iJxif5FU6JQ6Lc1UjmMbrJB9+SWIyP5kzmqhim3jcneOcMMi3gtxehXqjMevNOQ1hPa8kRcexe7sUdltb2DxaftnsMi0HLRyq7qGkObShlWs4p/BysL56n8J41lTHX0FWwBO14lnOvjmSUNwyZ0tBSxwtRNqLTLPtVM5TQljLkp4YElnIxirJFi2ECsZvpOBWWDORWX9PaNW1ZdW4Pwi0YSPAdJ2BCoU3mglbRAxgcdGxuBsLIJf+vSI9pms2SJv2+hhcrDYCkGOTh7XDzLHwIX6WLVzeACfIQchNVvApSfLWaeinKZ9qtq/Swsl20bZF+T6yjPalDWnPxfEP2E0CLyr8kvwa1cjC/sckw8q5eQHAhQ8Zn4R6bio3BAR78Gi+ubKKJYozVARXEAr8dJHf0lB/1mCWKc6rmGWcObxpltUCnAZXmxpr22+8x4+Y5zaXONElP4kmUhY+ItHA4Ssuk2vs6pQ8jZKtUyoGokQJ+MYXr0zdVqIDyHnlI09oJyFVLS1Ecsv9BcWtLGzGtZ54VMdMyxVmq1ya6Yajtl6LM50WU7Rt09uuzzAvTau7PqghDw3cl16jm8A9ZEXzX/5D3kGIVP0ZRug/sPDanz7Oc0E3hRe6UuakHbGcNj7+psT0HlreurQ8kgHy2VoR2oGj1RtRCcSzWQoKR7cIe0qByY0/xEgsoFDIL+DNWmZCVdyVCEsWA3YOKRYDSq/stjazkK++Sb//I1kh3cpIGl81OYdOy0hznYz+H2llVAd6fKyu+nc1Olr6b1u636JVMWL9gk1b0/3V4doFwHnY7FVX4XWNA+6PgR1RUNcBNKbwh9ep8F3ermMtPewHVdOon1pR07a2RDBAOTpUuFrVxJSbcJKauJGGpCmnrCGp5MrJaMiJVvJ7YFuabqurIsc6pY505JDeHO+DotKWjqSS52cdeeo6kjRHcx05ACU51qrcNdSRJASav9GOyuyimIkxoeozpEV+90+9EDjs3lWTkBzaT64slxq0KJVOaBJvoihmP2hQitv7wsNU66czPLoolW/835X3UdtWzwZ1KEqnZIMathBT1YpGYBxlnl01Qa5eptQCoPs7exTNlp094sSTcfZKJdI8nUZdZ2+7iw4puTql1tw9Wt+jG+EKUWv+XvOtms28u5Jy2u3u7b2rs2dvz+CntTmXHV+pfDdoGHMkMmjEm/hpcLj9z7+i+/afE50v/wA=</diagram></mxfile>
diff --git a/docs/creating-a-site.txt b/docs/creating-a-site.txt
index 423b2c1..0891753 100644
--- a/docs/creating-a-site.txt
+++ b/docs/creating-a-site.txt
@@ -1,5 +1,5 @@
.. slug: creating-a-site-not-a-blog-with-nikola
-.. date: 2013/03/01 12:49:41
+.. date: 2015-01-10 10:00:00 UTC
.. tags: nikola, python
.. link:
.. description:
@@ -10,19 +10,22 @@ Creating a Site (Not a Blog) with Nikola
.. class:: lead
-One of the most frequent questions I get about Nikola is "but how do
-I create a site that's not a blog?". And of course, that's because the
-documentation is heavily blog-oriented. This document will change that ;-)
+One of the most frequent questions I get about Nikola is “but how do
+I create a site that’s not a blog?”. And of course, that’s because the
+documentation is heavily blog–oriented. This document will change that ;-)
Since it started, Nikola has had the capabilities to create generic sites. For example,
-Nikola's `own site <http://getnikola.com>`_ is a fairly generic one. Let's go
+Nikola’s `own site <https://getnikola.com/>`_ is a fairly generic one. Let’s go
step by step on how you can do something like that.
As usual when starting a nikola site, you start with ``nikola init`` which creates a
-empty semi-configured site::
+empty (mostly) configured site::
$ nikola init mysite
- Created empty site at mysite.
+ Creating Nikola Site
+ ====================
+ ⋮
+ [1970-01-01T00:00:00Z] INFO: init: Created empty site at mysite.
Then we go into the new ``mysite`` folder, and make the needed changes in the ``conf.py``
configuration file:
@@ -40,8 +43,8 @@ configuration file:
BLOG_TITLE = "Not a Blog"
# This is the main URL for your site. It will be used
# in a prominent link
- SITE_URL = "http://notablog.ralsina.com.ar/"
- BLOG_EMAIL = "ralsina@kde.org"
+ SITE_URL = "https://getnikola.com/"
+ BLOG_EMAIL = "ralsina@example.com"
BLOG_DESCRIPTION = "This is a demo site (not a blog) for Nikola."
#
@@ -58,12 +61,13 @@ configuration file:
And now we are ready to create our first page::
- $ nikola new_post -p
- Creating New Post
+ $ nikola new_page
+ Creating New Page
-----------------
- Enter title: index
- Your post's text is at: pages/index.txt
+ Title: index
+ Scanning posts....done!
+ [1970-01-01T00:00:00Z] INFO: new_page: Your page's text is at: stories/index.rst
.. note:: The ``-p`` option in the ``nikola new_post`` command means we are creating a page and not a blog post.
@@ -74,22 +78,20 @@ We can now build and preview our site::
. render_site:output/categories/index.html
. render_sources:output/index.txt
. render_rss:output/rss.xml
- :
- :
- : [Much more of the same]
-
+ ⋮
$ nikola serve
- Serving HTTP on 127.0.0.1 port 8000 ...
+ [1970-01-01T00:00:00Z] INFO: serve: Serving HTTP on 0.0.0.0 port 8000...
+
-And you can see your (very empty) site in http://localhost:8000
+And you can see your (very empty) site in http://localhost:8000/
-So, what's in that ``pages/index.txt`` file?
+So, what’s in that ``pages/index.txt`` file?
.. code-block:: rest
.. title: index
.. slug: index
- .. date: 2013/03/01 10:26:17
+ .. date: 1970-01-01 00:00:00 UTC
.. tags:
.. link:
.. description:
@@ -97,43 +99,42 @@ So, what's in that ``pages/index.txt`` file?
Write your post here.
-Title is the page title, slug is the name of the generated HTML file
-(in this case it would be ``index.html``) the date doesn't matter much in
-not-blogs, same for tags and link. Description is useful for SEO purposes
+``title`` is the page title, ``slug`` is the name of the generated HTML file
+(in this case it would be ``index.html``). ``date``, ``tags`` and ``link``
+doesn’t matter at all in stories. ``description`` is useful for SEO purposes
if you care for that.
And below, the content. By default you are expected to use
-`reStructuredText <http://getnikola.com/quickstart.html>`_ but
+`reStructuredText <https://getnikola.com/quickstart.html>`_ but
Nikola supports a ton of formats, including Markdown, plain HTML, BBCode,
Wiki, and Textile.
So, let's give the page a nicer title, and some fake content. Since the default
-Nikola theme (called "bootstrap") is based on `bootstrap 2 <http://getbootstrap.com/2.3.2/>`_
+Nikola theme (called ``bootstrap3``) is based on `Bootstrap <http://getbootstrap.com/>`_
you can use anything you like from it:
.. code-block:: rest
.. title: Welcome To The Fake Site
.. slug: index
- .. date: 2013/03/01 10:26:17
+ .. date: 1970-01-01 00:00:00 UTC
.. tags:
.. link:
.. description: Fake Site version 1, welcome page!
- .. class:: hero-unit span6
+ .. class:: jumbotron col-md-6
.. admonition:: This is a Fake Site
It pretends to be about things, but is really just an example.
- So, don't click this button, it leads nowhere.
- .. class:: btn
+ .. raw:: html
- Click Me!
+ <a href="https://getnikola.com/" class="btn btn-primary btn-lg">Click Me!</a>
- .. class:: span5
+ .. class:: col-md-5
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris non nunc turpis.
Phasellus a ullamcorper leo. Sed fringilla dapibus orci eu ornare. Quisque
@@ -146,15 +147,13 @@ you can use anything you like from it:
aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos
himenaeos.
- [And more in the same vein]
-
.. admonition:: TIP: Nice URLs
- If you like your URLs without the ".html" then you want to create folders and
+ If you like your URLs without the ``.html`` then you want to create folders and
put the pages in ``index.html`` inside them using the ``PRETTY_URLS`` option.
And that's it. You will want to change the NAVIGATION_LINKS option to create a reasonable
-"menu" for your site, you will want to hack the theme (check ``nikola help bootswatch_theme``
+menu for your site, you will want to modify the theme (check ``nikola help bootswatch_theme``
for a quick & dirty solution), and you may want to add a blog later on, for company news
or whatever.
@@ -167,9 +166,10 @@ or whatever.
POSTS = [("posts/*.txt", "blog", "post.tmpl", True)]
Create a post with ``nikola new_post`` and that's it, you now have a blog
- in http://yoursite.com/blog (you may want to add links to it in NAVIGATION_LINKS of course).
+ in the ``/blog/`` subdirectory of your site — you may want to link to
+ it in ``NAVIGATION_LINKS``.
-You can see the finished site in http://notablog.ralsina.com.ar and its full configuration in
-http://ralsina.me/listings/notablog/conf.py.html
+If you want to see a site implementing all of the above, check out `the Nikola
+website <https://getnikola.com/>`_.
I hope this was helpful!
diff --git a/docs/creating-a-theme.txt b/docs/creating-a-theme.txt
index 220a8e7..7113b1a 100644
--- a/docs/creating-a-theme.txt
+++ b/docs/creating-a-theme.txt
@@ -1,380 +1,825 @@
-.. title: Creating a Theme
+.. title: Creating A Theme
.. slug: creating-a-theme
-.. date: 2012-03-13 12:00:00 UTC-03:00
+.. date: 2015-05-28 18:46:48 UTC
.. tags:
+.. category:
.. link:
.. description:
+.. type: text
-Creating A Theme From Scratch (Almost)
-======================================
+Nikola is a static site and blog generator. So is Jekyll. While I like what we have done with Nikola,
+I do admit that Jekyll (and others!) have many more, and nicer themes than Nikola does.
-.. class:: lead
+This document is an attempt at making it easier for 3rd parties (that means *you* people! ;-) to
+create themes. Since I **suck** at designing websites, I asked for opinions on themes to port,
+and got some feedback. Since this is **Not So Hard™**, I will try to make time to port a few
+and see what happens.
-There is some documentation about creating themes for Nikola, but maybe a tutorial is also a useful way
-to explain it. So, here it is. I'll explain how to create a theme (almost) from scratch. All themes
-in Nikola must inherit from the ``base`` theme. In this case, we will inherit from ``bootstrap``
-so we get good support for slides and galleries.
+Today’s theme is `Lanyon <https://github.com/poole/lanyon>`__ which is written by `@mdo <https://twitter.com/mdo>`__
+and released under a MIT license, which is liberal enough.
-I will try to create a theme that looks like `Vinicius Massuchetto's Monospace Theme <http://wordpress.org/themes/monospace>`_.
+So, let’s get started.
-.. TEASER_END
+Checking It Out
+---------------
-Starting The Theme
-------------------
+The first step in porting a theme is making the original theme work. Lanyon is awesome in that its
+`GitHub project <https://github.com/poole/lanyon>`__ is a full site!
-First we will create a testing site::
+So::
- $ nikola init --demo monospace-site
- A new site with some sample data has been created at monospace-site.
- See README.txt in that folder for more information.
+ # Get jekyll
+ sudo apt-get install jekyll
- $ cd monospace-site/
+ # Get Lanyon
+ git clone git@github.com:poole/lanyon.git
-Our theme will inherit from the ``bootstrap`` theme, which is full-featured but boring.
+ # Build it
+ cd lanyon && jekyll build
-::
+ # Look at it
+ jekyll serve & google-chrome http://localhost:4000
+If you **do not want to install Jekyll**, you can also see it in action at http://lanyon.getpoole.com/
+
+Some things jump to my mind:
+
+1. This is one fine looking theme
+2. Very clear and readable
+3. Nice hidden navigation-thingy
+
+Also, from looking at `the project’s README <https://github.com/poole/lanyon/blob/master/README.md>`__
+it supports some nice configuration options:
+
+1. Color schemes
+2. Reverse layout
+3. Sidebar overlay instead of push
+4. Open the sidebar by default, or on a per-page basis by using its metadata
+
+Let’s try to make all those nice things survive the porting.
+
+Starting From Somewhere
+-----------------------
+
+Nikola has a nice, clean, base theme from which you can start when writing your own theme.
+Why start from that instead of from a clean slate? Because theme inheritance is going to save you a ton of work,
+that’s why. If you start from scratch you won’t be able to build **anything** until you have a bunch of
+templates written. Starting from base, you just need to hack on the things you **need** to change.
+
+First, we create a site with some content in it. We’ll use the ``nikola init`` wizard (with the ``--demo`` option) for that::
+
+ $ nikola init --demo lanyon-port
+ Creating Nikola Site
+ ====================
+
+ This is Nikola v7.4.1. We will now ask you a few easy questions about your new site.
+ If you do not want to answer and want to go with the defaults instead, simply restart with the `-q` parameter.
+ --- Questions about the site ---
+ Site title [My Nikola Site]:
+ Site author [Nikola Tesla]:
+ Site author's e-mail [n.tesla@example.com]:
+ Site description [This is a demo site for Nikola.]:
+ Site URL [https://example.com/]:
+ --- Questions about languages and locales ---
+ We will now ask you to provide the list of languages you want to use.
+ Please list all the desired languages, comma-separated, using ISO 639-1 codes. The first language will be used as the default.
+ Type '?' (a question mark, sans quotes) to list available languages.
+ Language(s) to use [en]:
+
+ Please choose the correct time zone for your blog. Nikola uses the tz database.
+ You can find your time zone here:
+ http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
+
+ Time zone [UTC]:
+ Current time in UTC: 16:02:07
+ Use this time zone? [Y/n]
+ --- Questions about comments ---
+ You can configure comments now. Type '?' (a question mark, sans quotes) to list available comment systems. If you do not want any comments, just leave the field blank.
+ Comment system:
+
+ That's it, Nikola is now configured. Make sure to edit conf.py to your liking.
+ If you are looking for themes and addons, check out https://themes.getnikola.com/ and https://plugins.getnikola.com/.
+ Have fun!
+ [2015-05-28T16:02:08Z] INFO: init: A new site with example data has been created at lanyon-port.
+ [2015-05-28T16:02:08Z] INFO: init: See README.txt in that folder for more information.
+
+
+Then, we create an empty theme inheriting from base. This theme will use Mako templates. If you prefer Jinja2,
+then you should use ``base-jinja`` instead::
+
+ $ cd lanyon-port/
$ mkdir themes
- $ mkdir themes/monospace
- $ echo bootstrap > themes/monospace/parent
+ $ mkdir themes/lanyon
+ $ echo base > themes/lanyon/parent
-The next step is to make the testing site use this new theme, by editing ``conf.py`` and
-changing the ``THEME`` option::
+Edit ``conf.py`` and set ``THEME = 'lanyon'``. Also set ``USE_BUNDLES = False`` (just do it for now, we’ll get to bundles later).
- # Name of the theme to use. Themes are located in themes/theme_name
- THEME = 'monospace'
+You can now build that site using ``nikola build`` and it will look like this:
-Now we can already build and test the site::
+.. figure:: https://getnikola.com/images/lanyon-0.thumbnail.png
+ :target: https://getnikola.com/images/lanyon-0.png
- $ nikola build && nikola serve
+ This is just the base theme.
-.. figure:: http://ralsina.com.ar/galleries/monospace-tut/monospace-1.png
- :height: 400px
+Basic CSS
+---------
- This is the default "bootstrap" theme.
+The next step is to know exactly how Lanyon’s pages work. To do this, we read its HTML.
+First let’s look at the head element:
-Of course, the page layout is completely different from what we want. To fix that, we need to
-get into templates.
+.. code:: html
-Templates: Page Layout
-----------------------
+ <!DOCTYPE html>
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us">
-The general page layout for the theme is done by the ``base.tmpl`` template, which is done using
-`Mako <http://www.makotemplates.org/>`_. This is bootstrap's ``base.tmpl``, it's not very big:
+ <head>
+ <link href="http://gmpg.org/xfn/11" rel="profile">
+ <meta http-equiv="content-type" content="text/html; charset=utf-8">
-.. code-block:: mako
+ <!-- Enable responsiveness on mobile devices-->
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
+
+ <title>
+ Lanyon &middot; A Jekyll theme
+ </title>
+
+ <!-- CSS -->
+ <link rel="stylesheet" href="/public/css/poole.css">
+ <link rel="stylesheet" href="/public/css/syntax.css">
+ <link rel="stylesheet" href="/public/css/lanyon.css">
+ <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=PT+Serif:400,400italic,700|PT+Sans:400">
+
+ <!-- Icons -->
+ <link rel="apple-touch-icon-precomposed" sizes="144x144" href="/public/apple-touch-icon-144-precomposed.thumbnail.png">
+ <link rel="shortcut icon" href="/public/favicon.ico">
+
+ <!-- RSS -->
+ <link rel="alternate" type="application/rss+xml" title="RSS" href="/atom.xml">
+
+ <!-- Google Analytics -->
+ [...]
+ </head>
+
+The interesting part there is that it loads a few CSS files. If you check the source of your Nikola site, you will
+see something fairly similar:
+
+.. code:: html
- ## -*- coding: utf-8 -*-
- <%namespace name="base" file="base_helper.tmpl" import="*" />
- <%namespace name="bootstrap" file="bootstrap_helper.tmpl" import="*" />
- ${set_locale(lang)}
<!DOCTYPE html>
- <html% if comment_system == 'facebook': xmlns:fb="http://ogp.me/ns/fb#" %endif lang="${lang}">
+ <html prefix="og: http://ogp.me/ns# article: http://ogp.me/ns/article# " vocab="http://ogp.me/ns" lang="en">
<head>
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- ${bootstrap.html_head()}
- <%block name="extra_head">
- </%block>
- ${extra_head_data}
+ <meta charset="utf-8">
+ <meta name="description" content="This is a demo site for Nikola.">
+ <meta name="viewport" content="width=device-width">
+ <title>My Nikola Site | My Nikola Site</title>
+
+ <link href="assets/css/rst.css" rel="stylesheet" type="text/css">
+ <link href="assets/css/code.css" rel="stylesheet" type="text/css">
+ <link href="assets/css/theme.css" rel="stylesheet" type="text/css">
+
+ <link rel="alternate" type="application/rss+xml" title="RSS" href="rss.xml">
+ <link rel="canonical" href="https://example.com/index.html">
+ <!--[if lt IE 9]><script src="assets/js/html5.js"></script><![endif]--><link rel="prefetch" href="posts/welcome-to-nikola.html" type="text/html">
</head>
- <body>
- <!-- Menubar -->
- <div class="navbar navbar-fixed-top" id="navbar">
- <div class="navbar-inner">
- <div class="container">
- <!-- .btn-navbar is used as the toggle for collapsed navbar content -->
- <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- </a>
-
- <a class="brand" href="${abs_link('/')}">
- ${blog_title}
- </a>
- <!-- Everything you want hidden at 940px or less, place within here -->
- <div class="nav-collapse collapse">
- <ul class="nav">
- ${bootstrap.html_navigation_links()}
- </ul>
- %if search_form:
- ${search_form}
- %endif
- <ul class="nav pull-right">
- <%block name="belowtitle">
- %if len(translations) > 1:
- <li>${base.html_translations()}</li>
- %endif
- </%block>
- % if show_sourcelink:
- <li><%block name="sourcelink"></%block></li>
- %endif
- </ul>
- </div>
- </div>
- </div>
- </div>
- <!-- End of Menubar -->
- <div class="container-fluid" id="container-fluid">
- <!--Body content-->
- <div class="row-fluid">
- <div class="span2"></div>
- <div class="span8">
- <%block name="content"></%block>
- </div>
+
+
+Luckily, since this is all under a very liberal license, we can just copy these CSS files into
+Nikola, adapting the paths a little so that they follow our conventions::
+
+ $ mkdir -p themes/lanyon/assets/css
+ $ cp ../lanyon/public/css/poole.css themes/lanyon/assets/css/
+ $ cp ../lanyon/public/css/lanyon.css themes/lanyon/assets/css/
+
+Notice I am *not* copying ``syntax.css``? That’s because Nikola handles that styles for syntax highlighting
+in a particular way, using a setting called ``CODE_COLOR_SCHEME`` where you can configure
+what color scheme the syntax highlighter uses. You can use your own ``assets/css/code.css`` if you
+don’t like the provided ones.
+
+Nikola **requires** ``assets/css/rst.css`` and ``assets/css/code.css`` to function properly.
+We will also add themes for IPython Notebook (``assets/css/ipython.min.css``
+and ``assets/css/nikola_ipython.css``) into the template; note that they are
+activated only if you configured your ``POSTS``/``PAGES`` with ipynb support.
+
+But how do I tell **our** lanyon theme to use those CSS files instead of whatever it’s using now?
+By giving our theme its own base_helper.tmpl.
+
+That file is a **template** used to generate parts of the pages. It’s large and
+complicated but we don’t need to change a lot of it. First, get it from
+`Nikola’s source code <https://github.com/getnikola/nikola/blob/master/nikola/data/themes/base/templates/base_helper.tmpl>`__ and put a copy in ``themes/lanyon/templates/base_helper.tmpl``::
+
+ $ mkdir themes/lanyon/templates
+ $ curl https://raw.githubusercontent.com/getnikola/nikola/master/nikola/data/themes/base/templates/base_helper.tmpl > themes/lanyon/templates/base_helper.tmpl
+
+The part we want to change is this:
+
+.. code:: html+mako
+
+ <%def name="html_stylesheets()">
+ %if use_bundles:
+ %if use_cdn:
+ <link href="/assets/css/all.css" rel="stylesheet" type="text/css">
+ %else:
+ <link href="/assets/css/all-nocdn.css" rel="stylesheet" type="text/css">
+ %endif
+ %else:
+ <link href="/assets/css/rst.css" rel="stylesheet" type="text/css">
+ <link href="/assets/css/code.css" rel="stylesheet" type="text/css">
+ <link href="/assets/css/theme.css" rel="stylesheet" type="text/css">
+ %if has_custom_css:
+ <link href="/assets/css/custom.css" rel="stylesheet" type="text/css">
+ %endif
+ %endif
+ % if needs_ipython_css:
+ <link href="/assets/css/ipython.min.css" rel="stylesheet" type="text/css">
+ <link href="/assets/css/nikola_ipython.css" rel="stylesheet" type="text/css">
+ % endif
+ </%def>
+
+And we will change it so it uses the lanyon styles instead of theme.css (again, ignore the bundles for now!):
+
+.. code:: html+mako
+
+ <%def name="html_stylesheets()">
+ %if use_bundles:
+ <link href="/assets/css/all.css" rel="stylesheet" type="text/css">
+ %else:
+ <link href="/assets/css/rst.css" rel="stylesheet" type="text/css">
+ <link href="/assets/css/poole.css" rel="stylesheet" type="text/css">
+ <link href="/assets/css/lanyon.css" rel="stylesheet" type="text/css">
+ <link href="/assets/css/code.css" rel="stylesheet" type="text/css">
+ %if has_custom_css:
+ <link href="/assets/css/custom.css" rel="stylesheet" type="text/css">
+ %endif
+ %endif
+ % if needs_ipython_css:
+ <link href="/assets/css/ipython.min.css" rel="stylesheet" type="text/css">
+ <link href="/assets/css/nikola_ipython.css" rel="stylesheet" type="text/css">
+ % endif
+ <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=PT+Serif:400,400italic,700|PT+Sans:400">
+ </%def>
+
+.. figure:: https://getnikola.com/images/lanyon-1.thumbnail.png
+ :target: https://getnikola.com/images/lanyon-1.png
+
+ You may say this looks like crap. Don’t worry, we are just starting :-)
+
+Page Layout
+-----------
+
+This is trickier but should be no problem for people with a basic understanding of HTML and a desire to make a theme!
+
+Lanyon’s content is split in two parts: a sidebar and the rest. The sidebar looks like this (shortened for comprehension):
+
+.. code:: html
+
+ <body>
+ <!-- Target for toggling the sidebar `.sidebar-checkbox` is for regular
+ styles, `#sidebar-checkbox` for behavior. -->
+ <input type="checkbox" class="sidebar-checkbox" id="sidebar-checkbox">
+
+ <!-- Toggleable sidebar -->
+ <div class="sidebar" id="sidebar">
+ <div class="sidebar-item">
+ <p>A reserved <a href="http://jekyllrb.com" target="_blank">Jekyll</a> theme that places the utmost gravity on content with a hidden drawer. Made by <a href="https://twitter.com/mdo" target="_blank">@mdo</a>.</p>
</div>
- <!--End of body content-->
- </div>
- <div class="footerbox">
- ${content_footer}
+
+ <nav class="sidebar-nav">
+ <a class="sidebar-nav-item active" href="/">Home</a>
+ <a class="sidebar-nav-item" href="/about/">About</a>
+ [...]
+ </nav>
</div>
- ${bootstrap.late_load_js()}
- ${base.html_social()}
- <script>jQuery("a.image-reference").colorbox({rel:"gal",maxWidth:"100%",maxHeight:"100%",scalePhotos:true});
- $(window).on('hashchange', function(){
- if (location.hash && $(location.hash)[0]) {
- $('body').animate({scrollTop: $(location.hash).offset().top - $('#navbar').outerHeight(true)*1.2 }, 1);
- }
- });
- $(document).ready(function(){$(window).trigger('hashchange')});
- </script>
- <%block name="extra_js"></%block>
- ${body_end}
- </body>
+So, a plain body, with an input element that controls the sidebar, a div which is the sidebar itself.
+Inside that, div.sidebar-item for items, and a nav with "navigational links". This is followed by the "masthead" and
+the content itself, which we will look at in a bit.
+
+If we look for the equivalent code in Nikola’s side, we see this:
+
+.. code:: html
+
+ <body>
+ <a href="#content" class="sr-only sr-only-focusable">Skip to main content</a>
+ <div id="container">
+ <header id="header" role="banner">
+ <h1 id="brand"><a href="https://example.com/" title="My Nikola Site" rel="home"> <span id="blog-title">My Nikola Site</span> </a></h1>
+ <nav id="menu" role="navigation"><ul>
+ <li><a href="../archive.html">Archive</a></li>
+ <li><a href="../categories/index.html">Tags</a></li>
+ <li><a href="../rss.xml">RSS feed</a></li>
+
+So Nikola has the "masthead" above the nav element, and uses list elements in nav instead of bare links.
+Not all that different is it?
-It's basically a HTML document with some placeholders to be replaced with actual content, configuration options, and some helper functions.
-For example, the ``html_head`` helper can be used to add CSS or JS files in all document's ``head`` tags.
+Let’s make it lanyon-like! We will need 2 more templates: `base.tmpl <https://github.com/getnikola/nikola/blob/master/nikola/data/themes/base/templates/base.tmpl>`__ and `base_header.tmpl <https://github.com/getnikola/nikola/blob/master/nikola/data/themes/base/templates/base_header.tmpl>`__. Get them and put them in your ``themes/lanyon/templates`` folder.
-Monospace is a two-column-with-footer layout, so let's copy the basics from its HTML and see what happens:
+Let’s look at ``base.tmpl`` first. It’s short and nice, it looks like a webpage without
+all the interesting stuff:
-.. code-block:: mako
+.. code:: html+mako
## -*- coding: utf-8 -*-
<%namespace name="base" file="base_helper.tmpl" import="*"/>
- <%namespace name="bootstrap" file="bootstrap_helper.tmpl" import="*" />
+ <%namespace name="header" file="base_header.tmpl" import="*"/>
+ <%namespace name="footer" file="base_footer.tmpl" import="*"/>
+ <%namespace name="annotations" file="annotation_helper.tmpl"/>
${set_locale(lang)}
- <!DOCTYPE html>
- <html lang="${lang}">
- <head>
- ${bootstrap.html_head()}
- <%block name="extra_head">
- </%block>
- ${extra_head_data}
+ ${base.html_headstart()}
+ <%block name="extra_head">
+ ### Leave this block alone.
+ </%block>
+ ${template_hooks['extra_head']()}
</head>
- <body class="home blog">
- <div id="wrap" style="width:850px">
- <div id="container" style="width:560px">
+ <body>
+ <a href="#content" class="sr-only sr-only-focusable">${messages("Skip to main content")}</a>
+ <div id="container">
+ ${header.html_header()}
+ <main id="content" role="main">
<%block name="content"></%block>
+ </main>
+ ${footer.html_footer()}
+ </div>
+ ${body_end}
+ ${template_hooks['body_end']()}
+ ${base.late_load_js()}
+ </body>
+ </html>
+
+That link which says "Skip to main content" is very important for accessibility, so we will leave it in
+place. But below, you can see how it creates the "container" div we see in the Nikola page, and the content is
+created by ``html_header()`` which is defined in ``base_header.tmpl`` The actual ``nav`` element is done
+by the ``html_navigation_links`` function out of the ``NAVIGATION_LINKS`` option.
+
+So, first, lets change that base template to be more lanyon-like:
+
+.. code:: html+mako
+
+ ## -*- coding: utf-8 -*-
+ <%namespace name="base" file="base_helper.tmpl" import="*"/>
+ <%namespace name="header" file="base_header.tmpl" import="*"/>
+ <%namespace name="footer" file="base_footer.tmpl" import="*"/>
+ <%namespace name="annotations" file="annotation_helper.tmpl"/>
+ ${set_locale(lang)}
+ ${base.html_headstart()}
+ <%block name="extra_head">
+ ### Leave this block alone.
+ </%block>
+ ${template_hooks['extra_head']()}
+ </head>
+ <body>
+ <a href="#content" class="sr-only sr-only-focusable">${messages("Skip to main content")}</a>
+ <!-- Target for toggling the sidebar `.sidebar-checkbox` is for regular
+ styles, `#sidebar-checkbox` for behavior. -->
+ <input type="checkbox" class="sidebar-checkbox" id="sidebar-checkbox">
+
+ <!-- Toggleable sidebar -->
+ <div class="sidebar" id="sidebar">
+ <div class="sidebar-item">
+ <p>A reserved <a href="http://getnikola.com" target="_blank">Nikola</a> theme that places the utmost gravity on content with a hidden drawer. Made by <a href="https://twitter.com/mdo" target="_blank">@mdo</a> for Jekyll,
+ ported to Nikola by <a href="https://twitter.com/ralsina" target="_blank">@ralsina</a>.</p>
</div>
- <div id="sidebar">
- <!--Sidebar content-->
- <h1 id="blog-title">
- <a href="${abs_link('/')}" title="${blog_title}">${blog_title}</a>
- </h1>
- <%block name="belowtitle">
- %if len(translations) > 1:
- <small>
- ${(messages("Also available in"))}:&nbsp;
- ${base.html_translations()}
- </small>
- %endif
- </%block>
- <ul class="unstyled">
- <li>${license}
- ${base.html_social()}
- ${bootstrap.html_navigation_links()}
- <li>${search_form}
- </ul>
- </div>
- <div id="footer">
- ${content_footer}
+ ${header.html_navigation_links()}
+ </div>
+
+ <main id="content" role="main">
+ <%block name="content"></%block>
+ </main>
+ ${footer.html_footer()}
+ ${body_end}
+ ${template_hooks['body_end']()}
+ ${base.late_load_js()}
+ </body>
+ </html>
+
+.. figure:: https://getnikola.com/images/lanyon-2.thumbnail.png
+ :target: https://getnikola.com/images/lanyon-2.png
+
+ And that’s after I exposed the sidebar by clicking on an invisible widget!
+
+One problem, which causes that yellow color in the sidebar is a CSS conflict.
+We are loading ``rst.css`` which specifies
+the background color of ``div.sidebar`` which is more specific than
+``lanyon.css``, which specifies for ``.sidebar`` alone.
+
+There are many ways to fix this, I chose to change lanyon.css to also use div.sidebar:
+
+.. code:: css
+
+ div.sidebar,.sidebar {
+ position: fixed;
+ top: 0;
+ bottom: 0;
+ left: -14rem;
+ width: 14rem;
+ [...]
+
+This is annoying but it will happen when you just grab CSS from different places. The "Inspect Element"
+feature of your web browser is your best friend for these situations.
+
+Another problem is that the contents of the nav element are wrong. They are not bare links. We will fix that in
+``base_header.html``, like this:
+
+.. code:: html+mako
+
+ <%def name="html_navigation_links()">
+ <nav id="menu" role="navigation" class="sidebar-nav">
+ %for url, text in navigation_links[lang]:
+ <a class="sidebar-nav-item" href="${url}">${text}</a>
+ %endfor
+ ${template_hooks['menu']()}
+ ${template_hooks['menu_alt']()}
+ </nav>
+ </%def>
+
+**Note: this means this theme will not support submenus in navigation. If you want that, I’ll happily take a patch.**
+
+.. figure:: https://getnikola.com/images/lanyon-3.thumbnail.png
+ :target: https://getnikola.com/images/lanyon-3.png
+
+ Starting to see a resemblance?
+
+Now let’s look at the content. In Lanyon, this is how the "main" content looks:
+
+.. code:: html
+
+ <!-- Wrap is the content to shift when toggling the sidebar. We wrap the
+ content to avoid any CSS collisions with our real content. -->
+ <div class="wrap">
+ <div class="masthead">
+ <div class="container">
+ <h3 class="masthead-title">
+ <a href="/" title="Home">Lanyon</a>
+ <small>A Jekyll theme</small>
+ </h3>
+ </div>
+ </div>
+
+ <div class="container content">
+ <div class="post">
+ <h1 class="post-title">Introducing Lanyon</h1>
+ <span class="post-date">02 Jan 2014</span>
+ <p>Lanyon is an unassuming <a href="http://jekyllrb.com">Jekyll</a> theme [...]
+ </div>
+ </div>
+ </div>
+ <label for="sidebar-checkbox" class="sidebar-toggle"></label>
+ </body>
+ </html>
+
+Everything inside the "container content" div is… the content. The rest is a masthead with the site title
+and at the bottom a label for the sidebar toggle. Easy to do in ``base.tmpl``
+(only showing the relevant part):
+
+.. code:: html+mako
+
+ <!-- Wrap is the content to shift when toggling the sidebar. We wrap the
+ content to avoid any CSS collisions with our real content. -->
+ <div class="wrap">
+ <div class="masthead">
+ <div class="container">
+ <h3 class="masthead-title">
+ <a href="/" title="Home">Lanyon</a>
+ <small>A Jekyll theme</small>
+ </h3>
</div>
</div>
- ${bootstrap.late_load_js()}
- <script>jQuery("a.image-reference").colorbox({rel:"gal",maxWidth:"100%",maxHeight:"100%",scalePhotos:true});</script>
- <%block name="extra_js"></%block>
+
+ <div class="container content" id="content">
+ <%block name="content"></%block>
+ </div>
+ </div>
+ <label for="sidebar-checkbox" class="sidebar-toggle"></label>
+ ${footer.html_footer()}
${body_end}
+ ${template_hooks['body_end']()}
+ ${base.late_load_js()}
</body>
+ </html>
+
+.. figure:: https://getnikola.com/images/lanyon-4.thumbnail.png
+ :target: https://getnikola.com/images/lanyon-4.png
+
+ Getting there!
+
+The sidebar looks bad because of yet more CSS conflicts with ``rst.css``. By
+adding some extra styling in ``lanyon.css``, it will look better.
+
+.. code:: css
+
+ /* Style and "hide" the sidebar */
+ div.sidebar, .sidebar {
+ position: fixed;
+ top: 0;
+ bottom: 0;
+ left: -14rem;
+ width: 14rem;
+ visibility: hidden;
+ overflow-y: auto;
+ padding: 0;
+ margin: 0;
+ border: none;
+ font-family: "PT Sans", Helvetica, Arial, sans-serif;
+ font-size: .875rem; /* 15px */
+ color: rgba(255,255,255,.6);
+ background-color: #202020;
+ -webkit-transition: all .3s ease-in-out;
+ transition: all .3s ease-in-out;
+ }
+
+Also, the accessibility link on top is visible when it should not. That’s
+because we removed ``theme.css`` from the base theme, and with it, we lost a
+couple of classes. We can add them in ``lanyon.css``, along with others used by other
+pieces of the site:
+
+.. code:: css
+
+ .sr-only {
+ position: absolute;
+ width: 1px;
+ height: 1px;
+ padding: 0;
+ margin: -1px;
+ overflow: hidden;
+ clip: rect(0, 0, 0, 0);
+ border: 0;
+ }
+
+ .sr-only-focusable:active,
+ .sr-only-focusable:focus {
+ position: static;
+ width: auto;
+ height: auto;
+ margin: 0;
+ overflow: visible;
+ clip: auto;
+ }
+
+ .breadcrumb {
+ padding: 8px 15px;
+ margin-bottom: 20px;
+ list-style: none;
+ }
-.. figure:: http://ralsina.com.ar/galleries/monospace-tut/monospace-2.png
-
- Yikes!
-
-This will get better quickly once we add some CSS
-
-
-Base CSS
---------
-
-The orphan theme includes just a little styling, specifically ``rest.css`` so
-the reStructuredText output looks reasonable, and ``code.css`` for code snippets.
-
-It also includes an empty ``assets/css/theme.css`` where you can add your own CSS.
-For example, this is taken from the original monospace theme, except for the last
-few selectors:
-
-.. code-block:: css
-
- body { margin:0px; padding:20px 0px; text-align:center; font-family:Monospace; color:#585858; }
- .post { margin:0px 0px 30px 0px; padding:0px 0px 30px 0px; border-bottom:1px dotted #C8C8C8; }
- .meta { margin:10px; padding:15px; background:#EAEAEA; clear:both; }
- #footer { text-align:center; clear:both; margin:30px 0px 0px 0px; padding:30px 0px 0px 0px; border-top:1px dotted #C8C8C8; }
- #wrap { margin:0px auto; text-align:left; font-size: 13px; line-height: 1.4; }
- #container { float:right; }
- #sidebar { overflow:hidden; clear:left; text-align:right; width:250px; height:auto; padding:0px 15px 0px 0px; border-right:1px dotted #C8C8C8; }
- #sidebar li { list-style-type:none; }
- #sidebar > li { margin:20px 0px; }
- #sidebar h1 { border-bottom:1px dotted #C8C8C8; }
- #sidebar .description { display:block; width:100%; height:auto; margin:0px 0px 10px 0px; }
- h1, h2, h3, h4, h5, h6, h7 { margin:0px; text-transform:uppercase; }
- h4, h5, h6 { font-size:14px; }
- #blog-title { margin-top: 0; line-height:48px;}
- .literal-block {padding: .5em;}
- div.sidebar, div.admonition, div.attention, div.caution, div.danger, div.error, div.hint, div.important, div.note, div.tip, div.warning {
- /* Issue 277 */
- border: 1px solid #aaa;
- border-radius: 5px;
- width: 100%;
+ .breadcrumb > li {
+ display: inline-block;
+ margin-right: 0;
+ margin-left: 0;
}
- ul.breadcrumb > li:before {
- content: " / ";
+
+ .breadcrumb > li:after {
+ content: ' / ';
+ color: #888;
+ }
+
+ .breadcrumb > li:last-of-type:after {
+ content: '';
+ margin-left: 0;
+ }
+
+ .thumbnails > li {
+ display: inline-block;
+ margin-right: 10px;
+ }
+
+ .thumbnails > li:last-of-type {
+ margin-right: 0;
}
-This will (after we rebuild it) make the site looks different of course, and getting closer to our goal:
-.. figure:: http://ralsina.com.ar/galleries/monospace-tut/monospace-3.png
- :height: 400px
+.. figure:: https://getnikola.com/images/lanyon-5.thumbnail.png
+ :target: https://getnikola.com/images/lanyon-5.png
+
+ Little by little, things look better.
+
+One clear problem is that the title "Lanyon · A Jekyll theme" is set in the
+theme itself. We don’t do that sort of thing in Nikola, we have settings for
+that. So, let’s use them. There is a ``html_site_title`` function in
+``base_helper.tmpl`` which is just the thing. So we change base.tmpl to use it:
+
+.. code:: html+mako
+
+ <div class="wrap">
+ <div class="masthead">
+ <div class="container">
+ ${header.html_site_title()}
+ </div>
+ </div>
+
+That’s a ``<h1>`` instead of a ``<h3>`` like Lanyon does, but hey, it’s the
+right thing to do. If you want to go with an ``<h3>``, just
+change ``html_site_title`` itself.
+
+And now we more or less have the correct page layout and styles. Except for a
+rather large thing…
+
+Typography
+----------
+
+You can see in the previous screenshot that text still looks quite different in our port: Serif versus Sans-Serif
+content, and the titles have different colors!
+
+Let’s start with the titles. Here’s how they look in Lanyon:
+
+.. code:: html
+
+ <h3 class="masthead-title">
+ <a href="/" title="Home">Lanyon</a>
+ <small>A Jekyll theme</small>
+ </h3>
+
+Versus our port:
+
+.. code:: html
+
+ <h1 id="brand"><a href="https://example.com/" title="My Nikola Site" rel="home">
+
+So, it looks like we will have to fix ``html_site_title`` after all:
- Monospaced allright.
+.. code:: html+mako
-If you compare it to `the original <http://wp-themes.com/monospace/>`_, however, you will see that the layout of
-the posts themselves is different, and that was not described in ``base.tmpl`` at all. But if you look, you'll see that
-there is a placeholder called content: ``<%block name="content"></%block>``
+ <%def name="html_site_title()">
+ <h3 id="brand" class="masthead-title">
+ <a href="${abs_link(_link("root", None, lang))}" title="${blog_title}" rel="home">${blog_title}</a>
+ </h3>
+ </%def>
-That's because ``base.tmpl`` defines the *base* layout. The layout of more specific pages, like "the page that shows
-a list of posts" is defined in the other templates. Specifically, this is defined in ``index.tmpl``.
-It turns out ``bootstrap`` doesn' have one of those! That's because it inherits that template from ``base``:
+As for the actual content, that’s not in any of the templates we have seen so far. The page you see is an
+"index.tmpl" page, which means it’s a list of blog posts shown one below the
+other. Obviously it’s not doing
+things in the way the Lanyon CSS expects it to. Here’s the original, which you
+can find in Nikola’s source
+code:
-.. code-block:: mako
+.. code:: html+mako
## -*- coding: utf-8 -*-
<%namespace name="helper" file="index_helper.tmpl"/>
<%namespace name="comments" file="comments_helper.tmpl"/>
<%inherit file="base.tmpl"/>
+
+ <%block name="extra_head">
+ ${parent.extra_head()}
+ % if posts and (permalink == '/' or permalink == '/' + index_file):
+ <link rel="prefetch" href="${posts[0].permalink()}" type="text/html">
+ % endif
+ </%block>
+
<%block name="content">
- % for post in posts:
- <div class="postbox post-${post.meta('type')}">
- <h1><a href="${post.permalink()}">${post.title()}</a>
- <small>&nbsp;&nbsp;
- ${messages("Posted")}: <time class="published" datetime="${post.date.isoformat()}">${post.formatted_date(date_format)}</time>
- </small></h1>
- <hr>
- ${post.text(teaser_only=index_teasers)}
- % if not post.meta('nocomments'):
- ${comments.comment_link(post.permalink(), post.base_path)}
- % endif
+ <%block name="content_header"></%block>
+ <div class="postindex">
+ % for post in posts:
+ <article class="h-entry post-${post.meta('type')}">
+ <header>
+ <h1 class="p-name entry-title"><a href="${post.permalink()}" class="u-url">${post.title()|h}</a></h1>
+ <div class="metadata">
+ <p class="byline author vcard"><span class="byline-name fn">${post.author()}</span></p>
+ <p class="dateline"><a href="${post.permalink()}" rel="bookmark"><time class="published dt-published" datetime="${post.date.isoformat()}" title="${post.formatted_date(date_format)}">${post.formatted_date(date_format)}</time></a></p>
+ % if not post.meta('nocomments') and site_has_comments:
+ <p class="commentline">${comments.comment_link(post.permalink(), post._base_path)}
+ % endif
</div>
- % endfor
- ${helper.html_pager()}
- ${comments.comment_link_script()}
- ${helper.mathjax_script(posts)}
+ </header>
+ %if index_teasers:
+ <div class="p-summary entry-summary">
+ ${post.text(teaser_only=True)}
+ %else:
+ <div class="e-content entry-content">
+ ${post.text(teaser_only=False)}
+ %endif
+ </div>
+ </article>
+ % endfor
+ </div>
+ ${helper.html_pager()}
+ ${comments.comment_link_script()}
+ ${helper.mathjax_script(posts)}
</%block>
-So, let's tweak that to be closer to the original. We put the post's metadata in a
-box, add links for the posts tags, move the date there, etc.
-.. code-block:: mako
+And this is how it looks after I played with it for a while, making it generate code that looks closer to
+the Lanyon original:
+
+.. code:: html+mako
- ## -*- coding: utf-8 -*-
- <%namespace name="helper" file="index_helper.tmpl"/>
- <%namespace name="disqus" file="disqus_helper.tmpl"/>
- <%inherit file="base.tmpl"/>
<%block name="content">
- % for post in posts:
- <div class="postbox post-${post.meta('type')}">
- <h1><a href="${post.permalink()}">${post.title()}</a></h1>
- <div class="meta" style="background-color: rgb(234, 234, 234); ">
- <span class="authordate">
- ${messages("Posted")}: ${post.formatted_date(date_format)}
- </span>
- <br>
- <span class="tags">Tags:&nbsp;
- %if post.tags:
- %for tag in post.tags:
- <a class="tag" href="${_link('tag', tag)}"><span>${tag}</span></a>
- %endfor
- %endif
- </span>
- </div>
- ${post.text(teaser_only=index_teasers)}
- % if not post.meta('nocomments'):
- ${disqus.html_disqus_link(post.permalink()+"#disqus_thread", post.base_path)}
- % endif
+ <%block name="content_header"></%block>
+ <div class="posts">
+ % for post in posts:
+ <article class="post h-entry post-${post.meta('type')}">
+ <header>
+ <h1 class="post-title p-name"><a href="${post.permalink()}" class="u-url">${post.title()|h}</a></h1>
+ <div class="metadata">
+ <p class="byline author vcard"><span class="byline-name fn">${post.author()}</span></p>
+ <p class="dateline"><a href="${post.permalink()}" rel="bookmark"><time class="post-date published dt-published" datetime="${post.date.isoformat()}" title="${post.formatted_date(date_format)}">${post.formatted_date(date_format)}</time></a></p>
+ % if not post.meta('nocomments') and site_has_comments:
+ <p class="commentline">${comments.comment_link(post.permalink(), post._base_path)}
+ % endif
</div>
- % endfor
- ${helper.html_pager()}
- ${disqus.html_disqus_script()}
+ </header>
+ %if index_teasers:
+ <div class="p-summary entry-summary">
+ ${post.text(teaser_only=True)}
+ %else:
+ <div class="e-content entry-content">
+ ${post.text(teaser_only=False)}
+ %endif
+ </div>
+ </article>
+ % endfor
+ </div>
+ ${helper.html_pager()}
+ ${comments.comment_link_script()}
+ ${helper.mathjax_script(posts)}
</%block>
+With these changes, it looks… similar?
-.. figure:: http://ralsina.com.ar/galleries/monospace-tut/monospace-4.png
- :height: 400px
+.. figure:: https://getnikola.com/images/lanyon-6.thumbnail.png
+ :target: https://getnikola.com/images/lanyon-6.png
- Close enough!
+ It does!
-Then if we click on the post title, we will see some broken details in the metadata that can be fixed in ``post.tmpl``, and so on.
+Similar changes (basically adding class names to elements) needed to be done in ``post_header.tmpl``:
-.. code-block:: mako
+.. code:: html+mako
- ## -*- coding: utf-8 -*-
- <%namespace name="helper" file="post_helper.tmpl"/>
- <%namespace name="disqus" file="disqus_helper.tmpl"/>
- <%inherit file="base.tmpl"/>
- <%block name="extra_head">
- ${helper.twitter_card_information(post)}
- % if post.meta('keywords'):
- <meta name="keywords" content="${post.meta('keywords')|h}"/>
- % endif
- </%block>
- <%block name="content">
- <div class="post">
- ${helper.html_title()}
- <div class="meta" style="background-color: rgb(234, 234, 234); ">
- <span class="authordate">
- ${messages("Posted")}: ${post.formatted_date(date_format)}
- % if not post.meta('password'):
- [<a href="${post.source_link()}" id="sourcelink">${messages("Source")}</a>]
+ <%def name="html_post_header()">
+ <header>
+ ${html_title()}
+ <div class="metadata">
+ <p class="byline author vcard"><span class="byline-name fn">${post.author()}</span></p>
+ <p class="dateline"><a href="${post.permalink()}" rel="bookmark"><time class="post-date published dt-published" datetime="${post.date.isoformat()}" itemprop="datePublished" title="${post.formatted_date(date_format)}">${post.formatted_date(date_format)}</time></a></p>
+ % if not post.meta('nocomments') and site_has_comments:
+ <p class="commentline">${comments.comment_link(post.permalink(), post._base_path)}
% endif
- </span>
- <br>
- %if post.tags:
- <span class="tags">${messages("Tags")}:&nbsp;
- %for tag in post.tags:
- <a class="tag" href="${_link('tag', tag)}"><span>${tag}</span></a>
- %endfor
- </span>
- <br>
+ %if post.description():
+ <meta name="description" itemprop="description" content="${post.description()}">
%endif
- <span class="authordate">
- ${helper.html_translations(post)}
- </span>
</div>
- ${post.text()}
- ${helper.html_pager(post)}
- % if not post.meta('nocomments'):
- ${disqus.html_disqus(post.permalink(absolute=True), post.title(), post.base_path)}
- % endif
- </div>
- </%block>
+ ${html_translations(post)}
+ </header>
+ </%def>
+
+Customization
+-------------
+
+The original Lanyon theme supports some personalization options. It suggests you do them by tweaking the templates, and
+you *can* also do that in the Nikola port. But we prefer to use options for that, so that you can get a later, better
+version of the theme and it will still "just work".
+
+Let’s see the color schemes first. They apply easily, just tweak your ``body`` element like this:
+
+.. code:: html
+
+ <body class="theme-base-08">
+ ...
+ </body>
+
+We can tweak ``base.tmpl`` to do just that:
+
+.. code:: html+mako
+
+ % if lanyon_subtheme:
+ <body class="${lanyon_subtheme}">
+ %else:
+ <body>
+ %endif
+
+And then we can put the options in conf.py’s ``GLOBAL_CONTEXT``:
+
+.. code:: python
+
+ GLOBAL_CONTEXT = {
+ "lanyon_subtheme": "theme-base-08"
+ }
+
+.. figure:: https://getnikola.com/images/lanyon-7.thumbnail.png
+ :target: https://getnikola.com/images/lanyon-7.png
+
+ Look at it, all themed up.
+
+Doing the same for layout-reverse, sidebar-overlay and the rest is left as an exercise for the reader.
+
+Bundles
+-------
+
+If you have ``webassets`` installed and the ``USE_BUNDLES`` option set to True, Nikola can put several CSS or JS files together in a larger file,
+which makes sites load faster. To do that, your theme needs a ``bundles`` file where the syntax is::
+
+ outputfile1.js=thing1.js,thing2.js,...
+ outputfile2.css=thing1.css,thing2.css,...
+
+For the Lanyon theme, it should be like this::
+ assets/css/all.css=rst.css,code.css,poole.css,lanyon.css,custom.css
-.. figure:: http://ralsina.com.ar/galleries/monospace-tut/monospace-5.png
- :height: 400px
+**Note:** Some themes also support the ``USE_CDN`` option meaning that in some cases it will load one bundle with all CSS and in other will load some CSS files
+from a CDN and others from a bundle. This is complicated and probably not worth the effort.
- Details, details.
+The End
+-------
-The demo site exercises most of the features in Nikola, so if you make it look good, your site probably will look good too.
-This monospace theme is included with nikola, if you want to use it or play with it.
+And that’s it, that’s a whole theme. Eventually, once people start using it, they will notice small broken details, which will need handling one at a time.
+This theme should be available in http://themes.getnikola.com#lanyon and you can see it in action at https://themes.getnikola.com/v7/lanyon/index.html
diff --git a/docs/extending.txt b/docs/extending.txt
index bb337f7..9db5344 100644
--- a/docs/extending.txt
+++ b/docs/extending.txt
@@ -8,7 +8,7 @@
Extending Nikola
================
-:Version: 7.1.0
+:Version: 7.6.0
:Author: Roberto Alsina <ralsina@netmanagers.com.ar>
.. class:: alert alert-info pull-right
@@ -38,7 +38,7 @@ When you run ``nikola --help`` you will see something like this::
$ nikola help
Nikola is a tool to create static websites and blogs. For full documentation and more
- information, please visit http://getnikola.com
+ information, please visit https://getnikola.com/
Available commands:
@@ -87,7 +87,7 @@ First, the ``serve.plugin`` file:
[Documentation]
Author = Roberto Alsina
Version = 0.1
- Website = http://getnikola.com
+ Website = https://getnikola.com
Description = Start test server.
.. note:: If you want to publish your plugin on the Plugin Index, `read
@@ -179,7 +179,7 @@ First, you have to create a .plugin file. Here's the one for the Mako plugin:
[Documentation]
Author = Roberto Alsina
Version = 0.1
- Website = http://getnikola.com
+ Website = https://getnikola.com
Description = Support for Mako templates.
.. note:: If you want to publish your plugin on the Plugin Index, `read
@@ -205,31 +205,41 @@ a stub for a hypothetical system called "Templater":
# name has to match Name in the .plugin file
name = "templater"
+ # A list of directories where the templates will be
+ # located. Most template systems have some sort of
+ # template loading tool that can use this.
+ def set_directories(self, directories, cache_folder):
+ """Sets the list of folders where templates are located and cache."""
+ pass
+
# You *must* implement this, even if to return []
# It should return a list of all the files that,
# when changed, may affect the template's output.
# usually this involves template inheritance and
# inclusion.
- def get_deps(self, filename):
+ def template_deps(self, template_name):
+ """Returns filenames which are dependencies for a template."""
return []
- # A list of directories where the templates will be
- # located. Most template systems have some sort of
- # template loading tool that can use this.
+ def render_template(self, template_name, output_name, context):
+ """Renders template to a file using context.
- def set_directories(self, directories):
- """Create a template lookup."""
+ This must save the data to output_name *and* return it
+ so that the caller may do additional processing.
+ """
pass
# The method that does the actual rendering.
# template_name is the name of the template file,
- # output_name is the file for the output, context
- # is a dictionary containing the data the template
+ # context is a dictionary containing the data the template
# uses for rendering.
+ def render_template_to_string(self, template, context):
+ """Renders template to a string using context. """
+ pass
- def render_template(self, template_name, output_name,
- context, global_context):
- """Render the template into output_name using context."""
+ def inject_directory(self, directory):
+ """Injects the directory with the lowest priority in the
+ template search mechanism."""
pass
@@ -240,7 +250,7 @@ If you want to do something that depends on the data in your site, you
probably want to do a Task plugin, which will make it be part of the
``nikola build`` command. There are the currently available tasks, all
provided by plugins:
-
+T
.. sidebar:: Other Tasks
There are also ``LateTask`` plugins, which are executed later,
@@ -290,7 +300,7 @@ in the logical ways:
[Documentation]
Author = Roberto Alsina
Version = 0.1
- Website = http://getnikola.com
+ Website = https://getnikola.com
Description = Copy theme assets into output.
@@ -364,6 +374,10 @@ They must provide:
If the compiler produces something other than HTML files, it should also implement ``extension`` which
returns the preferred extension for the output file.
+These plugins can also be used to extract metadata from file. To do so, the
+plugin may implement ``read_metadata`` that will return a dict containing the
+metadata contained in the file.
+
RestExtension Plugins
---------------------
@@ -393,9 +407,11 @@ Currently Nikola emits the following signals:
When all the configuration file is processed. Note that plugins are activated before this is emitted.
``scanned``
After posts are scanned.
-``new_post``
- When a new post is created, using the ``nikola new_post`` command. The signal
+``new_post`` / ``new_page``
+ When a new post is created, using the ``nikola new_post``/``nikola new_page`` commands. The signal
data contains the path of the file, and the metadata file (if there is one).
+``existing_post`` / ``existing_page``
+ When a new post fails to be created due to a title conflict. Contains the same data as ``new_post``.
``deployed``
When the ``nikola deploy`` command is run, and there is at least one new
entry/post since ``last_deploy``. The signal data is of the form::
@@ -408,11 +424,25 @@ Currently Nikola emits the following signals:
'undeployed': # all files not deployed since they are either future posts/drafts
}
+ConfigPlugin Plugins
+--------------------
+
+Does nothing specific, can be used to modify the site object (and thus the config).
+
+Put all the magic you want in ``set_site()``, and don’t forget to run the one
+from ``super()``.
+
+PostScanner Plugins
+-------------------
+
+Get posts and stories from "somewhere" to be added to the timeline.
+The only currently existing plugin of this kind reads them from disk.
+
Plugin Index
============
-There is a `plugin index <http://plugins.getnikola.com/>`__, which stores all
+There is a `plugin index <https://plugins.getnikola.com/>`__, which stores all
of the plugins for Nikola people wanted to share with the world.
You may want to read the `README for the Index
diff --git a/docs/internals.txt b/docs/internals.txt
index a025075..448a6f7 100644
--- a/docs/internals.txt
+++ b/docs/internals.txt
@@ -26,7 +26,7 @@ Nikola is a Pile of Plugins
There are several kinds of plugins, all implementing interfaces defined in
``nikola/plugin_categories.py`` and documented in
- `Extending Nikola <http://getnikola.com/extending.html>`_
+ `Extending Nikola <https://getnikola.com/extending.html>`_
If your plugin has a dependency, please make sure it doesn't make Nikola
throw an exception when the dependency is missing. Try to fail gracefully
@@ -95,17 +95,14 @@ posts are added into RSS feeds and stories are not. All of them are in a list ca
"the timeline" formed by objects of class ``Post``.
When you are creating a task that needs the list of posts and/or stories (for example,
-the RSS creation plugin), your plugin should call ``self.site.scan_posts()`` to ensure
-the timeline is created and available in ``self.site.timeline``. You should not modify
-the timeline, because it will cause consistency issues.
+the RSS creation plugin) on task execution time, your plugin should call ``self.site.scan_posts()``
+in ``gen_tasks`` to ensure the timeline is created and available in
+``self.site.timeline``. You should not modify the timeline, because it will cause consistency issues.
.. sidebar:: scan_posts
- The scan_posts function is what reads your site and creates the timeline.
-
- I am considering moving scan_posts off the core and into its own plugin
- so it can be replaced (for example, by a version that reads a database
- instead of scanning a folder tree).
+ The ``Nikola.scan_posts`` function can be used in plugins to force the
+ timeline creation, for example, while creating the tasks.
Your plugin can use the timeline to generate "stuff" (technical term). For example,
Nikola comes with plugins that use the timeline to create a website (surprised?).
@@ -140,3 +137,8 @@ themes
To change how the generated site looks, you can create custom themes.
And of course, you can also replace or extend each of the existing plugins.
+
+Nikola Architecture
+===================
+
+.. thumbnail:: https://getnikola.com/images/architecture.png
diff --git a/docs/man/nikola.1 b/docs/man/nikola.1
deleted file mode 100644
index a0c2c05..0000000
--- a/docs/man/nikola.1
+++ /dev/null
@@ -1,91 +0,0 @@
-.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.44.1.
-.TH NIKOLA "1" "September 2014" "nikola 7.1.0" "User Commands"
-.SH NAME
-nikola \- manual page for nikola 7.1.0
-.SH DESCRIPTION
-Nikola is a tool to create static websites and blogs. For full documentation and more information, please visit http://getnikola.com/
-.SS "Available commands:"
-.TP
-nikola auto
-automatically detect site changes, rebuild and optionally refresh a browser
-.TP
-nikola bootswatch_theme
-given a swatch name from bootswatch.com and a parent theme, creates a custom theme
-.TP
-nikola build
-run tasks
-.TP
-nikola check
-check links and files in the generated site
-.TP
-nikola clean
-clean action / remove targets
-.TP
-nikola console
-start an interactive Python console with access to your site
-.TP
-nikola deploy
-deploy the site
-.TP
-nikola doit_auto
-automatically execute tasks when a dependency changes
-.TP
-nikola dumpdb
-dump dependency DB
-.TP
-nikola forget
-clear successful run status from internal DB
-.TP
-nikola github_deploy
-deploy the site to GitHub pages
-.TP
-nikola help
-show help
-.TP
-nikola ignore
-ignore task (skip) on subsequent runs
-.TP
-nikola import_wordpress
-import a WordPress dump
-.TP
-nikola init
-create a Nikola site in the specified folder
-.TP
-nikola install_theme
-install theme into current site
-.TP
-nikola list
-list tasks from dodo file
-.TP
-nikola new_page
-create a new page in the site
-.TP
-nikola new_post
-create a new blog post or site page
-.TP
-nikola orphans
-list all orphans
-.TP
-nikola plugin
-manage plugins
-.TP
-nikola serve
-start the test webserver
-.TP
-nikola strace
-use strace to list file_deps and targets
-.TP
-nikola tabcompletion
-generate script for tab\-complention
-.TP
-nikola version
-print the Nikola version number
-.TP
-nikola help
-show help / reference
-.TP
-nikola help <command>
-show command usage
-.TP
-nikola help <task\-name>
-show task usage
diff --git a/docs/man/nikola.1.gz b/docs/man/nikola.1.gz
new file mode 100644
index 0000000..e2425f4
--- /dev/null
+++ b/docs/man/nikola.1.gz
Binary files differ
diff --git a/docs/man/nikola.rst b/docs/man/nikola.rst
new file mode 100644
index 0000000..036170d
--- /dev/null
+++ b/docs/man/nikola.rst
@@ -0,0 +1,118 @@
+======
+Nikola
+======
+
+--------------------------------
+A Static Site and Blog Generator
+--------------------------------
+
+:Version: Nikola v7.6.0
+:Manual section: 1
+:Manual group: User Commands
+
+SYNOPSIS
+========
+
+Create an empty site (with a setup wizard):
+
+ ``nikola init mysite``
+
+(You can create a site with demo files in it with ``nikola init --demo mysite``)
+
+Create a post (inside the ``mysite`` directory):
+
+ ``nikola new_post``
+
+Build the site:
+
+ ``nikola build``
+
+Start the test server and open a browser:
+
+ ``nikola serve -b``
+
+
+DESCRIPTION
+===========
+
+Nikola is a static website and blog generator. The very short
+explanation is that it takes some texts you wrote, and uses them to
+create a folder full of HTML files. If you upload that folder to a
+server, you will have a rather full-featured website, done with little
+effort.
+
+Its original goal is to create blogs, but it supports most kind of
+sites, and can be used as a CMS, as long as what you present to the
+user is your own content instead of something the user generates.
+
+Nikola can do:
+
+* A blog
+* Your company's site
+* Your personal site
+* A software project's site
+* A book's site
+
+Since Nikola-based sites don't run any code on the server, there is no
+way to process user input in forms.
+
+Nikola can't do:
+
+* Twitter
+* Facebook
+* An Issue tracker
+* Anything with forms, really (except for comments!)
+
+Keep in mind that "static" doesn't mean **boring**. You can have
+animations, slides or whatever fancy CSS/HTML5 thingie you like. It
+only means all that HTML is generated already before being uploaded.
+On the other hand, Nikola sites will tend to be content-heavy. What
+Nikola is good at is at putting what you write out there.
+
+COMMANDS
+========
+
+The most basic commands needed to get by are:
+
+``nikola help``
+ get a list of commands, or help for a command
+``nikola version [--check]``
+ print version number
+``nikola init [-d|--demo] [-q|--quiet] folder``
+ initialize new site
+``nikola build``
+ build a site
+``nikola new_post``
+ create a new post
+``nikola new_page``
+ create a new page
+``nikola status [--list-drafts] [--list-modified] [--list-scheduled]``
+ show site and deployment status
+``nikola check [-v] (-l [--find-sources] [-r] | -f [--clean-files])``
+ check for dangling links or unknown files
+``nikola deploy [[preset [preset...]]``
+ deploy the site using the ``DEPLOY_COMMANDS`` setting
+``nikola github_deploy```
+ deploy the site to GitHub Pages
+``nikola serve [-p PORT] [-a ADDRESS] [-b|--browser] [-6|--ipv6]``
+ start development web server
+``nikola auto [-p PORT] [-a ADDRESS] [-b|--browser] [-6|--ipv6]``
+ start development web server with automated rebuilds and reloads
+``nikola plugin [options]``
+ manage plugins from the Plugins Index (https://plugins.getnikola.com/)
+``nikola install_theme [name]``
+ install themes from the Themes Index (https://themes.getnikola.com/)
+
+Use ``nikola help`` to get a list of all commands.
+
+BUGS
+====
+
+Issue Tracker: https://github.com/getnikola/nikola/issues
+
+SEE ALSO
+========
+
+* The Nikola Website: https://getnikola.com/
+* Handbook: https://getnikola.com/handbook.html
+* Support: https://getnikola.com/contact.html
diff --git a/docs/manual.txt b/docs/manual.txt
index 3917dbc..d287099 100644
--- a/docs/manual.txt
+++ b/docs/manual.txt
@@ -1,14 +1,13 @@
.. title: The Nikola Handbook
.. slug: handbook
.. date: 2012-03-30 23:00:00 UTC-03:00
-.. tags: mathjax
.. link:
.. description:
The Nikola Handbook
===================
-:Version: 7.1.0
+:Version: 7.6.0
.. class:: alert alert-info pull-right
@@ -20,7 +19,7 @@ All You Need to Know
After you have Nikola `installed <#installing-nikola>`_:
-Create a empty site (with a setup wizard):
+Create an empty site (with a setup wizard):
``nikola init mysite``
You can create a site with demo files in it with ``nikola init --demo mysite``
@@ -32,15 +31,14 @@ Create a post:
Edit the post:
The filename should be in the output of the previous command.
+ You can also use ``nikola new_post -e`` to open an editor automatically.
Build the site:
``nikola build``
-Start the test server:
- ``nikola serve``
+Start the test server and open a browser (http://127.0.0.1:8000/):
+ ``nikola serve -b``
-See the site:
- http://127.0.0.1:8000
That should get you going. If you want to know more, this manual will always be here
for you.
@@ -58,7 +56,7 @@ that it takes some texts you wrote, and uses them to create a folder full
of HTML files. If you upload that folder to a server, you will have a
rather full-featured website, done with little effort.
-It's original goal is to create blogs, but it supports most kind of sites, and
+Its original goal is to create blogs, but it supports most kind of sites, and
can be used as a CMS, as long as what you present to the user is your own content
instead of something the user generates.
@@ -67,7 +65,7 @@ Nikola can do:
* A blog (`example <http://ralsina.me>`__)
* Your company's site
* Your personal site
-* A software project's site (`example <http://getnikola.com>`__)
+* A software project's site (`example <https://getnikola.com>`__)
* A book's site
Since Nikola-based sites don't run any code on the server, there is no way to process
@@ -91,13 +89,13 @@ Getting Help
.. class:: lead
-`Get help here! <http://getnikola.com/contact.html>`_
+`Get help here! <https://getnikola.com/contact.html>`_
TL;DR:
* You can file bugs at `the issue tracker <https://github.com/getnikola/nikola/issues>`__
* You can discuss Nikola at the `nikola-discuss google group <http://groups.google.com/group/nikola-discuss>`_
-* You can subscribe to `the Nikola Blog <http://getnikola.com/blog>`_
+* You can subscribe to `the Nikola Blog <https://getnikola.com/blog>`_
* You can follow `Nikola on Twitter <https://twitter.com/GetNikola>`_
Why Static?
@@ -136,7 +134,7 @@ Obsolescense
You may say those are long term issues, or that they won't matter for years. Well,
I believe things should work forever, or as close to it as we can make them.
Nikola's static output and its input files will work as long as you can install
- a Python > 2.6 in a Linux, Windows, or Mac and can find a server
+ a Python 2.7/3.3 or newer under Linux, Windows, or OS X and can find a server
that sends files over HTTP. That's probably 10 or 15 years at least.
Also, static sites are easily handled by the Internet Archive.
@@ -180,7 +178,7 @@ If you want to create a blog or a site, Nikola provides:
* Google sitemap generation
* Custom deployment (if it's a command, you can use it)
* A (very) basic look and feel you can customize, and is even text-mode friendly
-* The input format is light markup (`reStructuredText <http://getnikola.com/quickstart.html>`__ or
+* The input format is light markup (`reStructuredText <https://getnikola.com/quickstart.html>`__ or
`Markdown <http://daringfireball.net/projects/markdown/>`_)
* Easy-to-create image galleries
* Support for displaying source code
@@ -205,7 +203,7 @@ The short version is::
pip install nikola
-Note that you need Python v2.6 or newer OR v3.3 or newer.
+Note that you need Python v2.7 or newer OR v3.3 or newer.
Some features require **extra dependencies**. You can install them all in bulk
by doing::
@@ -219,31 +217,41 @@ After that, run ``nikola init --demo sitename`` and that will run the setup
wizard, which will create a folder called ``sitename`` containing a functional
demo site.
-Nikola is packaged for some Linux distributions, you may get that instead. e.g.
-If you are running Arch Linux, there are AUR packages, available in Python 2/3
-and stable/git master flavors: `python-nikola`__ / `python2-nikola`__ for the
-latest stable release or `python-nikola-git`__ / `python2-nikola-git`__ for the
-GitHub master. (only one package may be installed at the same time.)
+Linux packages
+~~~~~~~~~~~~~~
+
+Nikola is packaged for some Linux distributions, you may get that instead of
+installing via ``pip``. Keep in mind that those packages might be
+**outdated** and that we don’t support versions that are too old. Proceed with
+care!
+
+* Arch Linux (AUR): `python-nikola`__ / `python2-nikola`__ for the
+ latest stable release or `python-nikola-git`__ / `python2-nikola-git`__ for the
+ GitHub master. (official Nikola-supported packages)
+* Fedora: `python-nikola`__ (incl. python3-nikola)
+* Debian and derivatives: `nikola`__
+* Gentoo: `www-apps/nikola`__
__ https://aur.archlinux.org/packages/python-nikola/
__ https://aur.archlinux.org/packages/python2-nikola/
__ https://aur.archlinux.org/packages/python-nikola-git/
__ https://aur.archlinux.org/packages/python2-nikola-git/
+__ https://admin.fedoraproject.org/pkgdb/package/python-nikola/
+__ https://packages.debian.org/sid/nikola
+__ https://packages.gentoo.org/package/www-apps/nikola
-libxml/libxslt errors
-~~~~~~~~~~~~~~~~~~~~~
+libxml/libxslt (files missing) errors
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-If you get a ``ERROR: /bin/sh: 1: xslt-config: not found`` or ``fatal error:
-libxml/xmlversion.h: No such file or directory`` when running ``pip install -r requirements.txt``, install *libxml* and *libxslt* libraries, like so:
+If you get errors about various files missing while compiling ``lxml``, you must install headers for the ``libxml``, ``libxslt`` and ``zlib`` libraries, like so:
Debian systems::
- sudo apt-get install libxml2-dev
- sudo apt-get install libxslt1-dev
+ sudo apt-get install libxml2-dev libxslt1-dev zlib1g-dev
Red Hat/RPM-based systems::
- sudo yum install libxslt-devel libxml2-devel
+ sudo yum install libxslt-devel libxml2-devel zlib-devel
Python.h not found
~~~~~~~~~~~~~~~~~~
@@ -263,18 +271,6 @@ Note that many other distros/operating systems (including Arch Linux,
\*BSD and OS X) do not require such packages, as C headers are included
with the base distribution of Python.
-Installation on Linux, Mac OS X, \*BSD, and any other POSIX-compatible OS
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-(we obviously support all.)
-
-Using ``pip`` should suffice. You may also want to use distribution- or
-system-specific packages for our dependencies.
-
-There are **no known issues or caveats** on those OSes. Keep in mind that most
-of our developers run Linux on a daily basis and may not have the full
-knowledge required to resolve issues relating to your operating system.
-
Installation on Windows and Windows support
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -289,7 +285,7 @@ caveats:
pre-built packages is possible through ``virtualenv --system-site-packages``.
#. Windows has some differences over POSIX, which may cause some features to
work incorrectly under Windows. If any problems occur, please do not
- hesitate to report them. Some of the differeces include:
+ hesitate to report them. Some of the differences include:
* ``\`` as path separator (instead of ``/``)
* the concept of HDD partitions and letters (instead of
@@ -307,9 +303,10 @@ Getting Started
To create posts and pages in Nikola, you write them in one of the supported input formats.
Those source files are later converted to HTML
The recommended formats are reStructuredText and Markdown, but there is also support
-for textile and WikiCreole and even for just writing HTML.
+for Textile and WikiCreole and even for just writing HTML. For more details,
+read `Configuring other input formats`_.
-.. note:: There is a great `quick tutorial to learn reStructuredText. <http://getnikola.com/quickstart.html>`__
+.. note:: There is a great `quick tutorial to learn reStructuredText. <https://getnikola.com/quickstart.html>`__
First, let's see how you "build" your site. Nikola comes with a minimal site to get you started.
@@ -373,7 +370,7 @@ and even individual files like ``nikola build output/index.html``
Nikola also has other commands besides ``build``::
$ nikola help
- Nikola is a tool to create static websites and blogs. For full documentation and more information, please visit http://getnikola.com/
+ Nikola is a tool to create static websites and blogs. For full documentation and more information, please visit https://getnikola.com/
Available commands:
@@ -400,7 +397,7 @@ Nikola also has other commands besides ``build``::
nikola plugin manage plugins
nikola serve start the test webserver
nikola strace use strace to list file_deps and targets
- nikola tabcompletion generate script for tab-complention
+ nikola tabcompletion generate script for tab-completion
nikola version print the Nikola version number
nikola help show help / reference
@@ -440,7 +437,8 @@ but you can use a lot of different markups using the ``-f`` option.
Currently Nikola supports reStructuredText, Markdown, IPython Notebooks, HTML as input,
can also use Pandoc for conversion, and has support for BBCode, CreoleWiki, txt2tags, Textile
-and more via `plugins <http://plugins.getnikola.com>`__.
+and more via `plugins <https://plugins.getnikola.com>`__.
+For more details, read `Configuring other input formats`_.
You can control what markup compiler is used for each file extension with the ``COMPILERS``
option. The default configuration expects them to be placed in ``posts`` but that can be
@@ -493,11 +491,47 @@ to your configuration::
Nikola will also use other metadata fields:
+ author
+ Author of the post, will be used in the RSS feed and possibly in the post
+ display (theme-dependent)
+
+ annotations / noannotations
+ Override the value of the ``ANNOTATIONS`` option for this specific post or page.
+
+ category
+ Like tags, except each post can have only one, and they usually have
+ more descriptive names.
+
+ filters
+ See the `Post Processing Filters`_ section.
+
+ hidetitle
+ Set "True" if you do not want to see the **page** title as a
+ heading of the output html file (does not work for posts).
+
nocomments
Set to "True" to disable comments. Example::
.. nocomments: True
+ password
+ The post will be encrypted and invisible until the reader enters the password.
+ Also, the post's sourcecode will not be available.
+
+ WARNING: **DO NOT** use for real confidential data. The algorithm used (RC4) is insecure. The implementation may also be easily brute-forced. Please consider using something else if you need *real* encryption!
+
+ More information: `Issue #1547 <https://github.com/getnikola/nikola/issues/1547>`_
+
+ previewimage
+ Designate a preview or other representative image path relative to BASE_URL
+ for use with Open Graph for posts. Adds the image when sharing on social
+ media and many other uses.
+
+ .. previewimage: images/looks_great_on_facebook.png
+
+ The image can be of any size and dimension (services will crop and adapt)
+ but should less than 1 MB and be larger than 300x300 (ideally 600x600).
+
template
Will change the template used to render this page/post specific page. Example::
@@ -506,24 +540,8 @@ to your configuration::
That template needs to either be part of the theme, or be placed in a ``templates/``
folder inside your site.
- password
- The post will be encrypted and invisible until the reader enters the password.
- Also, the post's sourcecode will not be available.
-
- category
- Like tags, except each post can have only one, and they usually have
- more descriptive names.
-
- annotations / noannotations
- Override the value of the ``ANNOTATIONS`` option for this specific post or page.
-
- author
- Author of the post, will be used in the RSS feed and possibly in the post
- display (theme-dependent)
-
- hidetitle
- Set "True" if you do not want to see the **story** title as a
- heading of the page (does not work for posts).
+ enclosure
+ Add an enclosure to this post when it's used in RSS. See `more information about enclosures <http://en.wikipedia.org/wiki/RSS_enclosure>`__
.. note:: The Two-File Format
@@ -603,7 +621,7 @@ Currently supported languages are:
* Urdu
If you wish to add support for more languages, check out the instructions
-at the `theming guide <http://getnikola.com/theming.html>`_.
+at the `theming guide <https://getnikola.com/theming.html>`_.
The post page is generated using the ``post.tmpl`` template, which you can use
to customize the output.
@@ -625,7 +643,7 @@ and ``PAGES`` configuration options::
# From those files, a set of HTML fragment files will be generated:
# cache/whatever/thing.html (and maybe cache/whatever/thing.html.es)
#
- # These files are combinated with the template to produce rendered
+ # These files are combined with the template to produce rendered
# pages, which will be placed at
# output / TRANSLATIONS[lang] / destination / pagename.html
#
@@ -647,7 +665,7 @@ and ``PAGES`` configuration options::
``new_post`` will use the *first* path in ``POSTS`` (or ``PAGES`` if ``-p`` is
supplied) that ends with the extension of your desired markup format (as
-defined in ``COMPILERS`` in conf.py) as the directory that the new post will be
+defined in ``COMPILERS`` in ``conf.py``) as the directory that the new post will be
written into. If no such entry can be found, the post won’t be created.
The ``new_post`` command supports some options::
@@ -680,7 +698,7 @@ In reStructuredText::
.. TEASER_END
-In Markdown::
+In Markdown (or basically, the resulting HTML of any format)::
<!-- TEASER_END -->
@@ -712,10 +730,11 @@ Drafts
If you add a "draft" tag to a post, then it will not be shown in indexes and feeds.
It *will* be compiled, and if you deploy it it *will* be made available, so use
with care. If you wish your drafts to be not available in your deployed site, you
-can set ``DEPLOY_DRAFTS = False`` in your configuration.
+can set ``DEPLOY_DRAFTS = False`` in your configuration. This will not work if
+lazily include ``nikola build`` in your ``DEPLOY_COMMANDS``.
Also if a post has a date in the future, it will not be shown in indexes until
-you rebuild after that date. This behaviour can be disabled by setting
+you rebuild after that date. This behavior can be disabled by setting
``FUTURE_IS_NOW = True`` in your configuration, which will make future posts be
published immediately. Posts dated in the future are *not* deployed by default
(when ``FUTURE_IS_NOW = False``). To make future posts available in the
@@ -786,6 +805,120 @@ styles the following types in the default themes:
| micro | “small” (short) posts | big serif font |
+-----------------+----------------------------+------------------+
+Configuring other input formats
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+In order to use input formats other than reStructuredText, you need some extra
+setup.
+
+1. Make sure you have the compiler for the input format you want. Some
+ input formats are supported out-of-the-box, but others must be installed from
+ the Plugins repository. You may also need some extra dependencies. You
+ will get helpful errors if you try to build when missing something.
+2. You must ensure the compiler and your desired input file extension is included
+ in the ``COMPILERS`` dict and does not conflict with any other format. This
+ is extremely important for the pandoc compiler.
+3. Finally, you must configure the ``POSTS`` and ``PAGES`` tuples. Follow the
+ instructions and the format set by pre-existing entries. Make sure to use
+ the same extension as is set in ``COMPILERS`` and configure the outputs
+ properly.
+
+Markdown
+````````
+
+To use Markdown in your posts/pages, make sure ``markdown`` is in your
+``COMPILERS`` and that at least one of your desired extensions is defined in
+``POSTS`` and ``PAGES``.
+
+You can use Python-Markdown extensions by setting the ``MARKDOWN_EXTENSIONS``
+config option:
+
+.. code:: python
+
+ MARKDOWN_EXTENSIONS = ['fenced_code', 'codehilite', 'extra']
+
+IPython Notebook/Jupyter
+````````````````````````
+
+To use Jupyter notebooks (previously known as IPython Notebooks) as posts/pages,
+make sure ``ipynb`` is in your ``COMPILERS`` and that the ``.ipynb`` extension
+is defined in ``POSTS`` and ``PAGES``.
+
+The ``-f`` argument to ``new_post`` should be used in the ``ipynb@KERNEL`` format.
+It defaults to Python in the version used by Nikola if not specified.
+
+HTML
+````
+
+To use plain HTML in your posts/pages, make sure ``html`` is in your
+``COMPILERS``
+and that the ``.html`` extension is defined in ``POSTS`` and ``PAGES``.
+
+PHP
+```
+
+There are two ways of using PHP within Nikola:
+
+1. To use PHP in your posts/pages (inside your site, with the theme and
+ everything), make sure ``php`` is in your ``COMPILERS`` and that the ``.php``
+ extension is defined in ``POSTS`` and ``PAGES``.
+2. To use PHP as standalone files (without any modifications), put them in
+ ``files/`` (or whatever ``FILES_FOLDERS`` is configured to).
+
+Pandoc
+``````
+
+To use Pandoc, you must uncomment the entry in ``COMPILERS`` and set the
+extensions list to your desired extensions while also removing them from their
+original compilers. The input format is inferred from the extension by Pandoc.
+
+Using Pandoc for reStructuredText, Markdown and other input formats that have a
+standalone Nikola plugin is **not recommended** as it disables plugins and
+extensions that are usually provided by Nikola.
+
+Indexes
+~~~~~~~
+
+All your posts that are not drafts, private or dated in the future, will be
+shown in indexes.
+
+Settings
+````````
+
+Indexes are put in the ``INDEX_PATH`` directory, which defaults to an empty
+string (site root). The “main” index is ``index.html``, and all the further
+indexes are ``index-*.html``, respectively.
+
+By default, 10 posts are displayed on an index page. This can be changed with
+``INDEX_DISPLAY_POST_COUNT``. Indexes can show full posts or just the teasers,
+as controlled by the ``INDEX_TEASERS`` setting (defaults to ``False``).
+
+Titles of the pages can be controlled by using ``INDEXES_TITLES``,
+``INDEXES_PAGES`` and ``INDEXES_PAGES_MAIN`` settings.
+
+Categories and tags use simple lists by default that show only titles and
+dates; however, you can switch them to full indexes by using
+``CATEGORY_PAGES_ARE_INDEXES`` and ``TAG_PAGES_ARE_INDEXES``, respectively.
+
+Static indexes
+``````````````
+
+Nikola uses *static indexes* by default. This means that ``index-1.html`` has
+the oldest posts, and the newest posts past the first 10 are in
+``index-N.html``, where ``N`` is the highest number. Only the page with the
+highest number and the main page (``index-N.html`` and ``index.html``) are
+rebuilt (the others remain unchanged). The page that appears when you click
+*Older posts* on the index page, ``index-N.html``, might contain **less than 10
+posts** if there are not enough posts to fill up all pages.
+
+This can be disabled by setting ``INDEXES_STATIC`` to ``False``. In that mode,
+``index-1.html`` contains all the newest posts past the first 10 and will
+always contain 10 posts (unless you have less than 20). The last page,
+``index-N.html``, contains the oldest posts, and might contain less than 10
+posts. This is how many blog engines and CMSes behave. Note that this will
+lead to rebuilding all index pages, which might be a problem for larger blogs
+(with a lot of index pages).
+
Creating a Page
---------------
@@ -836,7 +969,7 @@ You surely want to edit these options::
# Data about this site
BLOG_AUTHOR = "Your Name" # (translatable)
BLOG_TITLE = "Demo Site" # (translatable)
- SITE_URL = "http://getnikola.com/"
+ SITE_URL = "https://getnikola.com/"
BLOG_EMAIL = "joe@demo.site"
BLOG_DESCRIPTION = "This is a demo site for Nikola." # (translatable)
@@ -846,6 +979,11 @@ them. For those options, two types of values can be provided:
* a string, which will be used for all languages
* a dict of language-value pairs, to have different values in each language
+.. note:: It is possible to load the configuration from another file by specifying
+ ``--conf=path/to/other.file`` on Nikola's command line. For example, to
+ build your blog using the configuration file ``configurations/test.config``,
+ you have to execute ``nikola build --conf=configurations/test.config``.
+
Customizing Your Site
---------------------
@@ -854,17 +992,17 @@ the easy ones!
CSS tweaking
Using the default configuration, you can create a ``assets/css/custom.css``
- file and then it will be loaded from the ``<head>`` blocks of your site
- pages. Create it and put your CSS code there, for minimal disruption of the
- provided CSS files.
+ file under ``files/`` or in your theme and then it will be loaded from the
+ ``<head>`` blocks of your site pages. Create it and put your CSS code there,
+ for minimal disruption of the provided CSS files.
If you feel tempted to touch other files in assets, you probably will be better off
with a `custom theme <theming.html>`__.
If you want to use LESS_ or Sass_ for your custom CSS, or the theme you use
contains LESS or Sass code that you want to override, you will need to install
- the `LESS plugin <http://plugins.getnikola.com/#less>`__ or
- `SASS plugin <http://plugins.getnikola.com/#sass>`__ create a ``less`` or
+ the `LESS plugin <https://plugins.getnikola.com/#less>`__ or
+ `SASS plugin <https://plugins.getnikola.com/#sass>`__ create a ``less`` or
``sass`` directory in your site root, put your ``.less`` or ``.scss`` files
there and a targets file containing the list of files you want compiled.
@@ -904,10 +1042,17 @@ Navigation Links
submenus is supported.
.. note::
+
Some themes, including the default Bootstrap 3 theme, may
present issues if the menu is too large. (in ``bootstrap3``, the
navbar can grow too large and cover contents.)
+ .. note::
+
+ If you link to directories, make sure to follow ``STRIP_INDEXES``. If
+ it’s set to ``True``, end your links with a ``/``, otherwise end them
+ with ``/index.html`` — or else they won’t be hilighted when active.
+
The ``SEARCH_FORM`` option contains the HTML code for a search form based on
duckduckgo.com which should always work, but feel free to change it to
something else.
@@ -929,6 +1074,60 @@ SOCIAL_BUTTONS_CODE
at the bottom of body. It defaults to a snippet for AddThis, but you can
really put anything there. See `social_buttons.html` for more details.
+Fancy Dates
+-----------
+
+Nikola can use various styles for presenting dates.
+
+DATE_FORMAT
+ The date format to use if there is no JS or fancy dates are off. Compatible with Python’s ``strftime()`` syntax.
+
+JS_DATE_FORMAT
+ The date format to use if fancy dates are on. Compatible with ``moment.js`` syntax.
+
+DATE_FANCINESS = 0
+ Fancy dates are off, and DATE_FORMAT is used.
+
+DATE_FANCINESS = 1
+ Dates are recalculated in user’s timezone. Requires JavaScript.
+
+DATE_FANCINESS = 2
+ Dates are recalculated as relative time (eg. 2 days ago). Requires JavaScript.
+
+In order to use fancy dates, your theme must support them. The built-in Bootstrap family supports it, but other themes might not by default.
+
+For Mako:
+
+.. code:: html
+
+ <!-- required scripts -- best handled with bundles -->
+ <script src="/assets/js/moment-with-locales.min.js"></script>
+ <script src="/assets/js/fancydates.js"></script>
+
+ <!-- fancy dates code -->
+ <script>
+ moment.locale("${momentjs_locales[lang]}");
+ fancydates(${date_fanciness}, ${js_date_format});
+ </script>
+ <!-- end fancy dates code -->
+
+
+For Jinja2:
+
+.. code:: html
+
+ <!-- required scripts -- best handled with bundles -->
+ <script src="/assets/js/moment-with-locales.min.js"></script>
+ <script src="/assets/js/fancydates.js"></script>
+
+ <!-- fancy dates code -->
+ <script>
+ moment.locale("{{ momentjs_locales[lang] }}");
+ fancydates({{ date_fanciness }}, {{ js_date_format }});
+ </script>
+ <!-- end fancy dates code -->
+
+
Adding Files
------------
@@ -955,7 +1154,7 @@ Getting More Themes
-------------------
There are a few themes for Nikola. They are available at
-the `Themes Index <http://themes.getnikola.com/>`_.
+the `Themes Index <https://themes.getnikola.com/>`_.
Nikola has a built-in theme download/install mechanism to install those themes — the ``install_theme`` command::
$ nikola install_theme -l
@@ -968,7 +1167,7 @@ Nikola has a built-in theme download/install mechanism to install those themes
$ nikola install_theme blogtxt
[2013-10-12T16:46:13Z] NOTICE: install_theme: Downloading:
- http://themes.getnikola.com/v6/blogtxt.zip
+ https://themes.getnikola.com/v6/blogtxt.zip
[2013-10-12T16:46:15Z] NOTICE: install_theme: Extracting: blogtxt into themes
And there you are, you now have themes/blogtxt installed. It's very
@@ -1003,27 +1202,32 @@ Nikola doesn't really have a concept of deployment. However, if you can specify
deployment procedure as a series of commands, you can put them in the ``DEPLOY_COMMANDS``
option, and run them with ``nikola deploy``.
+You can have multiple deployment presets. If you run ``nikola deploy``, the
+``default`` preset is executed. You can also specify the names of presets
+you want to run (eg. ``nikola deploy default``, multiple presets are allowed).
+
One caveat is that if any command has a % in it, you should double them.
Here is an example, from my own site's deployment script::
- DEPLOY_COMMANDS = [
+ DEPLOY_COMMANDS = {'default': [
'rsync -rav --delete output/ ralsina@lateral.netmanagers.com.ar:/srv/www/lateral',
'rdiff-backup output ~/blog-backup',
"links -dump 'http://www.twingly.com/ping2?url=lateral.netmanagers.com.ar'",
- ]
+ ]}
Other interesting ideas are using
`git as a deployment mechanism <http://toroid.org/ams/git-website-howto>`_ (or any other VCS
-for that matter), using `lftp mirror <http://lftp.yar.ru/>`_ or unison, or Dropbox, or
-Ubuntu One. Any way you can think of to copy files from one place to another is good enough.
+for that matter), using `lftp mirror <http://lftp.yar.ru/>`_ or unison, or Dropbox.
+Any way you can think of to copy files from one place to another is good enough.
Deploying to GitHub
~~~~~~~~~~~~~~~~~~~
-Nikola provides a separate command ``github_deploy`` to deploy your
-site to GitHub pages. The command builds the site, commits the
-output to a gh-pages branch and pushes the output to GitHub.
+Nikola provides a separate command ``github_deploy`` to deploy your site to
+GitHub pages. The command builds the site, commits the output to a gh-pages
+branch and pushes the output to GitHub. Nikola uses the `ghp-import command
+<https://github.com/davisp/ghp-import>`_ for this.
The branch to use for committing the sources can be changed using the
``GITHUB_DEPLOY_BRANCH`` option in your config. For a
@@ -1037,14 +1241,9 @@ push to the repository specified as the remote.
This command performs the following actions, when it is run:
-1. Ensure that your site is a git repository, and git is on the PATH.
-2. Check for changes, and prompt the user to continue, if required.
-3. Build the site
-4. Clean any files that are "unknown" to Nikola.
-5. Create a deploy branch, if one doesn't exist.
-6. Commit the output to this branch. (NOTE: Any untracked source
- files, may get committed at this stage, on the wrong branch!)
-7. Push and deploy!
+1. Builds the site
+2. Commit the output folder to the ``GITHUB_DEPLOY_BRANCH`` to this branch.
+3. Push the branch to the remote specified in ``GITHUB_REMOTE_NAME``!
Comments and Annotations
------------------------
@@ -1063,8 +1262,8 @@ Nikola supports several third party comment systems:
* `isso <http://posativ.org/isso/>`_
By default it will use DISQUS, but you can change by setting ``COMMENT_SYSTEM``
-to one of "disqus", "intensedebate", "livefyre", "moot", "googleplus" or
-"facebook"
+to one of "disqus", "intensedebate", "livefyre", "moot", "googleplus",
+"facebook" or "isso"
.. sidebar:: ``COMMENT_SYSTEM_ID``
@@ -1080,7 +1279,8 @@ to one of "disqus", "intensedebate", "livefyre", "moot", "googleplus" or
* For Facebook, you need to `create an app
<https://developers.facebook.com/apps>` (turn off sandbox mode!)
and get an **App ID**
- * For isso, it is the URL of isso (must be world-accessible and **have a trailing slash**,
+ * For isso, it is the URL of isso (must be world-accessible, encoded with
+ Punycode (if using Internationalized Domain Names) and **have a trailing slash**,
default ``http://localhost:8080/``)
To use comments in a visible site, you should register with the service and
@@ -1126,7 +1326,7 @@ You can disable comments for a post by adding a "nocomments" metadata field to i
#639).
An alternative or complement to comments are annotations. Nikola integrates
-the annotation service provided by `AnnotateIt. <annotateit.org>`_
+the annotation service provided by `AnnotateIt. <http://annotateit.org/>`_
To use it, set the ``ANNOTATIONS`` option to True. This is specially useful
if you want feedback on specific parts of your writing.
@@ -1137,30 +1337,53 @@ Annotations require JQuery and are therefore not supported in the base theme.
You can check bootstrap theme's ``base.html`` for details on how to handle them in
custom themes.
-Image Galleries
----------------
+Images and Galleries
+--------------------
To create an image gallery, all you have to do is add a folder inside ``galleries``,
and put images there. Nikola will take care of creating thumbnails, index page, etc.
-If you click on images on a gallery, you should see a bigger image, thanks to
-the excellent `colorbox <http://www.jacklmoore.com/colorbox>`_
+If you click on images on a gallery, or on images with links in post, you will
+see a bigger image, thanks to the excellent `colorbox
+<http://www.jacklmoore.com/colorbox>`_. If don’t want this behavior, add an
+``.islink`` class to your image or link.
The gallery pages are generated using the ``gallery.tmpl`` template, and you can
customize it there (you could switch to another lightbox instead of colorbox, change
its settings, change the layout, etc.).
-The ``conf.py`` options affecting gallery pages are these::
+Images to be used in normal posts can be placed in the ``images`` folder. These
+images will be processed and have thumbnails created just as for galleries, but will
+then be copied directly to the corresponding path in the ``output`` directory, so you
+can reference it from whatever page you like, most easily using the ``thumbnail``
+reST extension. If you don't want thumbnails, just use the ``files`` folder instead.
+
+The ``conf.py`` options affecting images and gallery pages are these::
- # Galleries are folders in galleries/
- # Final location of galleries will be output / GALLERY_PATH / gallery_name
- GALLERY_PATH = "galleries"
+ # One or more folders containing galleries. The format is a dictionary of
+ # {"source": "relative_destination"}, where galleries are looked for in
+ # "source/" and the results will be located in
+ # "OUTPUT_PATH/relative_destination/gallery_name"
+ # Default is:
+ GALLERY_FOLDERS = {"galleries": "galleries"}
+ # More gallery options:
THUMBNAIL_SIZE = 180
MAX_IMAGE_SIZE = 1280
USE_FILENAME_AS_TITLE = True
- GALLERY_SORT_BY_DATE = False
EXTRA_IMAGE_EXTENSIONS = []
+ # If set to False, it will sort by filename instead. Defaults to True
+ GALLERY_SORT_BY_DATE = True
+
+ # Folders containing images to be used in normal posts or pages. Images will be
+ # scaled down according to IMAGE_THUMBNAIL_SIZE and MAX_IMAGE_SIZE options, but
+ # will have to be referenced manually to be visible on the site
+ # (the thumbnail has ``.thumbnail`` added before the file extension).
+ # The format is a dictionary of {source: relative destination}.
+
+ IMAGE_FOLDERS = {'images': 'images'}
+ IMAGE_THUMBNAIL_SIZE = 400
+
If you add a file in ``galleries/gallery_name/index.txt`` its contents will be
converted to HTML and inserted above the images in the gallery page. The
format is the same as for posts.
@@ -1212,20 +1435,50 @@ The currently available filters are:
def yui_compressor(infile):
return runinplace(r'yui-compressor --nomunge %1 -o %2', infile)
- You can turn any function into a filter using ``apply_to_file``.
+ You can turn any function into a filter using ``apply_to_text_file`` (for
+ text files to be read in UTF-8) and ``apply_to_binary_file`` (for files to
+ be read in binary mode).
+
As a silly example, this would make everything uppercase and totally break
your website:
.. code-block:: python
import string
- from nikola.filters import apply_to_file
+ from nikola.filters import apply_to_text_file
FILTERS = {
- ".html": [apply_to_file(string.upper)]
+ ".html": [apply_to_text_file(string.upper)]
}
+html_tidy_nowrap
+ Prettify HTML 5 documents with `tidy5 <http://www.html-tidy.org/>`_
+
+html_tidy_wrap
+ Prettify HTML 5 documents wrapped at 80 characters with `tidy5 <http://www.html-tidy.org/>`_
+
+html_tidy_wrap_attr
+ Prettify HTML 5 documents and wrap lines and attributes with `tidy5 <http://www.html-tidy.org/>`_
+
+html_tidy_mini
+ Minify HTML 5 into smaller documents with `tidy5 <http://www.html-tidy.org/>`_
+
+html_tidy_withconfig
+ Run `tidy5 <http://www.html-tidy.org/>`_ with ``tidy5.conf`` as the config file (supplied by user)
+
+html5lib_minify
+ Minify HTML5 using html5lib_minify
+
+html5lib_xmllike
+ Format using html5lib
+
+typogrify
+ Improve typography using `typogrify <http://static.mintchaos.com/projects/typogrify/>`__
+
+typogrify_sans_widont
+ Same as typogrify without the widont filter
+
minify_lines
- Strips leading whitespace and blank lines. Useful for compacting HTML but pre-formatted text must be escaped manually.
+ **THIS FILTER HAS BEEN TURNED INTO A NOOP** and currently does nothing.
yui_compressor
Compress CSS/JavaScript using `YUI compressor <http://yui.github.io/yuicompressor/>`_
@@ -1239,8 +1492,11 @@ optipng
jpegoptim
Compress JPEG files using `jpegoptim <http://www.kokkonen.net/tjko/projects.html>`_
-typogrify
- Improve typography using `typogrify <https://github.com/mintchaos/typogrify>`_
+
+You can apply filters to specific posts or pages by using the ``filters`` metadata field::
+
+ .. filters:: filters.html_tidy_nowrap, "sed s/foo/bar"
+
Optimizing Your Website
@@ -1261,7 +1517,7 @@ different ones, or about other web servers, please share!
AddType text/css .css
-#. Optionally you can greate static compressed copies and save some CPU on your server
+#. Optionally you can create static compressed copies and save some CPU on your server
with the GZIP_FILES option in Nikola.
#. The webassets Nikola plugin can drastically decrease the number of CSS and JS files your site fetches.
@@ -1272,42 +1528,84 @@ different ones, or about other web servers, please share!
#. The USE_CDN option offloads standard JavaScript and CSS files to a CDN so they are not
downloaded from your server.
-reStructuredText Extensions
----------------------------
-
-Nikola includes support for a few directives and roles that are not part of docutils, but which
-we think are handy for website development.
+Math
+----
+
+Nikola supports math input via MathJax. It is activated via the math roles and
+directives of reStructuredText and the usual LaTeX delimiters (``\(inline\)``
+and ``\[display\]``) for other input formats.
+
+We **DO NOT** support the old, deprecated and error-prone ``$inline$``
+delimiters by default. If you want to use them, please add them manually,
+like this:
+
+.. code:: python
+
+ """
+ MATHJAX_CONFIG = """
+ <script type="text/x-mathjax-config">
+ MathJax.Hub.Config({
+ tex2jax: {
+ inlineMath: [ ['$','$'], ["\\\(","\\\)"] ],
+ displayMath: [ ['$$','$$'], ["\\\[","\\\]"] ],
+ processEscapes: true
+ },
+ displayAlign: 'left', // Change this to 'center' to center equations.
+ "HTML-CSS": {
+ styles: {'.MathJax_Display': {"margin": 0}}
+ }
+ });
+ </script>
+ """
-MathJax
-~~~~~~~
+Inline mathematics are produced using the reST `math` **role** or the ``\(…\)`` delimiters:
-Nikola supports math input via MathJax. It uses the usual math roles and
-directives of reStructuredText.
+Euler’s formula: :math:`e^{ix} = \cos x + i\sin x`
-In order to use them in your posts, you **must** add the special ``mathjax`` tag.
+In reST:
-Inline mathematics (equivalent to single dollar signs or backslash-parentheses
-in LaTeX) are produced using the `math` **role**:
+.. code:: restructuredtext
-Euler’s formula: :math:`e^{ix} = \cos x + i\sin x`
+ Euler’s formula: :math:`e^{ix} = \cos x + i\sin x`
-::
+In other input formats::
- Euler’s formula: :math:`e^{ix} = \cos x + i\sin x`
+ Euler’s formula: \(e^{ix} = \cos x + i\sin x\)
-Display mathematics (equivalent to double dollar signs or backslash-brackets in
-LaTeX) are produced using the `math` **directive**:
+Display mathematics are produced using the reST `math` **directive** or the ``\[…\]`` delimiters:
.. math::
\int \frac{dx}{1+ax}=\frac{1}{a}\ln(1+ax)+C
+
+In reST:
+
::
.. math::
\int \frac{dx}{1+ax}=\frac{1}{a}\ln(1+ax)+C
+In other input formats:
+
+::
+
+ \[\int \frac{dx}{1+ax}=\frac{1}{a}\ln(1+ax)+C\]
+
+reStructuredText Extensions
+---------------------------
+
+Nikola includes support for a few directives and roles that are not part of docutils, but which
+we think are handy for website development.
+
+Includes
+~~~~~~~~
+
+Nikola supports the standard reStructuredText ``include`` directive, but with a
+catch: filenames are relative to **Nikola site root** (directory with ``conf.py``)
+instead of the post location (eg. ``posts/`` directory)!
+
Media
~~~~~
@@ -1316,7 +1614,7 @@ URL of the page. For example here are two random videos::
.. media:: http://vimeo.com/72425090
- .. youtube:: http://www.youtube.com/watch?v=wyRpAat5oz0
+ .. media:: http://www.youtube.com/watch?v=wyRpAat5oz0
It supports Instagram, Flickr, Github gists, Funny or Die, and dozens more, thanks to `Micawber <https://github.com/coleifer/micawber>`_
@@ -1381,18 +1679,28 @@ for ``code`` directive are provided: ``code-block`` and ``sourcecode``::
Listing
~~~~~~~
-To use this, you have to put your source code files inside ``listings`` or whatever your
-``LISTINGS_FOLDER`` variable is set to. Assuming you have a ``foo.py`` inside that folder::
+To use this, you have to put your source code files inside ``listings`` or whatever folders
+your ``LISTINGS_FOLDERS`` variable is set to fetch files from. Assuming you have a ``foo.py``
+inside one of these folders::
.. listing:: foo.py python
Will include the source code from ``foo.py``, highlight its syntax in python mode,
-and also create a ``listings/foo.py.html`` page and the listing will have a title linking to it.
+and also create a ``listings/foo.py.html`` page (or in another directory, depending on
+``LISTINGS_FOLDER``) and the listing will have a title linking to it.
Listings support the same options `reST includes`__ support (including
various options for controlling which parts of the file are included), and also
a ``linenos`` option for Sphinx compatibility.
+The ``LISTINGS_FOLDER`` configuration variable allows to specify a list of folders where
+to fetch listings from together with subfolder of the ``output`` folder where the
+processed listings should be put in. The default is, ``LISTINGS_FOLDERS = {'listings': 'listings'}``,
+which means that all source code files in ``listings`` will be taken and stored in ``output/listings``.
+Extending ``LISTINGS_FOLDERS`` to ``{'listings': 'listings', 'code': 'formatted-code'}``
+will additionally process all source code files in ``code`` and put the results into
+``output/formatted-code``.
+
__ http://docutils.sourceforge.net/docs/ref/rst/directives.html#including-an-external-document-fragment
.. note::
@@ -1415,6 +1723,29 @@ Producing this:
This degrades gracefully if the browser doesn't support JavaScript.
+Thumbnails
+~~~~~~~~~~
+
+To include an image placed in the ``images`` folder (or other folders defined in ``IMAGE_FOLDERS``), use the
+``thumbnail`` directive, like this::
+
+ .. thumbnail:: ../tesla.jpg
+
+(make sure to check the file paths!)
+
+The small thumbnail will be placed in the page, and it will be linked to the bigger
+version of the image when clicked, using
+`colorbox <http://www.jacklmoore.com/colorbox>`_ by default. All options supported by
+the reST `image <http://docutils.sourceforge.net/docs/ref/rst/directives.html#image>`_
+directive are supported (except ``target``). If a body element is provided, the
+thumbnail will mimic the behavior of the
+`figure <http://docutils.sourceforge.net/docs/ref/rst/directives.html#figure>`_
+directive instead::
+
+ .. thumbnail:: ../tesla.jpg
+
+ Nikola Tesla, the man that invented the 20th century.
+
Slideshows
~~~~~~~~~~
@@ -1479,6 +1810,16 @@ and it will produce:
Post List
~~~~~~~~~
+.. WARNING::
+
+ Any post or page that uses this directive will be considered out of date,
+ every time a post is added or deleted, causing maybe unnecessary rebuilds.
+
+ On the other hand, it will sometimes **not** be considered out of date if
+ a post content changes, so it can sometimes be shown outdated, in those
+ cases, use ``nikola build -a`` to force a total rebuild.
+
+
This directive can be used to generate a list of posts. You could use it, for
example, to make a list of the latest 5 blog posts, or a list of all blog posts
with the tag ``nikola``::
@@ -1486,26 +1827,70 @@ with the tag ``nikola``::
Here are my 5 latest and greatest blog posts:
.. post-list::
- :start: -5
+ :stop: 5
These are all my posts about Nikola:
.. post-list::
:tags: nikola
-Note that you can give the ``tags`` option a comma-separated list of tags, in
-which case the list will show all posts that have at least one of those tags.
-Other interesting options include ``stop`` (set it to ``-1``, for example, to
-show all but the last post); ``reverse`` (set to ``True`` to sort the list in
-chronological order, instead of the default latest-post-first); ``lang``
-(language to use for post titles and links); and ``slugs`` (allows you to filter
-by post slugs, instead of tags).
+The following options are recognized:
+
+* ``start`` : integer
+ The index of the first post to show.
+ A negative value like ``-3`` will show the *last* three posts in the
+ post-list.
+ Defaults to None.
+
+* ``stop`` : integer
+ The index of the last post to show.
+ A value negative value like ``-1`` will show every post, but not the
+ *last* in the post-list.
+ Defaults to None.
+
+* ``reverse`` : flag
+ Reverse the order of the post-list.
+ Defaults is to not reverse the order of posts.
+
+* ``sort``: string
+ Sort post list by one of each post's attributes, usually ``title`` or a
+ custom ``priority``. Defaults to None (chronological sorting).
+
+* ``tags`` : string [, string...]
+ Filter posts to show only posts having at least one of the ``tags``.
+
+ Defaults to None.
+
+* ``slugs`` : string [, string...]
+ Filter posts to show only posts having at least one of the ``slugs``.
+ Defaults to None.
+
+* ``all`` : flag
+ Shows all posts and pages in the post list.
+ Defaults to show only posts with set *use_in_feeds*.
+
+* ``lang`` : string
+ The language of post *titles* and *links*.
+ Defaults to default language.
+
+* ``template`` : string
+ The name of an alternative template to render the post-list.
+ Defaults to ``post_list_directive.tmpl``
+
+* ``id`` : string
+ A manual id for the post list.
+ Defaults to a random name composed by ``'post_list_' + uuid.uuid4().hex``.
The post list directive uses the ``post_list_directive.tmpl`` template file (or
another one, if you use the ``template`` option) to generate the list's HTML. By
default, this is an unordered list with dates and clickable post titles. See
the template file in Nikola's base theme for an example of how this works.
+The list may fail to update in some cases, please run ``nikola build -a`` with
+the appropriate path if this happens.
+
+We recommend using stories with dates in the past (1970-01-01) to avoid
+dependency issues.
Importing Your WordPress Site Into Nikola
-----------------------------------------
@@ -1562,6 +1947,8 @@ Instead a new file with a timestamp at the end of the filename will be created.
Using Twitter Cards
-------------------
+Nikola supports Twitter Card summaries, but they are disabled by default.
+
Twitter Cards enable you to show additional information in Tweets that link
to you content.
Nikola supports `Twitter Cards <https://dev.twitter.com/docs/cards>`_.
@@ -1570,24 +1957,25 @@ They are implemented to use *Open Graph* tags whenever possible.
.. admonition:: Important
To use Twitter Cards you need to opt-in on Twitter.
- To do so please use the form that can be found at https://dev.twitter.com/form/participate-twitter-cards
+ To do so, please visit https://cards-dev.twitter.com/validator
+
+Images displayed come from the `previewimage` meta tag.
-To enable and configure your use of Twitter Cards please modify the
-corresponding lines in your ``conf.py``.
-An example configuration that uses the Twitter nickname of the website
-and the authors Twitter user ID is found below.
+You can specify the card type by using the `card` parameter in TWITTER_CARD.
+
+To enable and configure your use of Twitter Cards, please modify the
+corresponding lines in your ``conf.py``:
.. code-block:: python
TWITTER_CARD = {
- 'use_twitter_cards': True, # enable Twitter Cards / Open Graph
- 'site': '@website', # twitter nick for the website
- # 'site:id': 123456, # Same as site, but the website's Twitter user ID instead.
- # 'creator': '@username', # Username for the content creator / author.
- 'creator:id': 654321, # Same as creator, but the Twitter user's ID.
+ 'use_twitter_cards': True, # enable Twitter Cards
+ 'card': 'summary', # Card type, you can also use 'summary_large_image',
+ # see https://dev.twitter.com/cards/types
+ 'site': '@website', # twitter nick for the website
+ 'creator': '@username', # Username for the content creator / author.
}
-
Custom Plugins
--------------
@@ -1599,7 +1987,7 @@ directories listed in the ``EXTRA_PLUGINS_DIRS`` configuration variable.
Getting Extra Plugins
---------------------
-If you want extra plugins, there is also the `Plugins Index <http://plugins.getnikola.com/>`_.
+If you want extra plugins, there is also the `Plugins Index <https://plugins.getnikola.com/>`_.
Similarly to themes, there is a nice, built-in command to manage them —
``plugin``::
@@ -1613,7 +2001,7 @@ Similarly to themes, there is a nice, built-in command to manage them —
$ nikola plugin --install helloworld
- [2013-10-12T16:51:56Z] NOTICE: install_plugin: Downloading: http://plugins.getnikola.com/v6/helloworld.zip
+ [2013-10-12T16:51:56Z] NOTICE: install_plugin: Downloading: https://plugins.getnikola.com/v6/helloworld.zip
[2013-10-12T16:51:58Z] NOTICE: install_plugin: Extracting: helloworld into plugins
plugins/helloworld/requirements.txt
[2013-10-12T16:51:58Z] NOTICE: install_plugin: This plugin has Python dependencies.
@@ -1641,7 +2029,7 @@ And upgrade them::
[2014-04-15T09:00:18Z] WARNING: plugin: This is not very smart, it just reinstalls some plugins and hopes for the best
Will upgrade 1 plugins: graphviz
Upgrading graphviz
- [2014-04-15T09:00:20Z] INFO: plugin: Downloading: http://plugins.getnikola.com/v7/graphviz.zip
+ [2014-04-15T09:00:20Z] INFO: plugin: Downloading: https://plugins.getnikola.com/v7/graphviz.zip
[2014-04-15T09:00:20Z] INFO: plugin: Extracting: graphviz into /home/ralsina/.nikola/plugins/
[2014-04-15T09:00:20Z] NOTICE: plugin: This plugin has third-party dependencies you need to install manually.
Contents of the requirements-nonpy.txt file:
@@ -1658,8 +2046,19 @@ You can use the plugins in this repository without installing them into your
site, by cloning the repository and adding the path of the plugins directory to
the ``EXTRA_PLUGINS_DIRS`` list in your configuration.
+Advanced Features
+-----------------
+
+Debugging
+~~~~~~~~~
+
+For pdb debugging in Nikola, you should use ``doit.tools.set_trace()`` instead
+of the usual pdb call. By default, doit (and thus Nikola) redirects stdout and
+stderr. Thus, you must use the different call. (Alternatively, you could run
+with ``nikola build -v 2``, which disables the redirections.)
+
Shell Tab Completion
---------------------
+~~~~~~~~~~~~~~~~~~~~
Since Nikola is a command line tool, and this is the 21st century, it's handy to have smart tab-completion
so that you don't have to type the full commands.
diff --git a/docs/social_buttons.txt b/docs/social_buttons.txt
index 0f039aa..9436ee7 100644
--- a/docs/social_buttons.txt
+++ b/docs/social_buttons.txt
@@ -8,7 +8,7 @@
Using Alternative Social Buttons with Nikola
============================================
-:Version: 7.1.0
+:Version: 7.6.0
.. class:: alert alert-info pull-right
diff --git a/docs/sphinx/conf.py b/docs/sphinx/conf.py
index 359cf1c..36cf31b 100644
--- a/docs/sphinx/conf.py
+++ b/docs/sphinx/conf.py
@@ -47,16 +47,16 @@ master_doc = 'index'
# General information about the project.
project = 'Nikola'
-copyright = '2012-2014, The Nikola Contributors'
+copyright = '2012-2015, The Nikola Contributors'
# The version info for the project yo're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
-version = '7.1.0'
+version = '7.6.0'
# The full version, including alpha/beta/rc tags.
-release = '7.1.0'
+release = '7.6.0'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
diff --git a/docs/sphinx/index.txt b/docs/sphinx/index.txt
index 1275b6c..c677caf 100644
--- a/docs/sphinx/index.txt
+++ b/docs/sphinx/index.txt
@@ -3,13 +3,12 @@ Nikola Documentation
Those are the docs for the current GitHub master. It might be incompatible
with the stable release. The docs for the stable release are available `on
-the Nikola website <http://getnikola.com/documentation.html>`_.
+the Nikola website <https://getnikola.com/documentation.html>`_.
.. toctree::
:maxdepth: 5
manual
- upgrading-to-v6
creating-a-site
creating-a-theme
theming
diff --git a/docs/sphinx/upgrading-to-v6.txt b/docs/sphinx/upgrading-to-v6.txt
deleted file mode 120000
index 1c7e16f..0000000
--- a/docs/sphinx/upgrading-to-v6.txt
+++ /dev/null
@@ -1 +0,0 @@
-../upgrading-to-v6.txt \ No newline at end of file
diff --git a/docs/getting-help.txt b/docs/support.rst
index 567ab66..0d4fc3a 100644
--- a/docs/getting-help.txt
+++ b/docs/support.rst
@@ -1,9 +1,9 @@
-.. title: Help, Bugs, Contact
+.. title: Support and Contact
.. slug: contact
.. date: 1970-01-01 15:00:00
.. description: Get help using Nikola, or contact us.
-:Version: 7.1.0
+:Version: 7.5.1
.. class:: alert alert-info pull-right
diff --git a/docs/theming.txt b/docs/theming.txt
index 2e2a516..f9667ed 100644
--- a/docs/theming.txt
+++ b/docs/theming.txt
@@ -8,7 +8,7 @@
Theming Nikola
==============
-:Version: 7.1.0
+:Version: 7.6.0
:Author: Roberto Alsina <ralsina@netmanagers.com.ar>
.. class:: alert alert-info pull-right
@@ -68,10 +68,9 @@ parent
I recommend this:
- * If your theme uses bootstrap, inherit the ``bootstrap`` theme.
- * If your theme uses bootstrap3, inherit the ``bootstrap3`` theme.
+ * If your theme uses Bootstrap 3, inherit the ``bootstrap3`` theme.
* If your theme uses Jinja as a template engine, inherit ``base-jinja``
- or ``bootstrap-jinja`` (available at http://themes.nikola.ralsina.com.ar)
+ or ``bootstrap3-jinja``
* In any other case, inherit ``base``.
And these optional files:
@@ -84,7 +83,7 @@ bundles
A text file containing a list of files to be turned into bundles using WebAssets.
For example::
- assets/css/all.css=bootstrap.css,bootstrap-responsive.css,rst.css,code.css,colorbox.css,custom.css
+ assets/css/all.css=bootstrap.css,rst.css,code.css,colorbox.css,custom.css
This creates a file called "assets/css/all.css" in your output that is the
combination of all the other file paths, relative to the output file.
@@ -117,29 +116,31 @@ These are the templates that come with the included themes:
This template defines the basic page layout for the site. It's mostly plain HTML
but defines a few blocks that can be re-defined by inheriting templates.
- It has some separate pieces defined in ``base_helper.tmpl`` so they can be
- easily overriden. For example, the Bootstrap theme adds a ``bootstrap_helper.tmpl``
- and then uses it to override things defined in base theme's ``base_helper.tmpl``
+ It has some separate pieces defined in ``base_helper.tmpl``,
+ ``base_header.tmpl`` and ``base_footer.tmpl`` so they can be
+ easily overriden.
``index.tmpl``
Template used to render the multipost indexes. The posts are in a ``posts`` variable.
Some functionality is in the ``index_helper.tmpl`` helper template.
+``archiveindex.tmpl``
+ Used to display archives, if ``ARCHIVES_ARE_INDEXES`` is True.
+ By default, it just inherits ``index.tmpl``.
+
``comments_helper.tmpl``
This template handles comments. You should probably never touch it :-)
- It uses a bunch of helper templates, one for each supported comment system:
- ``disqus_helper.tmpl`` ``facebook_helper.tmpl`` ``googleplus_helper.tmpl``
- ``intensedebate_helper.tmpl`` ``isso_helper.tmpl`` ``livefyre_helper.tmpl``
- ``moot_helper.tmpl``
+ It uses a bunch of helper templates, one for each supported comment system
+ (all of which start with ``comments_helper``)
-``crumbs.tmpl`` ``slides.tmpl``
+``crumbs.tmpl``, ``slides.tmpl``
These templates help render specific UI items, and can be tweaked as needed.
``gallery.tmpl``
Template used for image galleries. Interesting data includes:
- * ``text``: A descriptive text for the gallery.
- * ``crumbs``: A list of ``link, crumb`` to implement a crumbbar.
+ * ``post``: A post object, containing descriptive ``post.text()`` for the gallery.
+ * ``crumbs``: A list of ``link, crumb`` to implement breadcrumbs.
* ``folders``: A list of folders to implement hierarchical gallery navigation.
* ``enable_comments``: To enable/disable comments in galleries.
* ``thumbnail_size``: The ``THUMBNAIL_SIZE`` option.
@@ -159,26 +160,31 @@ These are the templates that come with the included themes:
``list_post.tmpl``
Template used to display generic lists of posts, which it gets in ``posts``.
+``listing.tmpl``
+ Used to display code listings.
+
``post.tmpl``
Template used by default for blog posts, gets the data in a ``post`` object
which is an instance of the Post class. Some functionality is in the
- ``post_helper.tmpl`` template.
+ ``post_helper.tmpl`` and ``post_header.tmpl`` templates.
+
+``post_list_directive.tmpl``
+ Template used by the ``post_list`` reStructuredText directive.
``story.tmpl``
Used for pages that are not part of a blog, usually a cleaner, less
intrusive layout than ``post.tmpl``, but same parameters.
-``listing.tmpl``
- Used to display code listings.
-
-``tags.tmpl``
- Used to display the list of tags and categories. ``tag.tmpl`` is used to show the contents
- of a single tag or category.
+``tag.tmpl``
+ Used to show the contents of a single tag or category.
``tagindex.tmpl``
- Used to display tag indexes, if ``TAG_PAGES_ARE_INDEXES`` is True.
+ Used to show the contents of a single tag or category, if ``TAG_PAGES_ARE_INDEXES`` is True.
By default, it just inherits ``index.tmpl``.
+``tags.tmpl``
+ Used to display the list of tags and categories.
+
You can add other templates for specific pages, which the user can then use in his ``POSTS``
or ``PAGES`` option in ``conf.py``. Also, keep in mind that your theme is yours,
there is no reason why you would need to maintain the inheritance as it is, or not
diff --git a/docs/upgrading-to-v6.txt b/docs/upgrading-to-v6.txt
deleted file mode 100644
index 271d98e..0000000
--- a/docs/upgrading-to-v6.txt
+++ /dev/null
@@ -1,111 +0,0 @@
-.. title: Upgrading to v6
-.. slug: upgrading-to-v6
-.. date: 2013-08-23 23:00:00 UTC-03:00
-.. tags:
-.. link:
-.. description:
-
-Upgrading to v6
-===============
-
-:Version: 7.1.0
-
-.. class:: lead
-
-Nikola tries fairly hard to be compatible between versions. However, there were
-a few areas which were getting clunky, and needed fxing. So, here's what you may
-need to change in your site.
-
-If you need to change anything else, or something breaks, please write at nikola-discuss
-and I'll add further tweaks here.
-
-Themes
-------
-
-**NOTE**
- There is no equivalent for the jinja-default theme yet. If you have a custom,
- jinja-based theme, upgrading is probably a bad idea right now.
-
-
-Themes have been renamed:
-
-* site => bootstrap
-* orphan => base
-
-Theme added:
-
-* base-jinja
-
-Themes have been moved out of nikola and into nikola-themes:
-
-* default => oldfashioned at nikola-themes
-* jinja-default => not there yet, coming soon
-* monospace => monospace at nikola-themes
-* site-reveal => reveal at nikola-themes
-
-You may have to change your ``THEME`` setting, or change the ``parent`` if you are
-using a custom theme. Also, some templates have been tweaked, but nothing should
-break for you.
-
-Facebook comments support changed the HTML tag to:
-
-.. code-block:: mako
-
- <html
- %if comment_system == 'facebook':
- xmlns:fb="http://ogp.me/ns/fb#"
- %endif
- lang="${lang}">
-
-If you do not want to use Facebook comments, you can leave the old ``<html
-lang="${lang}">`` tag in and it will work just fine.
-
-Comments
-~~~~~~~~
-
-If you want a custom theme to support comment systems other than disqus, you will need to:
-
-1) Replace mentions of disqus_helper.tmpl with comments_helper.tmpl
-2) Replace mentions of html_disqus with comment_form
-3) Replace mentions of html_disqus_link with comment_link
-4) Replace mentions of html_disqus_script with comment_link_script
-
-If you don't, your theme should work just fine, but support only disqus comments.
-
-
-Configuration
--------------
-
-A number of options have been renamed. In most cases, the behaviour
-should be **exactly** as before.
-
-However, ``post_pages`` was split into ``POSTS`` and ``PAGES``. Long
-story short, anything that had a ``True`` as the ``use_in_feeds``
-(last) value goes to ``POSTS`` and anything with ``False`` goes to
-``PAGES``. For example:
-
-.. code-block:: python
-
- post_pages = (
- ("posts/*.txt", "", "post.tmpl", True),
- ("stories/*.txt", "p", "story.tmpl", False),
- ("stories/*.html", "s", "story.tmpl", False),
- )
-
- ### becomes ###
-
- POSTS = (
- ("posts/*.txt", "", "post.tmpl"),
- )
-
- PAGES = (
- ("stories/*.txt", "p", "story.tmpl"),
- ("stories/*.html", "s", "story.tmpl"),
- )
-
-Also, you will get warnings. That doesn't mean things broke. They are
-there to inform you of what's happening, and that you need to tweak your
-config.
-
-All the deprecated options will work during the v6 cycle, and only be
-removed in v7, when those warnings will become errors.