diff --git a/news/changelog-1.7.md b/news/changelog-1.7.md index f4c937bbd4..08158bb9b7 100644 --- a/news/changelog-1.7.md +++ b/news/changelog-1.7.md @@ -2,5 +2,6 @@ All changes included in 1.7: ## Regression fixes -- ([#11532](https://github.com/quarto-dev/quarto-cli/issues/11532)): Fix regression for [#660](https://github.com/quarto-dev/quarto-cli/issues/660), which causes files to have incorrect permissions when Quarto is installed in a location not writable by the current user. - ([#11509](https://github.com/quarto-dev/quarto-cli/issues/11509)): Fix link-decoration regression in HTML formats. +- ([#11532](https://github.com/quarto-dev/quarto-cli/issues/11532)): Fix regression for [#660](https://github.com/quarto-dev/quarto-cli/issues/660), which causes files to have incorrect permissions when Quarto is installed in a location not writable by the current user. +- ([#11580](https://github.com/quarto-dev/quarto-cli/issues/11580)): Fix regression with documents containing `categories` fields that are not strings. diff --git a/src/project/types/website/website.ts b/src/project/types/website/website.ts index 2f8bc5063e..1d562d619b 100644 --- a/src/project/types/website/website.ts +++ b/src/project/types/website/website.ts @@ -89,6 +89,7 @@ import { projectDraftMode } from "./website-utils.ts"; import { kFieldCategories } from "./listing/website-listing-shared.ts"; import { pandocNativeStr } from "../../../core/pandoc/codegen.ts"; import { asArray } from "../../../core/array.ts"; +import { InternalError } from "../../../core/lib/error.ts"; export const kSiteTemplateDefault = "default"; export const kSiteTemplateBlog = "blog"; @@ -207,8 +208,12 @@ export const websiteProjectType: ProjectType = { extras.metadataOverride[kFieldCategories] = asArray( format.metadata[kFieldCategories], ).map( - (category) => - pandocNativeStr(category as string).mappedString().value, + (category) => { + const strCategory: string = typeof category === "string" + ? category + : category.toString(); + return pandocNativeStr(strCategory).mappedString().value; + }, ); } diff --git a/tests/docs/smoke-all/2024/12/03/issue-11580/.gitignore b/tests/docs/smoke-all/2024/12/03/issue-11580/.gitignore new file mode 100644 index 0000000000..075b2542af --- /dev/null +++ b/tests/docs/smoke-all/2024/12/03/issue-11580/.gitignore @@ -0,0 +1 @@ +/.quarto/ diff --git a/tests/docs/smoke-all/2024/12/03/issue-11580/_quarto.yml b/tests/docs/smoke-all/2024/12/03/issue-11580/_quarto.yml new file mode 100644 index 0000000000..4b0bf6e165 --- /dev/null +++ b/tests/docs/smoke-all/2024/12/03/issue-11580/_quarto.yml @@ -0,0 +1,21 @@ +project: + type: website + +website: + title: "issue-11580" + navbar: + right: + - about.qmd + - icon: github + href: https://github.com/ + - icon: twitter + href: https://twitter.com +format: + html: + theme: + - cosmo + - brand + css: styles.css + + + diff --git a/tests/docs/smoke-all/2024/12/03/issue-11580/about.qmd b/tests/docs/smoke-all/2024/12/03/issue-11580/about.qmd new file mode 100644 index 0000000000..692676f768 --- /dev/null +++ b/tests/docs/smoke-all/2024/12/03/issue-11580/about.qmd @@ -0,0 +1,19 @@ +--- +title: "About" +image: profile.jpg +about: + template: jolla + links: + - icon: twitter + text: Twitter + href: https://twitter.com + - icon: linkedin + text: LinkedIn + href: https://linkedin.com + - icon: github + text: Github + href: https://github.com + +--- + +About this blog diff --git a/tests/docs/smoke-all/2024/12/03/issue-11580/index.qmd b/tests/docs/smoke-all/2024/12/03/issue-11580/index.qmd new file mode 100644 index 0000000000..c0082cab5a --- /dev/null +++ b/tests/docs/smoke-all/2024/12/03/issue-11580/index.qmd @@ -0,0 +1,16 @@ +--- +title: "issue-11580" +listing: + contents: posts + sort: "date desc" + type: default + categories: true + sort-ui: false + filter-ui: false +page-layout: full +title-block-banner: true +_quarto: + render-project: true +--- + + diff --git a/tests/docs/smoke-all/2024/12/03/issue-11580/posts/_metadata.yml b/tests/docs/smoke-all/2024/12/03/issue-11580/posts/_metadata.yml new file mode 100644 index 0000000000..3e9dd01bc3 --- /dev/null +++ b/tests/docs/smoke-all/2024/12/03/issue-11580/posts/_metadata.yml @@ -0,0 +1,8 @@ +# options specified here will apply to all posts in this folder + +# freeze computational output +# (see https://quarto.org/docs/projects/code-execution.html#freeze) +freeze: true + +# Enable banner style title blocks +title-block-banner: true diff --git a/tests/docs/smoke-all/2024/12/03/issue-11580/posts/post-with-code/image.jpg b/tests/docs/smoke-all/2024/12/03/issue-11580/posts/post-with-code/image.jpg new file mode 100644 index 0000000000..3ec04c8c4e Binary files /dev/null and b/tests/docs/smoke-all/2024/12/03/issue-11580/posts/post-with-code/image.jpg differ diff --git a/tests/docs/smoke-all/2024/12/03/issue-11580/posts/post-with-code/index.qmd b/tests/docs/smoke-all/2024/12/03/issue-11580/posts/post-with-code/index.qmd new file mode 100644 index 0000000000..1f9f490f95 --- /dev/null +++ b/tests/docs/smoke-all/2024/12/03/issue-11580/posts/post-with-code/index.qmd @@ -0,0 +1,13 @@ +--- +title: "Post With Code" +author: "Harlow Malloc" +date: "2024-12-03" +categories: + - news + - code + - 3 + - analysis +image: "image.jpg" +--- + +This is a post with executable code. diff --git a/tests/docs/smoke-all/2024/12/03/issue-11580/posts/welcome/index.qmd b/tests/docs/smoke-all/2024/12/03/issue-11580/posts/welcome/index.qmd new file mode 100644 index 0000000000..9b390c4528 --- /dev/null +++ b/tests/docs/smoke-all/2024/12/03/issue-11580/posts/welcome/index.qmd @@ -0,0 +1,12 @@ +--- +title: "Welcome To My Blog" +author: "Tristan O'Malley" +date: "2024-11-30" +categories: [news] +--- + +This is the first post in a Quarto blog. Welcome! + +![](thumbnail.jpg) + +Since this post doesn't specify an explicit `image`, the first image in the post will be used in the listing page of posts. diff --git a/tests/docs/smoke-all/2024/12/03/issue-11580/posts/welcome/thumbnail.jpg b/tests/docs/smoke-all/2024/12/03/issue-11580/posts/welcome/thumbnail.jpg new file mode 100644 index 0000000000..8e3107c9e0 Binary files /dev/null and b/tests/docs/smoke-all/2024/12/03/issue-11580/posts/welcome/thumbnail.jpg differ diff --git a/tests/docs/smoke-all/2024/12/03/issue-11580/profile.jpg b/tests/docs/smoke-all/2024/12/03/issue-11580/profile.jpg new file mode 100644 index 0000000000..9d50b914ff Binary files /dev/null and b/tests/docs/smoke-all/2024/12/03/issue-11580/profile.jpg differ diff --git a/tests/docs/smoke-all/2024/12/03/issue-11580/styles.css b/tests/docs/smoke-all/2024/12/03/issue-11580/styles.css new file mode 100644 index 0000000000..2ddf50c7b4 --- /dev/null +++ b/tests/docs/smoke-all/2024/12/03/issue-11580/styles.css @@ -0,0 +1 @@ +/* css styles */