From 0c4dfdec5b55b6064dccc38bbfb0a7c0699c895a Mon Sep 17 00:00:00 2001 From: Agustin Henze Date: Thu, 30 May 2013 17:41:06 -0300 Subject: Imported Upstream version 5.4.4 --- docs/creating-a-theme.txt | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'docs/creating-a-theme.txt') diff --git a/docs/creating-a-theme.txt b/docs/creating-a-theme.txt index 21bf796..11428bd 100644 --- a/docs/creating-a-theme.txt +++ b/docs/creating-a-theme.txt @@ -15,7 +15,7 @@ Starting The Theme First, we create a testing site, and copy the orphan theme from nikola's sources into the right place:: - $ nikola init monospace-site --demo + $ 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. @@ -180,7 +180,7 @@ the posts themselves is different, and that was not described in ``base.tmpl`` a there is a placeholder called content: ``<%block name="content">`` That's because ``base.tmpl`` defines the *base* layout. The layout of more specific pages, like "the page that shows -a lis of posts" is defined in the other templates. Specifically, this is defined in ``index.tmpl``: +a list of posts" is defined in the other templates. Specifically, this is defined in ``index.tmpl``: .. code-block:: mako @@ -211,12 +211,13 @@ box, add links for the posts tags, move the date there, etc. ## -*- 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:

${post.title(lang)}

-
+
${messages[lang]["Posted"]}: ${post.date.strftime(date_format)} @@ -230,10 +231,12 @@ box, add links for the posts tags, move the date there, etc.
${post.text(lang, index_teasers)} - ${helper.html_disqus_link(post)} + ${disqus.html_disqus_link(post.permalink()+"#disqus_thread", post.base_path)}
% endfor ${helper.html_pager()} + ${disqus.html_disqus_script()} + .. figure:: http://ralsina.com.ar/galleries/random/monospace-4.png :height: 400px @@ -246,11 +249,12 @@ Then if we click on the post title, we will see some broken details in the metad ## -*- coding: utf-8 -*- <%namespace name="helper" file="post_helper.tmpl"/> + <%namespace name="disqus" file="disqus_helper.tmpl"/> <%inherit file="base.tmpl"/> <%block name="content">
${helper.html_title()} -
+
${messages[lang]["Posted"]}: ${post.date.strftime(date_format)} [${messages[lang]["Source"]}] @@ -269,7 +273,7 @@ Then if we click on the post title, we will see some broken details in the metad
${post.text(lang)} ${helper.html_pager(post)} - ${helper.html_disqus(post)} + ${disqus.html_disqus(post.permalink(absolute=True), post.title(lang), post.base_path)}
-- cgit v1.2.3