Skip to content

Commit 4262320

Browse files
authored
Merge pull request #13547 from quarto-dev/cookie-consent/default-express
2 parents b860ae9 + 2720028 commit 4262320

File tree

14 files changed

+74
-22
lines changed

14 files changed

+74
-22
lines changed

news/changelog-1.9.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ All changes included in 1.9:
3535

3636
- ([#13524](https://github.com/quarto-dev/quarto-cli/issues/13524)): Add support for Plausible Analytics via `plausible-analytics` configuration option. Users can either paste their Plausible script snippet directly in YAML or provide a path to a file containing the snippet using `plausible-analytics: { path: _plausible_snippet.html }`.
3737
- ([#13525](https://github.com/quarto-dev/quarto-cli/issues/13525)): Algolia Insights now uses privacy-friendly defaults: `useCookie: false` with random session tokens when cookie consent is not configured. When `cookie-consent: true` is enabled, Algolia scripts are deferred and only use cookies after user grants "tracking" consent, ensuring GDPR compliance.
38+
- ([#13547](https://github.com/quarto-dev/quarto-cli/issues/13547))`cookie-content: { type: express }` is now the default. Previously it was `type: implied`. It now means this will block cookies until the user expressly agrees to allow them (or continue blocking them if the user doesn’t agree).
3839

3940
## `publish`
4041

src/project/types/website/website-analytics.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ function cookieConsentConfiguration(
277277
): CookieConsentConfiguration {
278278
return {
279279
siteName: "",
280-
type: type || "implied",
280+
type: type || "express",
281281
style: style || "simple",
282282
palette: palette || "light",
283283
policyUrl,
@@ -378,6 +378,8 @@ gtag('js', new Date());`);
378378
].join("\n");
379379
}
380380

381+
// configuration for the script are defined in
382+
// https://github.com/termsfeed/termsfeed-cookie-consent-4-0/blob/main/README.md
381383
function cookieConsentScript(
382384
config: CookieConsentConfiguration,
383385
) {

src/resources/editor/tools/vs-code.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9522,12 +9522,12 @@ var require_yaml_intelligence_resources = __commonJS({
95229522
properties: {
95239523
type: {
95249524
enum: [
9525-
"implied",
9526-
"express"
9525+
"express",
9526+
"implied"
95279527
],
95289528
description: {
95299529
short: "The type of consent that should be requested",
9530-
long: "The type of consent that should be requested, using one of these two values:\n\n- `implied` (default): This will notify the user that the site uses cookies and permit them to change preferences, but not block cookies unless the user changes their preferences.\n\n- `express`: This will block cookies until the user expressly agrees to allow them (or continue blocking them if the user doesn\u2019t agree).\n"
9530+
long: "The type of consent that should be requested, using one of these two values:\n\n- `express` (default): This will block cookies until the user expressly agrees to allow them (or continue blocking them if the user doesn\u2019t agree).\n\n- `implied`: This will notify the user that the site uses cookies and permit them to change preferences, but not block cookies unless the user changes their preferences.\n"
95319531
}
95329532
},
95339533
style: {

src/resources/editor/tools/yaml/all-schema-definitions.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

src/resources/editor/tools/yaml/web-worker.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/resources/editor/tools/yaml/yaml-intelligence-resources.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2494,12 +2494,12 @@
24942494
"properties": {
24952495
"type": {
24962496
"enum": [
2497-
"implied",
2498-
"express"
2497+
"express",
2498+
"implied"
24992499
],
25002500
"description": {
25012501
"short": "The type of consent that should be requested",
2502-
"long": "The type of consent that should be requested, using one of these two values:\n\n- `implied` (default): This will notify the user that the site uses cookies and permit them to change preferences, but not block cookies unless the user changes their preferences.\n\n- `express`: This will block cookies until the user expressly agrees to allow them (or continue blocking them if the user doesn’t agree).\n"
2502+
"long": "The type of consent that should be requested, using one of these two values:\n\n- `express` (default): This will block cookies until the user expressly agrees to allow them (or continue blocking them if the user doesn’t agree).\n\n- `implied`: This will notify the user that the site uses cookies and permit them to change preferences, but not block cookies unless the user changes their preferences.\n"
25032503
}
25042504
},
25052505
"style": {

src/resources/schema/definitions.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -845,15 +845,16 @@
845845
- object:
846846
properties:
847847
type:
848-
enum: [implied, express]
848+
enum: [express, implied]
849849
description:
850850
short: "The type of consent that should be requested"
851851
long: |
852852
The type of consent that should be requested, using one of these two values:
853853
854-
- `implied` (default): This will notify the user that the site uses cookies and permit them to change preferences, but not block cookies unless the user changes their preferences.
854+
- `express` (default): This will block cookies until the user expressly agrees to allow them (or continue blocking them if the user doesn’t agree).
855+
856+
- `implied`: This will notify the user that the site uses cookies and permit them to change preferences, but not block cookies unless the user changes their preferences.
855857
856-
- `express`: This will block cookies until the user expressly agrees to allow them (or continue blocking them if the user doesn’t agree).
857858
style:
858859
enum: [simple, headline, interstitial, standalone]
859860
description:

src/resources/schema/json-schemas.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -891,8 +891,8 @@
891891
"properties": {
892892
"type": {
893893
"enum": [
894-
"implied",
895-
"express"
894+
"express",
895+
"implied"
896896
]
897897
},
898898
"style": {

src/resources/types/schema-types.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -431,12 +431,12 @@ For more information, see <https://plausible.io/docs/plausible-script> */;
431431
432432
- `standalone`: An opaque overlay of the entire website. */;
433433
type?:
434-
| "implied"
435-
| "express"; /* The type of consent that should be requested, using one of these two values:
434+
| "express"
435+
| "implied"; /* The type of consent that should be requested, using one of these two values:
436436
437-
- `implied` (default): This will notify the user that the site uses cookies and permit them to change preferences, but not block cookies unless the user changes their preferences.
437+
- `express` (default): This will block cookies until the user expressly agrees to allow them (or continue blocking them if the user doesn’t agree).
438438
439-
- `express`: This will block cookies until the user expressly agrees to allow them (or continue blocking them if the user doesn’t agree). */
439+
- `implied`: This will notify the user that the site uses cookies and permit them to change preferences, but not block cookies unless the user changes their preferences. */
440440
} /* Quarto includes the ability to request cookie consent before enabling scripts that set cookies, using [Cookie Consent](https://www.cookieconsent.com/).
441441
442442
The user’s cookie preferences will automatically control Google Analytics (if enabled) and can be used to control custom scripts you add as well. For more information see [Custom Scripts and Cookie Consent](https://quarto.org/docs/websites/website-tools.html#custom-scripts-and-cookie-consent). */;

src/resources/types/zod/schema-types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ export const ZodBaseWebsite = z.object({
328328
z.enum(["express", "implied"] as const),
329329
z.boolean(),
330330
z.object({
331-
type: z.enum(["implied", "express"] as const),
331+
type: z.enum(["express", "implied"] as const),
332332
style: z.enum(
333333
["simple", "headline", "interstitial", "standalone"] as const,
334334
),
@@ -506,7 +506,7 @@ export const ZodBookSchema = z.object({
506506
z.enum(["express", "implied"] as const),
507507
z.boolean(),
508508
z.object({
509-
type: z.enum(["implied", "express"] as const),
509+
type: z.enum(["express", "implied"] as const),
510510
style: z.enum(
511511
["simple", "headline", "interstitial", "standalone"] as const,
512512
),

0 commit comments

Comments
 (0)