From 3a0d66f07b112b6d2bdc2b57bbf717a89a351ce6 Mon Sep 17 00:00:00 2001 From: Unit 193 Date: Wed, 3 Feb 2021 19:17:00 -0500 Subject: New upstream version 8.1.2. --- docs/creating-a-site.rst | 186 ++ docs/creating-a-site.txt | 175 -- docs/creating-a-theme.rst | 851 ++++++ docs/creating-a-theme.txt | 825 ----- docs/extending.rst | 755 +++++ docs/extending.txt | 550 ---- docs/internals.rst | 142 + docs/internals.txt | 144 - docs/man/nikola.1.gz | Bin 1785 -> 1785 bytes docs/man/nikola.rst | 8 +- docs/manual.rst | 3177 ++++++++++++++++++++ docs/manual.txt | 2025 ------------- docs/path_handlers.rst | 227 ++ docs/social_buttons.rst | 199 ++ docs/social_buttons.txt | 201 -- docs/sphinx/conf.py | 19 +- docs/sphinx/creating-a-site.rst | 1 + docs/sphinx/creating-a-site.txt | 1 - docs/sphinx/creating-a-theme.rst | 1 + docs/sphinx/creating-a-theme.txt | 1 - docs/sphinx/extending.rst | 1 + docs/sphinx/extending.txt | 1 - docs/sphinx/index.rst | 32 + docs/sphinx/index.txt | 18 - docs/sphinx/internals.rst | 1 + docs/sphinx/internals.txt | 1 - docs/sphinx/manual.rst | 1 + docs/sphinx/manual.txt | 1 - docs/sphinx/modules.rst | 7 + docs/sphinx/nikola.packages.datecond.rst | 7 + .../nikola.packages.pygments_better_html.rst | 7 + docs/sphinx/nikola.packages.rst | 17 + docs/sphinx/nikola.packages.tzlocal.rst | 35 + docs/sphinx/nikola.plugins.command.auto.rst | 7 + docs/sphinx/nikola.plugins.command.rst | 148 + docs/sphinx/nikola.plugins.command.rst2html.rst | 7 + docs/sphinx/nikola.plugins.compile.markdown.rst | 35 + docs/sphinx/nikola.plugins.compile.rest.rst | 91 + docs/sphinx/nikola.plugins.compile.rst | 52 + docs/sphinx/nikola.plugins.misc.rst | 27 + docs/sphinx/nikola.plugins.rst | 31 + docs/sphinx/nikola.plugins.task.rst | 171 ++ docs/sphinx/nikola.plugins.task.sitemap.rst | 10 + docs/sphinx/nikola.plugins.template.rst | 27 + docs/sphinx/nikola.rst | 116 + docs/sphinx/path_handlers.rst | 1 + docs/sphinx/requirements-docs.txt | 2 + docs/sphinx/social_buttons.rst | 1 + docs/sphinx/social_buttons.txt | 1 - docs/sphinx/support.rst | 1 + docs/sphinx/template-variables.rst | 1 + docs/sphinx/theming.rst | 1 + docs/sphinx/theming.txt | 1 - docs/sphinx/update-modules.sh | 2 + docs/support.rst | 27 +- docs/template-variables.rst | 521 ++++ docs/theming.rst | 479 +++ docs/theming.txt | 229 -- 58 files changed, 7405 insertions(+), 4201 deletions(-) create mode 100644 docs/creating-a-site.rst delete mode 100644 docs/creating-a-site.txt create mode 100644 docs/creating-a-theme.rst delete mode 100644 docs/creating-a-theme.txt create mode 100644 docs/extending.rst delete mode 100644 docs/extending.txt create mode 100644 docs/internals.rst delete mode 100644 docs/internals.txt create mode 100644 docs/manual.rst delete mode 100644 docs/manual.txt create mode 100644 docs/path_handlers.rst create mode 100644 docs/social_buttons.rst delete mode 100644 docs/social_buttons.txt create mode 120000 docs/sphinx/creating-a-site.rst delete mode 120000 docs/sphinx/creating-a-site.txt create mode 120000 docs/sphinx/creating-a-theme.rst delete mode 120000 docs/sphinx/creating-a-theme.txt create mode 120000 docs/sphinx/extending.rst delete mode 120000 docs/sphinx/extending.txt create mode 100644 docs/sphinx/index.rst delete mode 100644 docs/sphinx/index.txt create mode 120000 docs/sphinx/internals.rst delete mode 120000 docs/sphinx/internals.txt create mode 120000 docs/sphinx/manual.rst delete mode 120000 docs/sphinx/manual.txt create mode 100644 docs/sphinx/modules.rst create mode 100644 docs/sphinx/nikola.packages.datecond.rst create mode 100644 docs/sphinx/nikola.packages.pygments_better_html.rst create mode 100644 docs/sphinx/nikola.packages.rst create mode 100644 docs/sphinx/nikola.packages.tzlocal.rst create mode 100644 docs/sphinx/nikola.plugins.command.auto.rst create mode 100644 docs/sphinx/nikola.plugins.command.rst create mode 100644 docs/sphinx/nikola.plugins.command.rst2html.rst create mode 100644 docs/sphinx/nikola.plugins.compile.markdown.rst create mode 100644 docs/sphinx/nikola.plugins.compile.rest.rst create mode 100644 docs/sphinx/nikola.plugins.compile.rst create mode 100644 docs/sphinx/nikola.plugins.misc.rst create mode 100644 docs/sphinx/nikola.plugins.rst create mode 100644 docs/sphinx/nikola.plugins.task.rst create mode 100644 docs/sphinx/nikola.plugins.task.sitemap.rst create mode 100644 docs/sphinx/nikola.plugins.template.rst create mode 100644 docs/sphinx/nikola.rst create mode 120000 docs/sphinx/path_handlers.rst create mode 100644 docs/sphinx/requirements-docs.txt create mode 120000 docs/sphinx/social_buttons.rst delete mode 120000 docs/sphinx/social_buttons.txt create mode 120000 docs/sphinx/support.rst create mode 120000 docs/sphinx/template-variables.rst create mode 120000 docs/sphinx/theming.rst delete mode 120000 docs/sphinx/theming.txt create mode 100755 docs/sphinx/update-modules.sh create mode 100644 docs/template-variables.rst create mode 100644 docs/theming.rst delete mode 100644 docs/theming.txt (limited to 'docs') diff --git a/docs/creating-a-site.rst b/docs/creating-a-site.rst new file mode 100644 index 0000000..ebe9aa6 --- /dev/null +++ b/docs/creating-a-site.rst @@ -0,0 +1,186 @@ +.. title: Creating a Site (Not a Blog) with Nikola +.. slug: creating-a-site-not-a-blog-with-nikola +.. date: 2015-01-10 10:00:00 UTC +.. tags: nikola, python +.. link: +.. description: +.. author: The Nikola Team + +.. 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 ;-) + +Since it started, Nikola has had the capabilities to create generic sites. For example, +Nikola’s `own site `_ 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 (mostly) configured site: + +.. code:: console + + $ nikola init 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: + +.. code:: python + + # Data about this site + BLOG_AUTHOR = "Roberto Alsina" + BLOG_TITLE = "Not a Blog" + # This is the main URL for your site. It will be used + # in a prominent link + SITE_URL = "https://getnikola.com/" + BLOG_EMAIL = "ralsina@example.com" + BLOG_DESCRIPTION = "This is a demo site (not a blog) for Nikola." + + # + # Some things in the middle you don't really need to change... + # + + # you can also keep the current content of POSTS if you want a blog with your site + POSTS = () + # remove destination directory to generate pages in the root directory + PAGES = ( + ("pages/*.rst", "", "page.tmpl"), + ("pages/*.txt", "", "page.tmpl"), + ("pages/*.html", "", "page.tmpl"), + ) + + # And to avoid a conflict because blogs try to generate /index.html + INDEX_PATH = "blog" + + # Or you can disable blog indexes altogether: + # DISABLE_INDEXES = True + + +And now we are ready to create our first page: + +.. code:: console + + $ nikola new_page + Creating New Page + ----------------- + + Title: index + Scanning posts....done! + [1970-01-01T00:00:00Z] INFO: new_page: Your page's text is at: pages/index.rst + +We can now build and preview our site: + +.. code:: console + + $ nikola build + Scanning posts.done! + . render_site:output/categories/index.html + . render_sources:output/index.txt + . render_rss:output/rss.xml + ⋮ + $ nikola serve + [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/ + +So, what’s in that ``pages/index.txt`` file? + +.. code:: rest + + .. title: index + .. slug: index + .. date: 1970-01-01 00:00:00 UTC + .. tags: + .. link: + .. description: + + + 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``). ``date``, ``tags`` and ``link`` +doesn’t matter at all in pages. ``description`` is useful for SEO purposes +if you care for that. + +And below, the content. By default Nikola uses +`reStructuredText `_ but it supports +a ton of formats, including Markdown, plain HTML, Jupyter Notebooks, BBCode, +Wiki, and Textile. We will use reStructuredText for this example, but some +people might find it a bit too limiting — if that is the case, try using HTML +for your pages (Nikola does this on the index page, for example). + +So, let's give the page a nicer title, and some fake content. Since the default +Nikola theme (called ``bootblog4``) is based on `Bootstrap `_ +you can use anything you like from it: + +.. code:: rest + + .. title: Welcome To The Fake Site + .. slug: index + .. date: 1970-01-01 00:00:00 UTC + .. tags: + .. link: + .. description: Fake Site version 1, welcome page! + + + .. class:: jumbotron col-md-6 + + .. admonition:: This is a Fake Site + + It pretends to be about things, but is really just an example. + + .. raw:: html + + Click Me! + + + .. 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 + gravida quam a mi dignissim consequat. Morbi sed iaculis mi. Vivamus ultrices + mattis euismod. Mauris aliquet magna eget mauris volutpat a egestas leo rhoncus. + In hac habitasse platea dictumst. Ut sed mi arcu. Nullam id massa eu orci + convallis accumsan. Nunc faucibus sodales justo ac ornare. In eu congue eros. + Pellentesque iaculis risus urna. Proin est lorem, scelerisque non elementum at, + semper vel velit. Phasellus consectetur orci vel tortor tempus imperdiet. Class + aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos + himenaeos. + +.. admonition:: TIP: Nice URLs + + 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 + (on by default) + +And that's it. You will want to change the NAVIGATION_LINKS option to create a reasonable +menu for your site, you may 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. + +.. admonition:: TIP: So, how do I add a blog now? + + First, change the ``POSTS`` option like this: + + .. code:: python + + POSTS = ( + ("posts/*.rst", "blog", "post.tmpl"), + ("posts/*.txt", "blog", "post.tmpl"), + ("posts/*.html", "blog", "post.tmpl"), + ) + + Create a post with ``nikola new_post`` and that's it, you now have a blog + in the ``/blog/`` subdirectory of your site — you may want to link to + it in ``NAVIGATION_LINKS``. + +If you want to see a site implementing all of the above, check out `the Nikola +website `_. + +I hope this was helpful! diff --git a/docs/creating-a-site.txt b/docs/creating-a-site.txt deleted file mode 100644 index 0891753..0000000 --- a/docs/creating-a-site.txt +++ /dev/null @@ -1,175 +0,0 @@ -.. slug: creating-a-site-not-a-blog-with-nikola -.. date: 2015-01-10 10:00:00 UTC -.. tags: nikola, python -.. link: -.. description: -.. title: Creating a Site (Not a Blog) with Nikola - -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 ;-) - -Since it started, Nikola has had the capabilities to create generic sites. For example, -Nikola’s `own site `_ 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 (mostly) configured site:: - - $ nikola init 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: - -.. code-block:: python - - - ############################################## - # Configuration, please edit - ############################################## - - - # Data about this site - BLOG_AUTHOR = "Roberto Alsina" - BLOG_TITLE = "Not a Blog" - # This is the main URL for your site. It will be used - # in a prominent link - SITE_URL = "https://getnikola.com/" - BLOG_EMAIL = "ralsina@example.com" - BLOG_DESCRIPTION = "This is a demo site (not a blog) for Nikola." - - # - # Some things in the middle you don't really need to change... - # - - POSTS = [] - PAGES = [("pages/*.txt", "", "story.tmpl")] - - # And to avoid a conflict because blogs try to generate /index.html - INDEX_PATH = "blog" - - - -And now we are ready to create our first page:: - - $ nikola new_page - Creating New Page - ----------------- - - 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. - -We can now build and preview our site:: - - $ nikola build - Scanning posts.done! - . render_site:output/categories/index.html - . render_sources:output/index.txt - . render_rss:output/rss.xml - ⋮ - $ nikola serve - [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/ - -So, what’s in that ``pages/index.txt`` file? - -.. code-block:: rest - - .. title: index - .. slug: index - .. date: 1970-01-01 00:00:00 UTC - .. tags: - .. link: - .. description: - - - 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``). ``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 `_ 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 ``bootstrap3``) is based on `Bootstrap `_ -you can use anything you like from it: - -.. code-block:: rest - - .. title: Welcome To The Fake Site - .. slug: index - .. date: 1970-01-01 00:00:00 UTC - .. tags: - .. link: - .. description: Fake Site version 1, welcome page! - - - .. class:: jumbotron col-md-6 - - .. admonition:: This is a Fake Site - - It pretends to be about things, but is really just an example. - - .. raw:: html - - Click Me! - - - .. 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 - gravida quam a mi dignissim consequat. Morbi sed iaculis mi. Vivamus ultrices - mattis euismod. Mauris aliquet magna eget mauris volutpat a egestas leo rhoncus. - In hac habitasse platea dictumst. Ut sed mi arcu. Nullam id massa eu orci - convallis accumsan. Nunc faucibus sodales justo ac ornare. In eu congue eros. - Pellentesque iaculis risus urna. Proin est lorem, scelerisque non elementum at, - semper vel velit. Phasellus consectetur orci vel tortor tempus imperdiet. Class - aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos - himenaeos. - -.. admonition:: TIP: Nice URLs - - 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 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. - -.. admonition:: TIP: So, how do I add a blog now? - - First, change the ``POSTS`` option like this: - - .. code-block:: python - - POSTS = [("posts/*.txt", "blog", "post.tmpl", True)] - - Create a post with ``nikola new_post`` and that's it, you now have a blog - in the ``/blog/`` subdirectory of your site — you may want to link to - it in ``NAVIGATION_LINKS``. - -If you want to see a site implementing all of the above, check out `the Nikola -website `_. - -I hope this was helpful! diff --git a/docs/creating-a-theme.rst b/docs/creating-a-theme.rst new file mode 100644 index 0000000..a1b737d --- /dev/null +++ b/docs/creating-a-theme.rst @@ -0,0 +1,851 @@ +.. title: Creating a Theme +.. slug: creating-a-theme +.. date: 2015-05-28 18:46:48 UTC +.. tags: +.. category: +.. link: +.. description: +.. type: text + +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. + +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. + +If you are looking for a reference, check out :doc:`Theming reference ` and `Template variables `_. + +Today’s theme is `Lanyon `__ which is written by `@mdo `__ +and released under a MIT license, which is liberal enough. + +So, let’s get started. + +Checking It Out +--------------- + +The first step in porting a theme is making the original theme work. Lanyon is awesome in that its +`GitHub project `__ is a full site! + +So:: + + # Get jekyll + sudo apt-get install jekyll + + # Get Lanyon + git clone git@github.com:poole/lanyon.git + + # 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 `__ +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.8.0. 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`` as a parent and ``jinja`` as engine instead:: + + $ cd lanyon-port/ + $ nikola theme -n lanyon --parent base --engine mako + +Edit ``conf.py`` and set ``THEME = 'lanyon'``. Also set ``USE_BUNDLES = False`` (just do it for now, we’ll get to bundles later). +Also, if you intend to publish your theme on the Index, or want to use it with older versions (v7.8.5 or older), use the ``--legacy-meta`` option for ``nikola theme -n``. + +You can now build that site using ``nikola build`` and it will look like this: + +.. figure:: https://getnikola.com/images/lanyon-0.thumbnail.png + :target: https://getnikola.com/images/lanyon-0.png + + This is just the base theme. + +Basic CSS +--------- + +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: + +.. code:: html + + + + + + + + + + + + + Lanyon · A Jekyll theme + + + + + + + + + + + + + + + + + [...] + + +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 + + + + + + + + My Nikola Site | My Nikola Site + + + + + + + + + + + + +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_base.css`` and ``assets/css/code.css`` to function properly. +We will also add themes for Jupyter (``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. +There’s also ``assets/css/nikola_rst.css``, which adds Bootstrap 3-style reST notes etc. + +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, make a copy in your +theme (note this command requires setting your ``THEME`` in ``conf.py`` to +``lanyon``):: + + $ nikola theme -c base_helper.tmpl + +The part we want to change is this: + +.. code:: html+mako + + <%def name="html_stylesheets()"> + %if use_bundles: + %if use_cdn: + + %else: + + %endif + %else: + + + + + %if has_custom_css: + + %endif + %endif + % if needs_ipython_css: + + + % endif + + +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: + + %else: + + + + + + %if has_custom_css: + + %endif + %endif + % if needs_ipython_css: + + + % endif + + + +.. 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 + + + + + + + + +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 + + + Skip to main content +
+