Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: getnikola/nikola
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 2dfe792d9344^
Choose a base ref
...
head repository: getnikola/nikola
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 9f0c410de56d
Choose a head ref
  • 4 commits
  • 48 files changed
  • 2 contributors

Commits on Sep 29, 2016

  1. change all instances of 'story' to 'page'

    This commit replaces all instances of 'story' or 'stories' with 'page' or 'pages'.
    
    The settings STORY_INDEX and COMMENTS_IN_STORIES are now PAGE_INDEX and COMMENTS_IN_PAGES
    
    see #1891
    christianp committed Sep 29, 2016
    Copy the full SHA
    2dfe792 View commit details

Commits on Oct 3, 2016

  1. Copy the full SHA
    dbbd09a View commit details
  2. Copy the full SHA
    b791b9d View commit details

Commits on Oct 8, 2016

  1. Fix Sphinx symlinks

    Signed-off-by: Chris Warrick <kwpolska@gmail.com>
    Kwpolska committed Oct 8, 2016
    Copy the full SHA
    9f0c410 View commit details
Showing with 5,587 additions and 561 deletions.
  1. +5 −5 docs/creating-a-site.txt
  2. +1 −1 docs/extending.txt
  3. +5 −5 docs/internals.txt
  4. +9 −9 docs/manual.txt
  5. +1 −1 docs/path_handlers.txt
  6. +2 −2 docs/theming.txt
  7. +5 −5 nikola/conf.py.in
  8. 0 nikola/data/samplesite/{stories → pages}/1.rst
  9. 0 nikola/data/samplesite/{stories → pages}/bootstrap-demo.rst
  10. 0 nikola/data/samplesite/{stories → pages}/charts.txt
  11. +827 −0 nikola/data/samplesite/pages/creating-a-theme.rst
  12. +468 −468 nikola/data/samplesite/{stories → pages}/dr-nikolas-vendetta.rst
  13. +683 −0 nikola/data/samplesite/pages/extending.txt
  14. +145 −0 nikola/data/samplesite/pages/internals.txt
  15. 0 nikola/data/samplesite/{stories → pages}/listings-demo.rst
  16. +2,586 −0 nikola/data/samplesite/pages/manual.rst
  17. +261 −0 nikola/data/samplesite/pages/path_handlers.txt
  18. 0 nikola/data/samplesite/{stories → pages}/quickref.rst
  19. 0 nikola/data/samplesite/{stories → pages}/quickstart.rst
  20. 0 nikola/data/samplesite/{stories → pages}/slides-demo.rst
  21. +202 −0 nikola/data/samplesite/pages/social_buttons.txt
  22. +329 −0 nikola/data/samplesite/pages/theming.rst
  23. +0 −1 nikola/data/samplesite/stories/creating-a-theme.rst
  24. +0 −1 nikola/data/samplesite/stories/extending.txt
  25. +0 −1 nikola/data/samplesite/stories/internals.txt
  26. +0 −1 nikola/data/samplesite/stories/manual.rst
  27. +0 −1 nikola/data/samplesite/stories/path_handlers.txt
  28. +0 −1 nikola/data/samplesite/stories/social_buttons.txt
  29. +0 −1 nikola/data/samplesite/stories/theming.rst
  30. +7 −7 nikola/data/symlinked.txt
  31. 0 nikola/data/themes/base-jinja/templates/{story.tmpl → page.tmpl}
  32. 0 nikola/data/themes/base/templates/{story.tmpl → page.tmpl}
  33. +7 −7 nikola/nikola.py
  34. +3 −3 nikola/plugin_categories.py
  35. +2 −2 nikola/plugins/command/import_wordpress.py
  36. +4 −4 nikola/plugins/command/init.py
  37. +1 −1 nikola/plugins/task/galleries.py
  38. +2 −2 nikola/plugins/task/indexes.py
  39. +1 −1 nikola/plugins/task/pages.py
  40. +1 −1 nikola/post.py
  41. +4 −4 nikola/utils.py
  42. +1 −1 scripts/baseline.sh
  43. +3 −3 scripts/release
  44. +6 −6 tests/data/translated_titles/conf.py
  45. 0 tests/data/translated_titles/{stories → pages}/1.pl.txt
  46. 0 tests/data/translated_titles/{stories → pages}/1.txt
  47. +3 −3 tests/test_command_import_wordpress.py
  48. +13 −13 tests/test_integration.py
10 changes: 5 additions & 5 deletions docs/creating-a-site.txt
Original file line number Diff line number Diff line change
@@ -51,9 +51,9 @@ configuration file:
POSTS = ()
# you can also keep the current content of POSTS if you want a blog with your site
PAGES = (
("stories/*.rst", "", "story.tmpl"),
("stories/*.txt", "", "story.tmpl"),
("stories/*.html", "", "story.tmpl"),
("pages/*.rst", "", "page.tmpl"),
("pages/*.txt", "", "page.tmpl"),
("pages/*.html", "", "page.tmpl"),
)

# And to avoid a conflict because blogs try to generate /index.html
@@ -70,7 +70,7 @@ And now we are ready to create our first page:

Title: index
Scanning posts....done!
[1970-01-01T00:00:00Z] INFO: new_page: Your page's text is at: stories/index.rst
[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:

@@ -104,7 +104,7 @@ So, what’s in that ``pages/index.txt`` file?

``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
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
2 changes: 1 addition & 1 deletion docs/extending.txt
Original file line number Diff line number Diff line change
@@ -470,7 +470,7 @@ from ``super()``. Example plugin: `navstories <https://github.com/getnikola/plu
PostScanner Plugins
-------------------

Get posts and stories from "somewhere" to be added to the timeline.
Get posts and pages from "somewhere" to be added to the timeline.
The only currently existing plugin of this kind reads them from disk.


10 changes: 5 additions & 5 deletions docs/internals.txt
Original file line number Diff line number Diff line change
@@ -88,14 +88,14 @@ one of the existing ones.
You can do doctests, you can do unit tests, you can do integration tests. There is support
for all of them.

Posts and Stories
-----------------
Posts and Pages
---------------

Nikola has a concept of posts and stories. Both are more or less the same thing, except
posts are added into RSS feeds and stories are not. All of them are in a list called
Nikola has a concept of posts and pages. Both are more or less the same thing, except
posts are added into RSS feeds and pages are not. All of them are in a list called
"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,
When you are creating a task that needs the list of posts and/or pages (for example,
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.
18 changes: 9 additions & 9 deletions docs/manual.txt
Original file line number Diff line number Diff line change
@@ -394,7 +394,7 @@ template

.. code:: restructuredtext

.. template: story.tmpl
.. template: page.tmpl

To add these metadata fields to all new posts by default, you can set the
variable ``ADDITIONAL_METADATA`` in your configuration. For example, you can
@@ -508,15 +508,15 @@ options. The exact mechanism is explained above the config options in the
("posts/*.html", "posts", "post.tmpl"),
)
PAGES = (
("stories/*.rst", "stories", "story.tmpl"),
("stories/*.txt", "stories", "story.tmpl"),
("stories/*.html", "stories", "story.tmpl"),
("pages/*.rst", "pages", "page.tmpl"),
("pages/*.txt", "pages", "page.tmpl"),
("pages/*.html", "pages", "page.tmpl"),
)

.. note:: POSTS and PAGES are not flat!

Even if the syntax may suggest you can't, you can create any directory structure you want
inside ``posts/`` or ``stories/`` and it will be reflected in the output. For example,
inside ``posts/`` or ``pages/`` and it will be reflected in the output. For example,
``posts/foo/bar.txt`` would produce ``output/posts/foo/bar.html``, assuming the slug is also ``bar``.

If you have ``PRETTY_URLS`` enabled, that would be ``output/posts/foo/bar/index.html``.
@@ -815,17 +815,17 @@ There are multiple configuration variables dedicated to each of the three taxono
* ``HIDDEN_TAGS``. ``HIDDEN_CATEGORIES`` to make some tags/categories invisible in lists
* ``POSTS_SECTION_FROM_META`` to use ``.. section:`` in posts instead of inferring paths from paths

Creating a Page (Story)
Creating a Page
-----------------------

Pages are the same as posts, except that:

* They are not added to the front page
* They don't appear on the RSS feed
* They use the ``story.tmpl`` template instead of ``post.tmpl`` by default
* They use the ``page.tmpl`` template instead of ``post.tmpl`` by default

The default configuration expects the page's metadata and text files to be on the
``stories`` folder, but that can be changed (see ``PAGES`` option above).
``pages`` folder, but that can be changed (see ``PAGES`` option above).

You can create the page's files manually or use the ``new_post`` command
with the ``-p`` option, which will place the files in the folder that
@@ -2342,7 +2342,7 @@ 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
We recommend using pages with dates in the past (1970-01-01) to avoid
dependency issues.

If you are using this as a shortcode, flags (``reverse``, ``all``) are meant to be used
2 changes: 1 addition & 1 deletion docs/path_handlers.txt
Original file line number Diff line number Diff line change
@@ -88,7 +88,7 @@ category_rss


filename
Link to post or story by source filename.
Link to post or page by source filename.

Example:

4 changes: 2 additions & 2 deletions docs/theming.txt
Original file line number Diff line number Diff line change
@@ -178,7 +178,7 @@ These are the templates that come with the included themes:
``post_list_directive.tmpl``
Template used by the ``post_list`` reStructuredText directive.

``story.tmpl``
``page.tmpl``
Used for pages that are not part of a blog, usually a cleaner, less
intrusive layout than ``post.tmpl``, but same parameters.

@@ -287,7 +287,7 @@ List of page kinds provided by default plugins:
* list, tag_page
* list, tags_page
* post_page
* story_page
* page_page
* listing
* generic_page
* gallery_front
10 changes: 5 additions & 5 deletions nikola/conf.py.in
Original file line number Diff line number Diff line change
@@ -820,13 +820,13 @@ COMMENT_SYSTEM_ID = ${COMMENT_SYSTEM_ID}
# the "noannotations" metadata.
# ANNOTATIONS = False

# Create index.html for page (story) folders?
# Create index.html for page folders?
# WARNING: if a page would conflict with the index file (usually
# caused by setting slug to `index`), the STORY_INDEX
# caused by setting slug to `index`), the PAGE_INDEX
# will not be generated for that directory.
# STORY_INDEX = False
# Enable comments on story pages?
# COMMENTS_IN_STORIES = False
# PAGE_INDEX = False
# Enable comments on page pages?
# COMMENTS_IN_PAGES = False
# Enable comments on picture gallery pages?
# COMMENTS_IN_GALLERIES = False

File renamed without changes.
File renamed without changes.
Loading