Best way to split content into 2 "types"?

Hi,

I am trying to create a personal blog that has 2 different “types” of content:

  • posts
  • links

Where a “post” is a standard blog post and a “link” is a link to something I’ve found that is interesting. A “link” has 2 custom fields (taxonomies?):

  • site (domain of link)
  • format (article / video / podcast)

I would like to use the built-in tags system, but I want to be able to list the tags for all posts separate from the tags for all links. Maybe the url structure is /posts/tags/ and /links/tags/, but it doesn’t have to be.

I tried using sections to accomplish this, but I couldn’t find a good way to cleanly separate the “types” of content.

Any help would be greatly appreciated!

You can use sections for this:

I would not say that it is the BEST way… but it is how I would do it. It is a relatively simple way if you want to keep your frontmatter consistent within sections (which is important to me).

Do the two content types really share a taxonomy, or can you model the content with multiple taxonomies? It seems like:

  • Posts might have a “tags” taxonomy
  • Links might have a “format” taxonomy

I tried using sections, but I’m not able to list tags for each section without adding some logic to the taxonomy page

Both posts and links will have “tags”. Only links will have “format” and “site”.

Well, if you want to list the tags per content type, and not an aggregate display, create two taxonomies:

[taxonomies]
link_tag = ‘link_tags’
post_tag = ‘post_tags’

Then set permalinks in your site config.

Thanks! That worked. For future searchers, this is what I ended up with:

taxonomies:
  tag: tags
  link_tag: 'link_tags'

permalinks:
  taxonomy:
    link_tags: /links/tags/
  term:
    link_tags: /links/tags/:slug/

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.