Skip to content
This repository has been archived by the owner on Jun 10, 2023. It is now read-only.

[Help Wanted] How can I adjust the archive page so that it does not contain microblog entries? #330

Open
ike-keith opened this issue Mar 29, 2023 · 2 comments

Comments

@ike-keith
Copy link

I really like this theme, thanks to the original author and all the contributors.

I added microblogs folder under content folder to contain short untitled blog posts like tweets.

content/
├── archive.md
├── microblogs
│   ├── microblog-1.md
│   ├── microblog-2.md
│   └── microblog-3.md
├── posts
   ├── post-1.md
    ├── post-2.md
    └── post-3.md

When I checked the archive page, it seemed that the archive page added the microblog (no title) entries.
image

I want microblogs not to appear on the archive page.

After some research, I'm guessing it might be that something needs tweaking here:
archive/list.html

line 7    {{ range .Site.RegularPages.GroupByPublishDate "2006" }}

line 15                {{ range where .Pages "Type" $contentTypeName }}
line 16                  {{ if eq .Kind "page" }}

But I don't know how to fix it, so came here for help, thanks!

@overlandandseas
Copy link

the archive page is going to look at "params.contentTypeName" in the config.

You need to have

params:
  contentTypeName: posts

in your config if you are using YAML
or

[params]
  contentTypeName = "posts"

if you are using TOML

@ike-keith
Copy link
Author

the archive page is going to look at "params.contentTypeName" in the config.

You need to have

params:
  contentTypeName: posts

in your config if you are using YAML or

[params]
  contentTypeName = "posts"

if you are using TOML

Thank you for your reply.
I confirmed that my config file has the following content:

[params]
  # dir name of your blog content (default is `content/posts`)
  contentTypeName = "posts"

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

No branches or pull requests

2 participants