1
0
Fork 0
forked from github/pelican
Commit graph

80 commits

Author SHA1 Message Date
Paolo Melchiorre
6059675d55
Fix #3233 -- Simple theme classless semantic HTML 2023-11-11 14:10:08 +01:00
Chris Rose
271f4dd68f Strip trailing whitespace 2023-10-29 22:19:44 +01:00
Will Thong
8a7e01646b
Add rel='nofollow' to all external hardcoded links in templates (#3162) 2023-10-28 22:11:44 +02:00
Gullumluvl
dc427ad9d6
Strip HTML tags from SITENAME inside title tags. Fixes #3147 (#3149) 2023-10-28 14:24:16 +02:00
Justin Mayer
639173da6b Generalize analytics support in default theme
As the number of privacy-preserving analytics options proliferates,
it no longer makes sense to support specific solutions provided by
ad-tracking corporations.
2023-08-03 14:10:37 +02:00
Pierre Equoy
16b8a03ad9 Remove unnecessary ids and classes in simple theme
All of the modified HTML tags can be accessed in CSS without the need
for a dedicated id or an additional class.
2022-02-20 10:29:46 +08:00
Pierre Equoy
4794752dd9 Add a viewport meta tag in simple theme for better mobile support
See MDN article about this:

https://developer.mozilla.org/en-US/docs/Web/HTML/Viewport_meta_tag
2022-01-17 16:22:02 +08:00
Pierre Equoy
7b9a859e5e Use <main> and <article> tags in simple theme
Add a <main> tag to surround all the content blocks, so that it's easier
to target the main part of a page (be it an article, the list of posts
or the different categories) using CSS.

Because of this, the <section> part of the article.html template is made
redundant, so it is removed.

Finally, the generic <div> is replaced by an <article> tag to surround
the article's content.
2022-01-17 16:21:59 +08:00
Pierre Equoy
fe4f1ec4ea Uniformize headers in simple theme
In the simple theme, some templates are using `h1`, others are using
`h2` for the main title of the page (other than the one in the header).
This commit changes that so all of the pages are using `h1`.
2022-01-17 16:21:44 +08:00
Joachim Lusiardi
82ff563f6f
Expose first and last page of pagination (#2618) 2020-04-30 19:05:48 +02:00
Justin Mayer
c8bf3ec5a4 Add HTML meta generator tag to theme base templates 2020-04-14 17:47:07 +02:00
Justin Mayer
212742a56f Ensure consistent title spacing in themes
Moving the space between the title and sub-title inside the "if"
statement eliminates a spurious trailing space when there is no
sub-title defined.
2020-04-12 17:02:06 +02:00
Kurt McKee
7bbd3dc6fb
Update links to HTTPS and current 301 redirects in docs/templates/themes (#2661)
This also updates the Tumblr API to use HTTPS as documented in the
current Tumblr API docs.
2020-04-12 16:38:35 +02:00
kaliko
0806df6068 Fixed simple theme, add missing striptags filter
page.title are missing striptags in title block
2019-10-25 09:20:14 +02:00
Bryan Brattlof
0153f55016
Update 'simple' theme to use new Atom/RSS settings 2019-01-15 10:59:40 -06:00
Justin Mayer
a00bd6ec8b
Merge pull request #2374 from jorgesumle/hreflang
Add hreflang attribute to default themes
2018-11-12 08:15:08 +01:00
Gordon Reeder
a247354db8
Updated base.html to fix issue #2404. 2018-10-28 20:08:41 -07:00
Justin Mayer
9ac35ed47a
Merge pull request #2376 from strburst/simple_theme_categories_title
Tweaks to simple theme on listing pages
2018-07-06 21:45:14 +02:00
Allen Zheng
a3d76a0fd8 Remove bad whitespace stripping in simple theme
This joins the contents of the block to the previous line, which messes
up the output formatting in this case.

Old vs new output:
- <ul>        <li>...
+ <ul>
+     <li>...

This change is already in the 'notmyidea' theme.
2018-07-06 09:13:39 -04:00
Allen Zheng
bf16faf1e2 Add missing ul tag in tags list in simple theme
There are some li elements generated without a ul/ol around them.
Besides being malformed html, this results in there being no margin that
lists normally have.
2018-07-06 09:13:39 -04:00
Allen Zheng
10f70db9a6 Add h1 to the categories list in simple/notmyidea
The authors.html and tags.html templates both have this. Add it here as
well for consistency.

This also affects the notmyidea theme because it inherits the categories
template from simple.

While we're here, also make indentation consistent with other files (4
spaces within a block).
2018-07-06 09:13:39 -04:00
Allen Zheng
6ec5a984ad Show article category/tags even if no authors
Before this commit, the behavior of the simple theme is to hide the
category and tags if there is no author defined, even if the
category/tags are present. This appears to be unintentional, due to a
misplaced `endif`.

Fix this by moving the endif to the right place, so that the other if
blocks aren't nested.
2018-07-05 15:34:49 -04:00
Jorge Maldonado Ventura
d1d1cccdad Add hreflang attribute to default themes 2018-07-05 00:50:18 +02:00
Jorge Maldonado Ventura
71af410285 Support translation of lang attribute in default themes 2018-07-02 23:42:03 +02:00
Alexandre Bonnetain
80027bc714 Clean simple theme 2018-06-19 19:07:20 +00:00
Vladimír Vondruš
e5110edcca Use FEED_*_URL settings in the builtin themes. 2017-10-29 21:35:23 +01:00
Lukas Prokop
2170ca4cd5 Use <time> instead of <abbr>.
The pubdate given is in no way an abbreviation. Hence the semantics of
<abbr> do not justify its usage in this context.

<time> was introduced in HTML5. It's datetime attribute can override the
textContent. Anyway it specifies a date+time of a given event.

http://www.w3.org/TR/html5/text-level-semantics.html#the-time-element

Originally the pubdate attribute was meant to annotate that the
publication date of the closest section unit is specified, but this was
dropped and is not part of the official specification.

https://www.w3.org/wiki/HTML/Elements/time
2015-11-05 22:28:46 +01:00
derwinlu
b0d41f081b remove article.keywords from simple theme
We don't process 'keywords' metadata specially, so it never gets
processed into a list.

This prevents issues like #1733.
2015-09-05 10:53:44 +02:00
jah
ed34ee1808 Correct render of article description meta
in the simple theme: the template incorrectly assumed that the source
metadata is made available as a list of strings. Fixes #1792.
2015-08-11 20:03:43 +01:00
derwinlu
ec5c77b251 remove PAGES; use pages instead
* remove PAGES from context as pages is available
* add section to FAQ to provide guidance
2015-06-27 19:11:55 +02:00
Elana Hashman
21544a404c Update simple theme to fix #1068 2015-06-21 13:35:41 -06:00
Justin Mayer
940eb76b7f Load external resources via HTTPS when available
This replaces all `http://` and `//:` links with `https:`. The protocol-
relative URL scheme is now deemed to be an anti-pattern. There are
security advantages to using HTTPS, and there are no significant
performance concerns.

In short, if the asset we need is available via HTTPS, then that asset
should always be loaded via HTTPS.

Fixes #1736
2015-06-02 08:35:12 -07:00
Alberto Scotto
0f7938ccb7 fix the meta tags added in #1028
The attribute 'contents' should be 'content'.
See http://www.w3schools.com/tags/att_meta_content.asp
2015-04-08 03:32:48 +02:00
Sven Kreiss
8cf89bd623 add <ul> to make valid html 2014-09-05 22:34:29 -04:00
Anatoly Bubenkov
2c25e488c4 multiple authors implemented 2014-02-14 03:21:06 +01:00
fenekku
f6e27617f8 Add period to period_archives context. Refs #1044.
* Adds period tuple of (year, month, day) matching the time
  period of the current archive. Note that this is done
  to the archive context if period_archives.html doesn't exist.
* Adds tests to verify this.
* Adds documentation in themes.rst about period in period_archives.html.
2014-02-03 20:26:38 -05:00
Hilmar Lapp
5eb9fa6d16 Append slash to href of link to site home
This is necessary to make the link to the site home work locally, because then SITEURL may be set to an empty string (in fact the Pelican default configuration sets it to an empty string in pelicanconf.py).
2014-01-13 12:37:15 -05:00
Florian Jacob
bd9d1b9539 The modified attribute no longer has a default value.
This allows for templates using {% if article.modified %}
instead of {% if article.modified != article.published %} .
2013-11-17 23:40:11 +01:00
Florian Jacob
4b2fcb09a4 Added a new ''modified:' metadata tag to be able to specify the
publication time and date and the last modified time and date
independently.

This makes it possible to access the last updated date with {{ article.locale_modified }} in templates.
Additionally, an already delivered feed entry can be corrected by changing the modified date and time, as it is used for atom:update
/ rss pubDate field now.
2013-11-10 00:14:55 +01:00
Torrance
6dafe69ac6 Ensure headers from base.html are included. 2013-10-10 14:29:42 +13:00
Alexis Métaireau
6813cd923f Close some HTML tags. Fix #1076 2013-09-08 17:07:30 +02:00
Alexis Metaireau
651e59fce1 Merge pull request #1057 from astephen2/metadata
Added metadata information. Refs #1028
2013-08-25 09:31:22 -07:00
Alex Stephen
8d41d6ba24 Refs #1028. Now iterating over tags 2013-08-24 23:36:07 -04:00
Alex Stephen
2826c1a558 Added metadata information. Refs #1028 2013-08-21 22:58:50 -04:00
Danilo Bargen
42f9726ffa Support TAGS_* and AUTHORS_* by default. 2013-08-05 19:16:00 +02:00
Ross McFarland
c5eecd23eb PAGINATION_URL/PAGINATION_SAVE_AS implementation
allows the use of custom urls for pagination similar to *_URLS
2013-07-29 08:09:44 -04:00
David Beitey
e042e11c23 Add new option for controlling whether to display categories on menu or not
Conflicts:
	docs/changelog.rst
	pelican/tests/output/basic/tag/bar.html
	pelican/tests/output/basic/tag/baz.html
	pelican/tests/output/basic/tag/foo.html
	pelican/tests/output/custom/tag/bar.html
	pelican/tests/output/custom/tag/baz.html
	pelican/tests/output/custom/tag/foo.html
2013-04-01 22:08:13 +10:00
Chris Elston
173e17d992 Simple theme article permalink missing SITEURL
This change modifies the simple template so that the SITEURL
prefix is added to the article permalink found within the article
page itself.
2013-03-21 11:28:06 +00:00
tehkonst
ab035795bc fix slug for feed urls
Conflicts:

	pelican/contents.py
2013-03-10 23:41:02 -07:00
Justin Mayer
a0049f9fcd Strip tags from title in simple index. Fixes #612
This fix was applied previously to the relevant places in both the
"simple" and "notmyidea" themes, but the simple theme's index.html file
was apparently neglected.
2012-12-02 16:10:11 -08:00