Skip to content

Conversation

gordonwoodhull
Copy link
Contributor

@gordonwoodhull gordonwoodhull commented Aug 7, 2025

Fixes #12559

This extension builds on the metadata extension, providing a sample brand.yml

To do this, we need to look at the project's project.brand and not just brand. Also includes @cscheid's fix merging the extension metadata during construction of the project context.

Posting as draft:

  • Needs tests
  • Currently distributes a sample _quarto.yml in order for the example in the extension to work — shouldn't the extension work without a project?

@gordonwoodhull gordonwoodhull added this to the v1.8 milestone Aug 7, 2025
@posit-snyk-bot
Copy link
Collaborator

posit-snyk-bot commented Aug 7, 2025

🎉 Snyk checks have passed. No issues have been found so far.

security/snyk check is complete. No issues have been found. (View Details)

license/snyk check is complete. No issues have been found. (View Details)

@gordonwoodhull gordonwoodhull requested a review from cscheid August 7, 2025 20:34
@gordonwoodhull gordonwoodhull marked this pull request as ready for review August 8, 2025 18:16
@gordonwoodhull
Copy link
Contributor Author

gordonwoodhull commented Aug 8, 2025

Do we test commands like quarto create extension brand?

Includes tests for brand extension consumers:

  • logo (dashboard, website sidebar, typst).
  • typography (typst)

HTML format does not yet support file-based fonts #12501; we'll have to test them with brand extension when we implement them.

I couldn't get revealjs to render in this project so no test for that one

ERROR: NotFound: No such file or directory (os error 2): rename
'/Users/gordon/src/quarto-cli/tests/docs/smoke-all/brand/logo/logo-extension/test.html' ->
'/Users/gordon/src/quarto-cli/tests/docs/smoke-all/brand/logo/logo-extension/_site/test.html'

@cscheid, I think this is ready to merge, but please review bc31efd and the note above about grandparent directory.

@gordonwoodhull gordonwoodhull marked this pull request as draft August 8, 2025 19:25
@gordonwoodhull gordonwoodhull force-pushed the feature/brand-extension branch from e49a509 to 9c1481e Compare August 11, 2025 15:53
@gordonwoodhull
Copy link
Contributor Author

Yeah, the change I made to singleFileProjectContext is too broad — this enables project mode for individual files when there is an extension, causing files to be rendered to _site/ and I'm sure there are other side effects.

Let's review tomorrow!

@gordonwoodhull gordonwoodhull force-pushed the feature/brand-extension branch 4 times, most recently from 5118901 to 6b4f7f6 Compare August 11, 2025 22:00
cscheid and others added 5 commits August 13, 2025 12:48
fixes #12559

this extension builds on the metadata extension, providing a sample brand.yml

to do this, we need to look at the project's project.brand and not just brand
note, we don't yet support brand fonts from file in HTML #12501
so that is not tested here.
@gordonwoodhull gordonwoodhull force-pushed the feature/brand-extension branch from 6b4f7f6 to 135b59c Compare August 13, 2025 17:39
@gordonwoodhull
Copy link
Contributor Author

I will submit a separate PR extending metadata extensions to single-file projects, which we can consider in the future. For now, we need a _quarto.yml in order to use brand or metadata extensions.

@gordonwoodhull gordonwoodhull marked this pull request as ready for review August 13, 2025 17:43
@gordonwoodhull gordonwoodhull merged commit 5d4ae28 into main Aug 13, 2025
49 of 51 checks passed
@gordonwoodhull gordonwoodhull deleted the feature/brand-extension branch August 13, 2025 18:00
@gordonwoodhull
Copy link
Contributor Author

Last thing I'll mention here: post-processing of href paths under _extensions could not have been working on Windows prior to this PR.

It was looking for paths starting with _extensions/. Now it looks for either _extensions/ or _extensions\.

I can't find any previous issues referencing this, but logo paths were not resolved without 135b59c, and it's too risky to change Windows to use forward slashes for HTML output so late in the release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Need section on how to share multiformat branding between Quarto projects

3 participants