Skip to content

Commit e61462a

Browse files
magicaldaveptrotter1dependabot[bot]jackyzha0jbowdre
authored
Update to Quartz e20dee2 (#55)
* Check link isExternal before adding target="_blank" (#1211) Fixes #1186 openLinksInNewTab opens ALL links in new tabs. Fixed to reflect documented behavior here: https://quartz.jzhao.xyz/plugins/CrawlLinks * chore(deps): bump workerpool from 9.1.1 to 9.1.2 (#1215) Bumps [workerpool](https://github.com/josdejong/workerpool) from 9.1.1 to 9.1.2. - [Changelog](https://github.com/josdejong/workerpool/blob/master/HISTORY.md) - [Commits](josdejong/workerpool@v9.1.1...v9.1.2) --- updated-dependencies: - dependency-name: workerpool dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump preact-render-to-string from 6.5.4 to 6.5.5 (#1214) Bumps [preact-render-to-string](https://github.com/preactjs/preact-render-to-string) from 6.5.4 to 6.5.5. - [Release notes](https://github.com/preactjs/preact-render-to-string/releases) - [Changelog](https://github.com/preactjs/preact-render-to-string/blob/main/CHANGELOG.md) - [Commits](preactjs/preact-render-to-string@v6.5.4...v6.5.5) --- updated-dependencies: - dependency-name: preact-render-to-string dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump ws from 8.17.0 to 8.17.1 (#1213) Bumps [ws](https://github.com/websockets/ws) from 8.17.0 to 8.17.1. - [Release notes](https://github.com/websockets/ws/releases) - [Commits](websockets/ws@8.17.0...8.17.1) --- updated-dependencies: - dependency-name: ws dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * fix: overflow fade for good (closes #1218) * fix: properly compute relative path for explorer (closes #1055, #1066) * chore(deps-dev): bump prettier * css: use fit-content (closes #1194) * feat(analytics): Cabin analytics support (#1221) * add cabin analytics * fix formatting * fix: "draft" true or false in frontmatter still removes from publishing #1244 (#1249) * fix: draft bug #1244 * update: contents in folder before creating PR * Update draft.ts * i18n: Improving Spanish & adding Catalan and British English (#1240) * Create en-GB * Rename en-GB to en-GB.ts * Update es-ES.ts * Update es-ES.ts * Create ca-ES.ts * Update es-ES.ts * Update index.ts * Update index.ts * Update index.ts * Update es-ES.ts * i18n: Update uk-UA.ts (#1245) Update the Ukrainian translation of Quartz according to the latest Ukrainian translation of Obsidian. * chore(deps-dev): bump tsx from 4.11.2 to 4.16.0 (#1256) Bumps [tsx](https://github.com/privatenumber/tsx) from 4.11.2 to 4.16.0. - [Release notes](https://github.com/privatenumber/tsx/releases) - [Changelog](https://github.com/privatenumber/tsx/blob/master/release.config.cjs) - [Commits](privatenumber/tsx@v4.11.2...v4.16.0) --- updated-dependencies: - dependency-name: tsx dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Fix: Table `overflow-wrap: anywhere` breaks words on mobile (#1259) Closes #1258 --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Paul Trotter <ptrotter1@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com> Co-authored-by: John Bowdre <61015723+jbowdre@users.noreply.github.com> Co-authored-by: Seohyun Kim <153896425+1etterh@users.noreply.github.com> Co-authored-by: L01D <45131480+IL01DI@users.noreply.github.com> Co-authored-by: Illia Pyshniak <corbee@pm.me> Co-authored-by: MassiveJuice <122503558+MasssiveJuice08@users.noreply.github.com>
1 parent 2f7587f commit e61462a

File tree

15 files changed

+347
-155
lines changed

15 files changed

+347
-155
lines changed

package-lock.json

+116-116
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
"mdast-util-to-string": "^4.0.0",
6060
"micromorph": "^0.4.5",
6161
"preact": "^10.22.0",
62-
"preact-render-to-string": "^6.5.4",
62+
"preact-render-to-string": "^6.5.5",
6363
"pretty-bytes": "^6.1.1",
6464
"pretty-time": "^1.1.0",
6565
"reading-time": "^1.5.0",
@@ -88,8 +88,8 @@
8888
"unified": "^11.0.4",
8989
"unist-util-visit": "^5.0.0",
9090
"vfile": "^6.0.1",
91-
"workerpool": "^9.1.1",
92-
"ws": "^8.17.0",
91+
"workerpool": "^9.1.2",
92+
"ws": "^8.17.1",
9393
"yargs": "^17.7.2"
9494
},
9595
"devDependencies": {
@@ -103,8 +103,8 @@
103103
"@types/ws": "^8.5.10",
104104
"@types/yargs": "^17.0.32",
105105
"esbuild": "^0.19.9",
106-
"prettier": "^3.2.4",
107-
"tsx": "^4.11.2",
106+
"prettier": "^3.3.2",
107+
"tsx": "^4.16.0",
108108
"typescript": "^5.4.5"
109109
}
110110
}

quartz/cfg.ts

+4
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ export type Analytics =
3434
provider: "tinylytics"
3535
siteId: string
3636
}
37+
| {
38+
provider: "cabin"
39+
host?: string
40+
}
3741

3842
export interface GlobalConfiguration {
3943
pageTitle: string

quartz/components/ExplorerNode.tsx

+3-9
Original file line numberDiff line numberDiff line change
@@ -168,10 +168,8 @@ export function ExplorerNode({ node, opts, fullPath, fileData }: ExplorerNodePro
168168
const isDefaultOpen = opts.folderDefaultState === "open"
169169

170170
// Calculate current folderPath
171-
let folderPath = ""
172-
if (node.name !== "") {
173-
folderPath = joinSegments(fullPath ?? "", node.name)
174-
}
171+
const folderPath = node.name !== "" ? joinSegments(fullPath ?? "", node.name) : ""
172+
const href = resolveRelative(fileData.slug!, folderPath as SimpleSlug) + "/"
175173

176174
return (
177175
<>
@@ -205,11 +203,7 @@ export function ExplorerNode({ node, opts, fullPath, fileData }: ExplorerNodePro
205203
{/* render <a> tag if folderBehavior is "link", otherwise render <button> with collapse click event */}
206204
<div key={node.name} data-folderpath={folderPath}>
207205
{folderBehavior === "link" ? (
208-
<a
209-
href={resolveRelative(fileData.slug!, folderPath as SimpleSlug)}
210-
data-for={node.name}
211-
class="folder-title"
212-
>
206+
<a href={href} data-for={node.name} class="folder-title">
213207
{node.displayName}
214208
</a>
215209
) : (

quartz/components/styles/listPage.scss

+4-4
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ li.section-li {
1111

1212
& > .section {
1313
display: grid;
14-
grid-template-columns: 6em 3fr 1fr;
14+
grid-template-columns: fit-content(8em) 3fr 1fr;
1515

1616
@media all and (max-width: $mobileBreakpoint) {
1717
& > .tags {
@@ -24,16 +24,16 @@ li.section-li {
2424
}
2525

2626
& > .meta {
27-
margin: 0;
28-
flex-basis: 6em;
27+
margin: 0 1em 0 0;
2928
opacity: 0.6;
3029
}
3130
}
3231
}
3332

3433
// modifications in popover context
3534
.popover .section {
36-
grid-template-columns: 6em 1fr !important;
35+
grid-template-columns: fit-content(8em) 1fr !important;
36+
3737
& > .tags {
3838
display: none;
3939
}

quartz/i18n/index.ts

+3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import ja from "./locales/ja-JP"
66
import de from "./locales/de-DE"
77
import nl from "./locales/nl-NL"
88
import ro from "./locales/ro-RO"
9+
import ca from "./locales/ca-ES"
910
import es from "./locales/es-ES"
1011
import ar from "./locales/ar-SA"
1112
import uk from "./locales/uk-UA"
@@ -20,6 +21,7 @@ import pl from "./locales/pl-PL"
2021

2122
export const TRANSLATIONS = {
2223
"en-US": en,
24+
"en-GB": en,
2325
"fr-FR": fr,
2426
"it-IT": it,
2527
"ja-JP": ja,
@@ -28,6 +30,7 @@ export const TRANSLATIONS = {
2830
"nl-BE": nl,
2931
"ro-RO": ro,
3032
"ro-MD": ro,
33+
"ca-ES": ca,
3134
"es-ES": es,
3235
"ar-SA": ar,
3336
"ar-AE": ar,

quartz/i18n/locales/ca-ES.ts

+84
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
import { Translation } from "./definition"
2+
3+
export default {
4+
propertyDefaults: {
5+
title: "Sense títol",
6+
description: "Sense descripció",
7+
},
8+
components: {
9+
callout: {
10+
note: "Nota",
11+
abstract: "Resum",
12+
info: "Informació",
13+
todo: "Per fer",
14+
tip: "Consell",
15+
success: "Èxit",
16+
question: "Pregunta",
17+
warning: "Advertència",
18+
failure: "Fall",
19+
danger: "Perill",
20+
bug: "Error",
21+
example: "Exemple",
22+
quote: "Cita",
23+
},
24+
backlinks: {
25+
title: "Retroenllaç",
26+
noBacklinksFound: "No s'han trobat retroenllaços",
27+
},
28+
themeToggle: {
29+
lightMode: "Mode clar",
30+
darkMode: "Mode fosc",
31+
},
32+
explorer: {
33+
title: "Explorador",
34+
},
35+
footer: {
36+
createdWith: "Creat amb",
37+
},
38+
graph: {
39+
title: "Vista Gràfica",
40+
},
41+
recentNotes: {
42+
title: "Notes Recents",
43+
seeRemainingMore: ({ remaining }) => `Vegi ${remaining} més →`,
44+
},
45+
transcludes: {
46+
transcludeOf: ({ targetSlug }) => `Transcluit de ${targetSlug}`,
47+
linkToOriginal: "Enllaç a l'original",
48+
},
49+
search: {
50+
title: "Cercar",
51+
searchBarPlaceholder: "Cerca alguna cosa",
52+
},
53+
tableOfContents: {
54+
title: "Taula de Continguts",
55+
},
56+
contentMeta: {
57+
readingTime: ({ minutes }) => `Es llegeix en ${minutes} min`,
58+
},
59+
},
60+
pages: {
61+
rss: {
62+
recentNotes: "Notes recents",
63+
lastFewNotes: ({ count }) => `Últimes ${count} notes`,
64+
},
65+
error: {
66+
title: "No s'ha trobat.",
67+
notFound: "Aquesta pàgina és privada o no existeix.",
68+
home: "Torna a la pàgina principal",
69+
},
70+
folderContent: {
71+
folder: "Carpeta",
72+
itemsUnderFolder: ({ count }) =>
73+
count === 1 ? "1 article en aquesta carpeta." : `${count} articles en esta carpeta.`,
74+
},
75+
tagContent: {
76+
tag: "Etiqueta",
77+
tagIndex: "índex d'Etiquetes",
78+
itemsUnderTag: ({ count }) =>
79+
count === 1 ? "1 article amb aquesta etiqueta." : `${count} article amb aquesta etiqueta.`,
80+
showingFirst: ({ count }) => `Mostrant les primeres ${count} etiquetes.`,
81+
totalTags: ({ count }) => `S'han trobat ${count} etiquetes en total.`,
82+
},
83+
},
84+
} as const satisfies Translation

quartz/i18n/locales/en-GB.ts

+84
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
import { Translation } from "./definition"
2+
3+
export default {
4+
propertyDefaults: {
5+
title: "Untitled",
6+
description: "No description provided",
7+
},
8+
components: {
9+
callout: {
10+
note: "Note",
11+
abstract: "Abstract",
12+
info: "Info",
13+
todo: "To-Do",
14+
tip: "Tip",
15+
success: "Success",
16+
question: "Question",
17+
warning: "Warning",
18+
failure: "Failure",
19+
danger: "Danger",
20+
bug: "Bug",
21+
example: "Example",
22+
quote: "Quote",
23+
},
24+
backlinks: {
25+
title: "Backlinks",
26+
noBacklinksFound: "No backlinks found",
27+
},
28+
themeToggle: {
29+
lightMode: "Light mode",
30+
darkMode: "Dark mode",
31+
},
32+
explorer: {
33+
title: "Explorer",
34+
},
35+
footer: {
36+
createdWith: "Created with",
37+
},
38+
graph: {
39+
title: "Graph View",
40+
},
41+
recentNotes: {
42+
title: "Recent Notes",
43+
seeRemainingMore: ({ remaining }) => `See ${remaining} more →`,
44+
},
45+
transcludes: {
46+
transcludeOf: ({ targetSlug }) => `Transclude of ${targetSlug}`,
47+
linkToOriginal: "Link to original",
48+
},
49+
search: {
50+
title: "Search",
51+
searchBarPlaceholder: "Search for something",
52+
},
53+
tableOfContents: {
54+
title: "Table of Contents",
55+
},
56+
contentMeta: {
57+
readingTime: ({ minutes }) => `${minutes} min read`,
58+
},
59+
},
60+
pages: {
61+
rss: {
62+
recentNotes: "Recent notes",
63+
lastFewNotes: ({ count }) => `Last ${count} notes`,
64+
},
65+
error: {
66+
title: "Not Found",
67+
notFound: "Either this page is private or doesn't exist.",
68+
home: "Return to Homepage",
69+
},
70+
folderContent: {
71+
folder: "Folder",
72+
itemsUnderFolder: ({ count }) =>
73+
count === 1 ? "1 item under this folder." : `${count} items under this folder.`,
74+
},
75+
tagContent: {
76+
tag: "Tag",
77+
tagIndex: "Tag Index",
78+
itemsUnderTag: ({ count }) =>
79+
count === 1 ? "1 item with this tag." : `${count} items with this tag.`,
80+
showingFirst: ({ count }) => `Showing first ${count} tags.`,
81+
totalTags: ({ count }) => `Found ${count} total tags.`,
82+
},
83+
},
84+
} as const satisfies Translation

quartz/i18n/locales/es-ES.ts

+7-7
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ export default {
2222
quote: "Cita",
2323
},
2424
backlinks: {
25-
title: "Enlaces de Retroceso",
26-
noBacklinksFound: "No se han encontrado enlaces traseros",
25+
title: "Retroenlaces",
26+
noBacklinksFound: "No se han encontrado retroenlaces",
2727
},
2828
themeToggle: {
2929
lightMode: "Modo claro",
@@ -54,18 +54,18 @@ export default {
5454
title: "Tabla de Contenidos",
5555
},
5656
contentMeta: {
57-
readingTime: ({ minutes }) => `${minutes} min read`,
57+
readingTime: ({ minutes }) => `Se lee en ${minutes} min`,
5858
},
5959
},
6060
pages: {
6161
rss: {
6262
recentNotes: "Notas recientes",
63-
lastFewNotes: ({ count }) => `Últimás ${count} notas`,
63+
lastFewNotes: ({ count }) => `Últimas ${count} notas`,
6464
},
6565
error: {
66-
title: "No se encontró.",
66+
title: "No se ha encontrado.",
6767
notFound: "Esta página es privada o no existe.",
68-
home: "Regresar a la página principal",
68+
home: "Regresa a la página principal",
6969
},
7070
folderContent: {
7171
folder: "Carpeta",
@@ -78,7 +78,7 @@ export default {
7878
itemsUnderTag: ({ count }) =>
7979
count === 1 ? "1 artículo con esta etiqueta." : `${count} artículos con esta etiqueta.`,
8080
showingFirst: ({ count }) => `Mostrando las primeras ${count} etiquetas.`,
81-
totalTags: ({ count }) => `Se encontraron ${count} etiquetas en total.`,
81+
totalTags: ({ count }) => `Se han encontrado ${count} etiquetas en total.`,
8282
},
8383
},
8484
} as const satisfies Translation

quartz/i18n/locales/uk-UA.ts

+8-8
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export default {
5454
title: "Зміст",
5555
},
5656
contentMeta: {
57-
readingTime: ({ minutes }) => `${minutes} min read`,
57+
readingTime: ({ minutes }) => `${minutes} хв читання`,
5858
},
5959
},
6060
pages: {
@@ -68,17 +68,17 @@ export default {
6868
home: "Повернутися на головну сторінку",
6969
},
7070
folderContent: {
71-
folder: "Папка",
71+
folder: "Тека",
7272
itemsUnderFolder: ({ count }) =>
73-
count === 1 ? "У цій папці 1 елемент." : `Елементів у цій папці: ${count}.`,
73+
count === 1 ? "У цій теці 1 елемент." : `Елементів у цій теці: ${count}.`,
7474
},
7575
tagContent: {
76-
tag: "Тег",
77-
tagIndex: "Індекс тегу",
76+
tag: "Мітка",
77+
tagIndex: "Індекс мітки",
7878
itemsUnderTag: ({ count }) =>
79-
count === 1 ? "1 елемент з цим тегом." : `Елементів з цим тегом: ${count}.`,
80-
showingFirst: ({ count }) => `Показ перших ${count} тегів.`,
81-
totalTags: ({ count }) => `Всього знайдено тегів: ${count}.`,
79+
count === 1 ? "1 елемент з цією міткою." : `Елементів з цією міткою: ${count}.`,
80+
showingFirst: ({ count }) => `Показ перших ${count} міток.`,
81+
totalTags: ({ count }) => `Всього знайдено міток: ${count}.`,
8282
},
8383
},
8484
} as const satisfies Translation

quartz/plugins/emitters/componentResources.ts

+8
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,14 @@ function addGlobalPageResources(ctx: BuildCtx, componentResources: ComponentReso
144144
tinylyticsScript.defer = true
145145
document.head.appendChild(tinylyticsScript)
146146
`)
147+
} else if (cfg.analytics?.provider === "cabin") {
148+
componentResources.afterDOMLoaded.push(`
149+
const cabinScript = document.createElement("script")
150+
cabinScript.src = "${cfg.analytics.host ?? "https://scripts.cabin.dev"}/cabin.js"
151+
cabinScript.defer = true
152+
cabinScript.async = true
153+
document.head.appendChild(cabinScript)
154+
`)
147155
}
148156

149157
if (cfg.enableSPA) {

quartz/plugins/filters/draft.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { QuartzFilterPlugin } from "../types"
33
export const RemoveDrafts: QuartzFilterPlugin<{}> = () => ({
44
name: "RemoveDrafts",
55
shouldPublish(_ctx, [_tree, vfile]) {
6-
const draftFlag: boolean = vfile.data?.frontmatter?.draft ?? false
6+
const draftFlag: boolean = vfile.data?.frontmatter?.draft || false
77
return !draftFlag
88
},
99
})

0 commit comments

Comments
 (0)