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

WIP: render author pages #1972

Merged
merged 35 commits into from Aug 31, 2015
Merged

WIP: render author pages #1972

merged 35 commits into from Aug 31, 2015

Conversation

jjconti
Copy link
Contributor

@jjconti jjconti commented Aug 24, 2015

Based on tags.py

Requires this configs:

AUTHOR_PATH = 'author'
AUTHOR_PAGES_ARE_INDEXES = True

and this messages:

"Authors": "Autores",
"Posts by %s": "Posts de %s"

@Kwpolska Kwpolska added this to the v7.6.5 milestone Aug 24, 2015
@Kwpolska
Copy link
Member

Great idea!

  • style fixes needed: https://travis-ci.org/getnikola/nikola/jobs/76990366#L171
  • tests fail. Add your new settings to conf.py.in and nikola.py, and messages to messages_en.py (we need some more work to get it to Transifex, we will handle that)
  • Would you mind implementing the title/description customization parts from tags?

@da2x
Copy link
Contributor

da2x commented Aug 24, 2015

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).

@da2x da2x added the PR exists label Aug 24, 2015
@jjconti
Copy link
Contributor Author

jjconti commented Aug 24, 2015

@Aeyoun interesting ideas, but with what I've implemented so far my requirements and available time are covered.

@ralsina
Copy link
Member

ralsina commented Aug 24, 2015

@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"
Copy link
Member

Choose a reason for hiding this comment

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

AUTHOR_PATH*

@jjconti
Copy link
Contributor Author

jjconti commented Aug 24, 2015

For the docs:

You can link an author's page form you template adding this:

<a href="${_link('author', post.author())}">${post.author()}</a>

@jjconti
Copy link
Contributor Author

jjconti commented Aug 24, 2015

A working example of this at: http://lugcos.github.io/

@jjconti jjconti changed the title WIP: render authors pages WIP: render author pages Aug 24, 2015
@da2x
Copy link
Contributor

da2x commented Aug 24, 2015

Issues #1973, #1974, and #1975.

@@ -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>
Copy link
Member

Choose a reason for hiding this comment

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

what changed here and why?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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.

@da2x
Copy link
Contributor

da2x commented Aug 25, 2015

Line 34 in data/themes/base/templates/post_header.tmpl should link to the author’s page if it is being generated. The enclosing span element can be replaced with an a element retaining the span’s microformats and adding rel="author me".

@jjconti
Copy link
Contributor Author

jjconti commented Aug 31, 2015

I'll do it tonight when adding a final change. Thanks.

@jjconti
Copy link
Contributor Author

jjconti commented Aug 31, 2015

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.

@Kwpolska
Copy link
Member

  1. I’ll merge it. If you want commit rights, just ask.
  2. It can be generated with scripts/jinjify.py. I’ll handle that.

Thanks for your contribution!

Kwpolska added a commit that referenced this pull request Aug 31, 2015
@Kwpolska Kwpolska merged commit d3b0263 into getnikola:master Aug 31, 2015
@jjconti
Copy link
Contributor Author

jjconti commented Aug 31, 2015

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?

@Kwpolska
Copy link
Member

  1. So, do you want commit rights or not?
  2. CHANGES.txt, AUTHORS.txt and docs/manual.txt could use an update. Will you do it?

@jjconti
Copy link
Contributor Author

jjconti commented Aug 31, 2015

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.

jjconti added a commit that referenced this pull request Aug 31, 2015
@jjconti
Copy link
Contributor Author

jjconti commented Aug 31, 2015

Done.

Kwpolska added a commit that referenced this pull request Aug 31, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants