Repository navigation
Closed
Labels
bugSomething isn't workingtriaged-toIssues that were not self-assigned, signals that an issue was assigned to someone.websitesIssues creating websites
Milestone
Description
Bug description
In a website project, setting the title-prefix parameter has no effect, no matter where one sets it - in _quarto.yml, individual quarto documents or via a cli option.
I would expect the prefix to override the website title for individual documents or directories.
How to reproduce
quarto create-project --type websiteedit _quarto.yml:
project:
type: website
title-prefix: "noprefix"
website:
title: "quarto-title"
navbar:
left:
- href: index.qmd
text: Home
- about.qmd
format:
html:
theme: cosmo
css: styles.css
toc: trueedit about.qmd
---
title: "About"
title-prefix: "noprefixtoo"
format:
html:
title-prefix: "stillnoprefix"
---
About this siteor run
quarto render --metadata "title-prefix: cliprefix"Quarto 1.3.324
RStudio Version 2023.05.0-daily+52 (2023.05.0-daily+52)
MacOS 13.4 beta
Checklist
- Please include a minimal, fully reproducible example in a single .qmd file? Please provide the whole file rather than the snippet you believe is causing the issue.
- Please format your issue so it is easier for us to read the bug report.
- Please document the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
- Please document the operating system you're running. If on Linux, please provide the specific distribution.
- Please provide the output of
quarto checkso we know which version of quarto and its dependencies you're running.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingtriaged-toIssues that were not self-assigned, signals that an issue was assigned to someone.websitesIssues creating websites
Activity
mcanouil commentedon Apr 15, 2023
title-prefixis ahtmlformat option not awebsiteoption, i.e., it's listed under https://quarto.org/docs/reference/formats/html.html#metadata and not in https://quarto.org/docs/reference/projects/websites.html.This being said, I agree that this option could be useful (and should be available) in website.
A workaround (see #1436):
_variables.ymlfile withtitle-prefix: "Prefix -"Note that

title-prefixis not at all recognised (in current dev version) in website project, i.e.,{{< meta title-prefix >}}will produce a warningWARNING: Unknown meta key title-prefix specified in a metadata Shortcode.and a display error?meta:title-prefix.petrbouchal commentedon Apr 17, 2023
Thanks for the explanation. I agree it would be useful for the
title-prefixoption to be reflected.cderv commentedon Apr 20, 2023
@dragonstyle I add a quick look at that because of #5253 as I thought it would work because of what we do here
quarto-cli/src/project/types/website/website-shared.ts
Lines 48 to 72 in ac751b9
It seems the only way to have
title-prefixcustomized is by having this value setbut now unsure what this is referring too.
title-prefixis something you can change at format level so it is why I would have expected this to work.It seems it is removed somehow from metadata (maybe in context of 796ba30)
Anyhow - just additional informations to help better understood this.
mcanouil commentedon Apr 21, 2023
@cderv from the code you pointed out, it does not seem one can completely remove
title-prefixor by making it equal to the title. Maybe in addition to a fix, there is an enhancement to allow whatever oftitle-prefix: false/nil/""which would fit the whole YAML design (related to #5260).cderv commentedon Apr 21, 2023
Yes this is why I pointed to this code.
title-prefixdoes not seem to be available for customization, and I wonder if this is on purpose or indeed a probleme to fix. We'll see !ldecicco-USGS commentedon May 3, 2023
I'm also interested in adding a
title-prefix, and nothing seems to work. My goal would actually be able to put an image with a link in that field, something like this:The way I did it in pkgdown was:
So if there was any way to duplicate that behavior, I'd be very interested.
mcanouil commentedon May 3, 2023
@ldecicco-USGS see my reply for a workaround until
title-prefixcan indeed be used in website project.ldecicco-USGS commentedon May 3, 2023
Hmm, I can't figure out how/where you used the "pagetitle". Also, I'm realizing maybe the title-prefix isn't want I want.
I'm looking to add something on the overall navigation bar like this:
mcanouil commentedon May 3, 2023
Could you open a new Q&A Discussion where you describe what you want to do, which format/project type you are using, what Quarto version you are using and possibly which operating system?1
Thanks 😊
Footnotes
this is to avoid diluting the issue raised here. ↩
remove title-prefix setting as invalid
Properly support `title-prefix` for html output