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

Adding another section similar to Blog section #1655

Open
clementwong opened this issue Oct 19, 2023 · 1 comment
Open

Adding another section similar to Blog section #1655

clementwong opened this issue Oct 19, 2023 · 1 comment
Labels
enhancement An enhancement.
Milestone

Comments

@clementwong
Copy link

clementwong commented Oct 19, 2023

I was wondering how to create another section similar to the "blog" section. For instance, I was thinking of creating a "blog" section and "daily thoughts" section.

The step I took so far:
1). in navigation.yml,

I added

  • title: "Daily thoughts"
    url: /daily-thoughts/

2). made a folder called "_daily-thoughts"

3). Made my markdown post "daily-thought_1.md" and save that file in "_daily-thoughts"

4). added daily-thought.html in _pages


layout: archive
permalink: /daily-thoughts/
title: "Daily Thoughts"
author_profile: true


{% include base_path %}
{% capture written_year %}'None'{% endcapture %}
{% for post in site.daily-thoughts %}
{% capture year %}{{ post.date | date: '%Y' }}{% endcapture %}
{% if year != written_year %}

{{ year }}

{% capture written_year %}{{ year }}{% endcapture %} {% endif %} {% include archive-single.html %} {% endfor %}

It seems that I am to get the section created with the title. But my content "daily-thought_1.md" saved in "_daily-thoughts", is not displayed at all. What am I doing wrong? Any guidance would be greatly appreciated.

@michael-swift
Copy link

did you all add your daily thoughts as a collection in the config? e.g.

collections:
  daily-thoughts:
    output: true
    permalink: /:collection/:name/

@rjzupkoii rjzupkoii added the question Issues that are just questions. label Feb 14, 2024
@rjzupkoii rjzupkoii added enhancement An enhancement. and removed question Issues that are just questions. labels Feb 15, 2024
@rjzupkoii rjzupkoii added this to the v0.9 milestone Feb 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An enhancement.
Projects
None yet
Development

No branches or pull requests

3 participants