Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions news/changelog-1.5.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All changes included in 1.5:

- ([#8118](https://github.com/quarto-dev/quarto-cli/issues/8118)): Add support for `body-classes` to add classes to the document body.

## Website

- ([#7318](https://github.com/quarto-dev/quarto-cli/issues/7318)): Don't improperly overwrite page titles

## Other Fixes

- ([#8119](https://github.com/quarto-dev/quarto-cli/issues/8119)): More intelligently detect when ejs templates are modified during development, improving quality of life during preview.
6 changes: 4 additions & 2 deletions src/project/types/website/website-meta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -432,10 +432,12 @@ const kOgTitle = "quarto-ogcardtitle";
const kOgDesc = "quarto-ogcardddesc";
const kMetaSideNameId = "quarto-metasitename";
function metaMarkdownPipeline(format: Format, extras: FormatExtras) {
const resolvedTitle = computePageTitle(format);

const titleMetaHandler = {
getUnrendered() {
const inlines: Record<string, string> = {};
const resolvedTitle = computePageTitle(format);

if (resolvedTitle !== undefined) {
inlines[kMetaTitleId] = resolvedTitle;
}
Expand All @@ -455,7 +457,7 @@ function metaMarkdownPipeline(format: Format, extras: FormatExtras) {
const el = doc.querySelector(
`head title`,
);
if (el) {
if (el && el.innerText === resolvedTitle) {
if (format.pandoc[kNumberSections] === false) {
// Remove chapter numbers if not numbered
const numberEl = renderedEl.querySelector("span.chapter-number");
Expand Down