Minor fixes to Custom Article URLs plugin README

This commit is contained in:
Justin Mayer
2014-02-02 18:02:56 -08:00
parent 84b1962afc
commit aa268e4883

View File

@@ -1,17 +1,17 @@
#Custom Article URLs# #Custom Article URLs#
Adds support for defining different default urls for different categories, or This plugin adds support for defining different default URLs for different
different subcategories if using the subcategory plugin. categories, or different subcategories if using the subcategory plugin.
##Usage## ##Usage##
After adding `custom_article_urls` to your `PLUGINS` add a `CUSTOM_ARTICLE_URLS` After adding `custom_article_urls` to your `PLUGINS`, add a
setting, which is a dictionary of rules. The rules are also a dictionary, `CUSTOM_ARTICLE_URLS` setting, which is a dictionary of rules. The rules are
consisting of the `URL` and the `SAVE_AS` values. also a dictionary, consisting of the `URL` and the `SAVE_AS` values.
For example, if you had two categories, Category 1 and Category 2 and you For example, if you had two categories, *Category 1* and *Category 2*, and you
would like Category 1 saved as category-1/article-slug/ and Category 2 saved as would like *Category 1* saved as `category-1/article-slug/` and *Category 2*
/year/month/article-slug/ you would add: saved as `/year/month/article-slug/`, you would add:
CUSTOM_ARTICLE_URLS = { CUSTOM_ARTICLE_URLS = {
'Category 1': {'URL': '{category}/{slug}/, 'Category 1': {'URL': '{category}/{slug}/,
@@ -20,17 +20,17 @@ would like Category 1 saved as category-1/article-slug/ and Category 2 saved as
'SAVE_AS': '{date:%Y}/{date:%B}/{slug}/index.html}, 'SAVE_AS': '{date:%Y}/{date:%B}/{slug}/index.html},
} }
If had any other categories they would use the default `ARTICLE_SAVE_AS` If you had any other categories, they would use the default `ARTICLE_SAVE_AS`
and `ARTICLE_URL` and `ARTICLE_URL` settings.
If you are using the subcategory plugin, you can define them the same way. If you are using the subcategory plugin, you can define them the same way.
For example if Category 1 had a subcategory Sub Category you could define For example, if *Category 1* had a subcategory called *Sub Category*, you could
it's rules with define its rules with::
'Category 1/Sub Category`: ... 'Category 1/Sub Category`: ...
##Other Usage: Article Metadata## ##Other Usage: Article Metadata##
If you define a url and save_as in your articles metadata, then this plugin If you define `URL` and `Save_as` in your article metadata, then this plugin
will not alter that value. So you can still specify special one off urls as will not alter that value. So you can still specify special one-off URLs as
normal. you normally would.