Skip to content
Permalink
Browse files

baby steps

  • Loading branch information
ralsina committed May 8, 2015
1 parent bc60ed9 commit 94ed9f7e1495a8eab6b587404b4b2039ff7d24ac
Showing with 5 additions and 8 deletions.
  1. +5 −8 docs/internals.txt
@@ -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 have a dependency
on the ``scan_posts`` task 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?).

0 comments on commit 94ed9f7

Please sign in to comment.