of the website with pages is treated differently from the "blog" part with
articles and there are two additional configuration options :py:`BLOGURL` and
:py:`BLOGNAME` that control how various parts of the theme link to the blog and
-how blog pages are named in the :html:`<title>` element.
+how blog pages are named in the :html:`<title>` element. The :py:`BLOGURL` can
+be either absolute or relative to :py:`SITEURL`.
.. code:: py
SITEURL = ''
BLOGNAME = 'Your Brand Blog'
- BLOGURL = '/blog'
+ BLOGURL = 'blog/'
Theme color :html:`<meta>` tag used by `CSS themes`_ can be specified with
the :py:`THEME_COLOR` variable. If not set, no theme color :html:`<meta>` tag
{% endif %}
<meta property="og:title" content="{{ page.title }}" />
<meta name="twitter:title" content="{{ page.title }}" />
- <meta property="og:url" content="{% if page.url %}{{ page.url|format_siteurl }}{% else %}{{ SITEURL }}{% endif %}" />
- <meta name="twitter:url" content="{% if page.url %}{{ page.url|format_siteurl }}{% else %}{{ SITEURL }}{% endif %}" />
+ <meta property="og:url" content="{{ page.url|format_siteurl }}" />
+ <meta name="twitter:url" content="{{ page.url|format_siteurl }}" />
<meta property="og:description" content="{{ page.summary|striptags }}" />
<meta name="twitter:description" content="{{ page.summary|striptags }}" />
{% if page.cover %}
BLOGNAME = 'm.css example articles'
BLOGURL = 'examples/'
-STATIC_URL = '/{path}'
+STATIC_URL = '{path}'
PATH = 'content'
ARTICLE_PATHS = ['examples']
PAGE_URL = '/{slug}/'
PAGE_SAVE_AS = '{slug}/index.html'
-ARTICLE_URL = '/{category}/{slug}/'
+ARTICLE_URL = '{category}/{slug}/'
ARTICLE_SAVE_AS = '{category}/{slug}/index.html'
-AUTHOR_URL = '/author/{slug}/'
+AUTHOR_URL = 'author/{slug}/'
AUTHOR_SAVE_AS = 'author/{slug}/index.html'
-CATEGORY_URL = '/{slug}/'
+CATEGORY_URL = '{slug}/'
CATEGORY_SAVE_AS = '{slug}/index.html'
-TAG_URL = '/tag/{slug}/'
+TAG_URL = 'tag/{slug}/'
TAG_SAVE_AS = 'tag/{slug}/index.html'
AUTHORS_SAVE_AS = None # Not used
SLUGIFY_SOURCE = 'basename'
PATH_METADATA = '(?P<slug>.+).rst'
-
-# If https://github.com/getpelican/pelican/pull/2196 is not applied, all URLs
-# would have / prepended twice, so removing it from the settings.
-if True:
- STATIC_URL = '{path}'
- PAGE_URL = '{slug}/'
- ARTICLE_URL = '{category}/{slug}/'
- AUTHOR_URL = 'author/{slug}/'
- CATEGORY_URL = '{slug}/'
- TAG_URL = 'tag/{slug}/'