Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change all instances of 'story' to 'page' #2518

Merged
merged 12 commits into from
Oct 9, 2016
Merged
10 changes: 5 additions & 5 deletions docs/creating-a-site.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:

Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/extending.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.


Expand Down
8 changes: 4 additions & 4 deletions docs/internals.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
-----------------
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Underline needs to match new title length.


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.
Expand Down
22 changes: 9 additions & 13 deletions docs/manual.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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``.
Expand Down Expand Up @@ -815,26 +815,22 @@ 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
has ``use_in_feed`` set to False.

In some places (including default directories and templates), pages are called
*stories* for historic reasons. Both are synonyms for the same thing: pages
that are not blog posts.

Supported input formats
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’d prefer this explainer to be left in.

-----------------------

Expand Down Expand Up @@ -2342,7 +2338,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
Expand Down
2 changes: 1 addition & 1 deletion docs/path_handlers.txt
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ category_rss


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

Example:

Expand Down
186 changes: 185 additions & 1 deletion docs/sphinx/creating-a-site.txt
Loading