WIP: render author pages #1972
WIP: render author pages #1972
Conversation
Great idea!
|
Enhancement idea: Most CMS include short author bios and portrait images on these kind of pages. Maybe duplicate whats available in TAG_PAGES_DESCRIPTIONS as AUTHOR_PAGES_BIOS with the same format? and then the same for AUTHOR_PORTRAITS, I believe would work well. “Guest authors” usually want a link back to their homepage from these kind of pages too … AUTHOR_HOMEPAGES? Or just make AUTHOR_PAGES_BIOS accept HTML blobs (TAG_PAGE_DESCRIPTIONS are just one paragraph of text). |
@Aeyoun interesting ideas, but with what I've implemented so far my requirements and available time are covered. |
@Aeyoun can you file those as a enhancement issue with a checklist? Once this is polished and merged we can tackle that as needed. |
# output / TRANSLATION[lang] / AUTHOR_PATH / index.html (list of tags) | ||
# output / TRANSLATION[lang] / AUTHOR_PATH / author.html (list of posts for a tag) | ||
# output / TRANSLATION[lang] / AUTHOR_PATH / author.xml (RSS feed for a tag) | ||
# TAG_PATH = "authors" |
Kwpolska
Aug 24, 2015
Member
AUTHOR_PATH*
AUTHOR_PATH*
@@ -36,4 +36,6 @@ | |||
"Write your post here.": "Write your post here.", | |||
"old posts, page %d": "old posts, page %d", | |||
"page %d": "page %d", | |||
"Authors": "Authors", | |||
"Posts by %s": "Posts by %s" |
Kwpolska
Aug 24, 2015
Member
(we’ll need to copy that over to the .po file)
(we’ll need to copy that over to the .po file)
For the docs: You can link an author's page form you template adding this:
|
A working example of this at: http://lugcos.github.io/ |
@@ -43,7 +43,8 @@ | |||
%if posts: | |||
<ul class="postlist"> | |||
% for post in posts: | |||
<li><a href="${post.permalink()}" class="listtitle">${post.title()|h}</a> <time class="listdate" datetime="${post.formatted_date('webiso')}" title="${post.formatted_date(date_format)}">${post.formatted_date(date_format)}</time></li> | |||
<li> |
Kwpolska
Aug 25, 2015
Member
what changed here and why?
what changed here and why?
jjconti
Aug 25, 2015
Author
Contributor
I improved the item visualization in the base tamplate. It was show as:
Title Date --- (dash)
The dash is added by the date style. I changed it to be
Date --- Title
as in other templates I saw. I used the same pattern in author.tmpl. Maybe there is an extra new line.
I improved the item visualization in the base tamplate. It was show as:
Title Date --- (dash)
The dash is added by the date style. I changed it to be
Date --- Title
as in other templates I saw. I used the same pattern in author.tmpl. Maybe there is an extra new line.
<a href="${_link(kind + "_rss", author, language)}" hreflang="${language}" type="application/rss+xml">${messages('RSS feed', language)} (${language})</a> | ||
</p> | ||
%endfor | ||
%elif generate_rss: |
da2x
Aug 25, 2015
Contributor
Should be an generate_atom variant too here.
Should be an generate_atom variant too here.
jjconti
Aug 29, 2015
Author
Contributor
I didn't add it because tag.tmpl does not (no atom reference). tagindex.tmpl does and authorindex.tmpl does too.
I didn't add it because tag.tmpl does not (no atom reference). tagindex.tmpl does and authorindex.tmpl does too.
Line 34 in |
I'll do it tonight when adding a final change. Thanks. |
Conflicts: nikola/data/themes/base/messages/messages_en.py
…s more than one author
I'm done. This can be merged (do I do it? am I getting commit access or something like that?). NOTE: author*tmpl files are missing for base-jinja theme. I can add them after this is merged. |
Thanks for your contribution! |
You're welcome. Thanks for the software. I'll continue using it so I'll probably be doing more contributions. Do we need to update CHANGELOG? Something in doc/? AUTHORS.txt? |
|
Ok! I'll do it! :D I wasn't sure because of what Uncle Ben said[1] but, let's do it! [1]Uncle Ben: Remember, with great power. comes great responsibility. |
Done. |
Based on tags.py
Requires this configs:
and this messages: