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

Feature request: _posts #317

Closed
axet opened this issue May 6, 2020 · 5 comments
Closed

Feature request: _posts #317

axet opened this issue May 6, 2020 · 5 comments

Comments

@axet
Copy link

axet commented May 6, 2020

Hello! Thanks for amazing jekylle theme, it is nice and simple. Jekyll supports for two main navigation methods: direct and date related. Your theme only covers one of it (direct).

Can you please add support for '_posts' keeping your theme nice and simple as before? It can be implemented similar to how 'has_children/parent' works with date url prefix in url and title.

@fogfish
Copy link
Contributor

fogfish commented Jul 28, 2020

I would keep _post as a side feature for theme. It makes a possibility to mix a documentation and knowledge articles on the same site. For example index.md of my personal site looks like (see the snippet). As the result, I do have a side bar as a doc navigation with dedicated section for Blog/Articles posts.

---
layout: default
title: Highlights about technologies
permalink: /
search_exclude: true
---

# Highlights about technologies 

<ul class="posts">
   {% for post in site.posts %}
      <li><span>{{ post.date | date_to_string }}</span> &raquo; <a href="{{ post.url }}">{{ post.title }}</a></li>
   {% endfor %}
</ul>

@pdmosses
Copy link
Contributor

pdmosses commented Aug 3, 2020

@axet, as @fogfish commented, this theme already allows the use of posts: if one adds a file to the _posts directory with the date in the file name, Jekyll processes it as usual, and outputs the rendered page to the site.

The post layout of the theme is currently empty, so post pages do not display any meta-data (title, date, author, categories, etc.). However, a website maintainer can easily update the post layout to display the desired meta-data in the body of the page, including links to next and previous posts (see #298 for a simple example).

By support for "date related" navigation for posts, do you mean automatic generation of a hierarchy with years at the top level, expanding to months, then days, and finally lists of links to individual posts – perhaps also grouped by a tree of categories? If you have a specific design in mind (perhaps based on support for post navigation in other themes) please follow up with a detailed explanation, possibly together with a pull request.

PR #379 aims to integrate collections into the theme navigation, and might provide a good basis for post navigation; see also query #356.

@creio
Copy link

creio commented Dec 7, 2020

Enable search _posts?

@j-rahman
Copy link

If you have a really long list of blog posts, how would you truncate the above list with a button that reads "Older Posts" or "Next Page" to get to further items in the long list?

@mattxwang
Copy link
Member

Going to close this as inactive / duplicate for now (we have other PRs addressing including _posts in search, etc.). Feel free to re-open if you have a clearer ask!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants