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

Allow About Me to be written in rST or Markdown #85

Closed
tshepang opened this issue Nov 30, 2013 · 16 comments

Comments

@tshepang
Copy link

commented Nov 30, 2013

Curremtly, LANDING_PAGE_ABOUT is used for that, which is not ideal, especially since it needs (I think) to be written in raw html. Perhaps a solution where this file is read off some file somewhere?

(encouraged by #77 (comment) to request a feature before 2.0 gets released)

@talha131

This comment has been minimized.

Copy link
Member

commented Nov 30, 2013

That would be great. How can this be done? Jinja discourages and doesn't let you put logic into template. There is no straight forward way to do it in Elegant theme.

Possible solutions are to create a Pelican Plugin or change Pelican code base.

@calfzhou

This comment has been minimized.

Copy link
Contributor

commented Nov 30, 2013

If user has a page with slug about or about-me, it might be very easy to include the page content in index template.

@talha131

This comment has been minimized.

Copy link
Member

commented Nov 30, 2013

Hmm, so Elegant will have to iterate over the pages and find the one that
has about-me slug and then put its content into "About me" section. Cool
idea, seems workable.

What if user wants to use this slug but don't want it to be put in
Elegant's section?

@tshepang

This comment has been minimized.

Copy link
Author

commented Nov 30, 2013

She can make use of LANDING_PAGE_ABOUT, maybe set it to False or None.

@talha131

This comment has been minimized.

Copy link
Member

commented Nov 30, 2013

This will not stop Pelican from generating "About Me" page. It will also be
present in Pages variable so "about-me" will have to be skipped where ever
Pages is used.

What if we miss skipping some where? How will this filtering affect
performance?

IMHO, a cleaner way is to have a About Me plugin. It can call Pelican
classes and methods to convert the markup into html.

@codecachet

This comment has been minimized.

Copy link

commented Feb 4, 2019

Shouldn't there be a way in Pelican to create any particular section of text (like the About Me) from markdown? What if I wanted, say, a Message of the Day to appear in the right column of each page? How would I go about putting this md content in its own file, and have it treated as a "section", rather than a page?

@codecachet

This comment has been minimized.

Copy link

commented Feb 4, 2019

Figured out an easy way to do this. Put "About Me" markdown in a page, but make it status: hidden. Then in the index.html template (class="article-content"), just look in the list hidden_pages for the page which has the correct title, and insert the page.content.

@talha131

This comment has been minimized.

Copy link
Member

commented Feb 10, 2019

@codecachet very cool. Love it. Let me know if you can open a PR.

@talha131 talha131 added this to the Elegant 2.2 milestone Feb 10, 2019
@talha131 talha131 modified the milestones: Elegant 2.2, Elegant 2.3, 2019 - Q3 Jun 10, 2019
@talha131

This comment has been minimized.

Copy link
Member

commented Jun 25, 2019

@iranzo can you find time to implement what @codecachet has suggested?

This is in Q3 milestone, it's not as urgent as tasks in Q2 milestone.

@iranzo iranzo self-assigned this Jun 25, 2019
@iranzo

This comment has been minimized.

Copy link
Member

commented Jun 26, 2019

I was having a look at this yesterday night, I need to find how to loop in jinja for this and then extract the data and make the relevant code changes

@iranzo

This comment has been minimized.

Copy link
Member

commented Jun 27, 2019

Talha, do you have a pointer on how to perform the loop against the filter for articles? Not familiar enough with pelican templates for writing the loop for this :-/

@talha131

This comment has been minimized.

Copy link
Member

commented Jun 27, 2019

Can you try

{% for article in articles %}
{% if article.status == blah and article.title == "Landing Page About Me" %}

I think we need a specific title for the article we are going to use for about me.

@talha131

This comment has been minimized.

Copy link
Member

commented Jun 30, 2019

@tshepang and @calfzhou, it took five years 😆 but the feature is finally here. Currently in beta.

https://next.elegant.oncrashreboot.com/customize-home-page

(You may have to add ssl error exception to visit the page. Netlify SSL has some issue.)

It gives me immense pleasure to close a five year old feature request.

@talha131

This comment has been minimized.

Copy link
Member

commented Jun 30, 2019

@all-contributors please add @codecachet for ideas

@allcontributors

This comment has been minimized.

Copy link
Contributor

commented Jun 30, 2019

@talha131

I've put up a pull request to add @codecachet! 🎉

@talha131 talha131 closed this in 9b5b2ec Jul 3, 2019
talha131 pushed a commit that referenced this issue Jul 3, 2019
# [3.0.0](V2.5.0...V3.0.0) (2019-07-03)

### Bug Fixes

* **admonition:** links should inherit the admonition color ([60c9184](60c9184))
* **freelists:** use SUBSCRIBE_BUTTON_TITLE instead of generic GO ([c346d1f](c346d1f))
* **home:** remove redundant title ([808cd1d](808cd1d))

### Features

* **home:** write about me in markdown, reST or asciidoc ([9b5b2ec](9b5b2ec)), closes [#85](#85)
* **menu:** set home URL to root if SITEURL is not ([23e0b94](23e0b94))

### BREAKING CHANGES

* **home:** Previously LANDING_PAGE_ABOUT was a dictionary that contained html tags. We used it
to create landing page. But users have demanded from the very beginning to be able to write the
landing page in markdown. This patch adds this feature. But in order to use it, you have to update
your configuration.
@talha131

This comment has been minimized.

Copy link
Member

commented Jul 3, 2019

🎉 This issue has been resolved in version 3.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@talha131 talha131 added the released label Jul 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
5 participants
You can’t perform that action at this time.