quarto-dev / quarto-dev/quarto-cli
Conditional metada for different profiles on a website
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
Discussed in https://github.com/quarto-dev/quarto-cli/discussions/4455
Originally posted by iuryt February 21, 2023
Hi,
I am trying to write a multilingual web blog using Quarto. I think this software is amazing, but I am having trouble in defining different titles and categories for the blog posts depending on the language. I am using Quarto 1.2.1 CLI.
The post is
---
title: Trying Quarto
categories: News
author: "Iury Simoes-Sousa"
date: "2023-02-20"
---
::: {.content-visible when-profile="english"}
This is the first post in a Quarto blog. Welcome!

I plan to post here my thoughts about Science, Technology and Music.
:::
::: {.content-visible when-profile="portuguese"}
Este é o meu primeiro post no meu blog usando Quarto. Seja bem vindo!

Eu pretendo postar aqui as minhas idéias e tutoriais sobre ciência, tecnologia e música.
:::
which returns the following for english

and the blog page is
---
title: "My Blog"
listing:
contents: posts
sort: "date desc"
type: default
categories: true
sort-ui: false
filter-ui: false
page-layout: full
title-block-banner: true
---

Well, if I use what is suggested in #2822
The post will be:
---
title: |
::: {.content-visible when-profile="english"}
Trying Quarto
:::
::: {.content-visible when-profile="portuguese"}
Testando o Quarto
:::
categories: News
author: "Iury Simoes-Sousa"
date: "2023-02-20"
---
::: {.content-visible when-profile="english"}
This is the first post in a Quarto blog. Welcome!

I plan to post here my thoughts about Science, Technology and Music.
:::
::: {.content-visible when-profile="portuguese"}
Este é o meu primeiro post no meu blog usando Quarto. Seja bem vindo!

Eu pretendo postar aqui as minhas idéias e tutoriais sobre ciência, tecnologia e música.
:::
Which returns the following for english:

and it messes up with the Blog page

Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked discussion #4455 and the referenced issue #2822, then reproduce the profile-specific title and category examples in the Quarto CLI. Done means conditional metadata works for multilingual blog posts without corrupting the blog listing page.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- markdown
- Domain
- content, web-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100