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

show summary for articles in index.html #4

Closed
wants to merge 4 commits into from

Conversation

jgsogo
Copy link

@jgsogo jgsogo commented Jul 29, 2015

User can choose between showing just the summary for each article or the full content with config variable SUMMARY_MAX_LENGTH (see in docs)

@alexandrevicenzi
Copy link
Owner

This conflict with being able to choose what post will be summarised or not.

You can choose to show the entire content for most posts, but for just one you can show the summary. Removing this options all posts will be summarised or not.

@jgsogo
Copy link
Author

jgsogo commented Jul 30, 2015

Maybe I didn't understand what was the intention of

{% if summarise or article.metadata['summary'] or article.metadata['summarize'] %}

I didn't found any of those variable documented (metadata is, but not its content).


With this PR you are able to select which post to summarize:

pelicanconf.py

By default all content will be shown

# SUMMARY_MAX_LENGTH = 0  # Commented or value = 0: all content as summary

article-summarized.md

If you want to summarize an article you have to write the Summary.

Title: Summarized article
Summary: This is the summary

This article is being summarized at index.

article-not-summarized.md

Otherwise all content will be shown

Title: Not Summarized article

This article won't be summarized, so all this content will be shown in the index.

Isn't it intended to work this way?

@alexandrevicenzi
Copy link
Owner

I made this new metadata variable to be able to choose when an article is summarized.

If i set the conf in pelicanconf.py, all posts will be summarized. If I set Summary metadata, I'm able to specify just a single line.

I'm not sure what's the better option in this case, both are correct I think. This new metadata is only available for Flex theme, as og_locale metadata.

@jgsogo
Copy link
Author

jgsogo commented Sep 8, 2015

Hi! Sorry for dissapearing during such a long time...

I prefer to stick to official metadata, this way people can switch from one theme to another and will have the same behavior/structure/appearance, I think this is important. Specific metadata can be added to a particular theme for a very particular need but always squeezing the possibilities available.

@alexandrevicenzi
Copy link
Owner

Sure, this is a good point, I need to take a look. By now I'm too busy, but soon I'll made some changes 👍

@jgsogo
Copy link
Author

jgsogo commented Sep 28, 2015

Dedicated branch for this pull-request: #10 This should be the way from the beginning.

@jgsogo jgsogo closed this Sep 28, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants