Skip to content
This repository was archived by the owner on Aug 14, 2024. It is now read-only.

QUESTION: Any Ideas for Pages / Navigation? #2

Open
ghost opened this issue Jul 3, 2018 · 4 comments
Open

QUESTION: Any Ideas for Pages / Navigation? #2

ghost opened this issue Jul 3, 2018 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@ghost
Copy link

ghost commented Jul 3, 2018

Hello: thank you so much for releasing this tool. It is quite efficient and great for getting a quick blog started.

I'm reading the code and contemplating adding an navigation generator for multiple pages. Would like to know if there is any development code already in place or considered for such a feature.

PS thank you for attending to the small typo bug issue I submitted. Very cool of you. 👍 💯 👍

@Zedelghem
Copy link
Owner

Hi again, Alex!

I am sorry for a late answer, I am still surprised with a project getting any interest at all. ;)

I did not think of pagination but it's a cool feature and simple enough to be included without causing too much clutter. I did not write anything yet but if I were to start there are two things to consider:

  1. Excerpts. Pagination is usually of interest to people who wish to display content of posts on the front page. It would make sense to include excerpts alongside pages.
  2. Config file. Things are getting pretty detailed and it might be easier to manage different options in a separate file in a human-friendly format.

I would love to implement both. Especially a config file would be helpful as an easy way of introducing new features. I will take a quick look at an issue within the next few days.

Thanks for the initiative!

@Zedelghem
Copy link
Owner

Okay,

so I added a configuration file and the parse_config function that converts the file into a list of parameters for the build_website function. It will be easier to manage extensions now.

I am going to keep pagination in mind this week and we'll see what comes out of it.

As to navigation, what exactly do you mean by that?

@Zedelghem Zedelghem self-assigned this Jul 24, 2018
@Zedelghem Zedelghem added the enhancement New feature or request label Jul 24, 2018
@Zedelghem Zedelghem modified the milestones: f, Configuration file added Jul 24, 2018
@ghost
Copy link
Author

ghost commented Jul 24, 2018 via email

@Zedelghem
Copy link
Owner

Zedelghem commented Aug 18, 2018

Hi, getting back after a while. Thank you for the pull requests and comments!

As to navigation, if you mean a simple static menu, like for an "About me" page for example, all you need is a div in the template. No extra python required.

If you wish something generated on the fly, we need to talk about it in more details. I was thinking about some sort of a filtering system for a multilingual blog, that would include a language statement in the post file. We can make it more complicated, sort of an arbitrary tagging system with groups of posts collected in a file(s) or simply adding a class to a post div. Is that what you have in mind?

Also, I was thinking about more date-sorting options. But I'd rather leave it for a template to define. So perhaps a year and month class in the div would be enough as well?

About pagination, I think it makes sense only with excerpts. Thus I started with the latter.

PS: I added a quick tags solution as an option in the header.

tags: tag1 tag2 tag3 etc.

Tags are automatically added as classes to the <li> object representing the post on the main page as well as to the <div> representing the content of the post on the post page.

Now you can easily filter contents on a page with CSS and JS, like with a bilingual blog.

More is coming!

PS2: I added automatic excerpts. Take a look at the config file. I'll add manual excerpts to the header next and, finally, pagination on the front page. EDIT: BTW, I added a <h1> with the post title before the post content on the post page. I think isolated metadata is better design.

PS3: Manual excerpts added. They have priority over the automatic ones. The rest will need to wait a bit, it's already 4 AM around here. ;)

PS4: Okay, I added two types of pagination with automatically generated navigation bars for both. I will update the readme file in the evening. The configuration file is explicit enough to get it working though. Now I will focus on a template, that's the face of the project!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant