Skip to content

Commit 100d502

Browse files
committed
Merge branch 'v4' of https://github.com/jackyzha0/quartz into v4
2 parents 0e09ef1 + cd13ce3 commit 100d502

File tree

6 files changed

+31
-6
lines changed

6 files changed

+31
-6
lines changed

docs/configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ This part of the configuration concerns anything that can affect the whole site.
2727
- `analytics`: what to use for analytics on your site. Values can be
2828
- `null`: don't use analytics;
2929
- `{ provider: 'google', tagId: '<your-google-tag>' }`: use Google Analytics;
30-
- `{ provider: 'plausible' }` (managed) or `{ provider: 'plausible', host: '<your-plausible-host>' }` (self-hosted): use [Plausible](https://plausible.io/);
30+
- `{ provider: 'plausible' }` (managed) or `{ provider: 'plausible', host: 'https://<your-plausible-host>' }` (self-hosted, make sure to include the `https://` protocol prefix): use [Plausible](https://plausible.io/);
3131
- `{ provider: 'umami', host: '<your-umami-host>', websiteId: '<your-umami-website-id>' }`: use [Umami](https://umami.is/);
3232
- `{ provider: 'goatcounter', websiteId: 'my-goatcounter-id' }` (managed) or `{ provider: 'goatcounter', websiteId: 'my-goatcounter-id', host: 'my-goatcounter-domain.com', scriptSrc: 'https://my-url.to/counter.js' }` (self-hosted) use [GoatCounter](https://goatcounter.com);
3333
- `{ provider: 'posthog', apiKey: '<your-posthog-project-apiKey>', host: '<your-posthog-host>' }`: use [Posthog](https://posthog.com/);

docs/features/private pages.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ There may be some notes you want to avoid publishing as a website. Quartz suppor
1313
If you'd like to only publish a select number of notes, you can instead use [[ExplicitPublish]] which will filter out all notes except for any that have `publish: true` in the frontmatter.
1414

1515
> [!warning]
16-
> Regardless of the filter plugin used, **all non-markdown files will be emitted and available publically in the final build.** This includes files such as images, voice recordings, PDFs, etc. One way to prevent this and still be able to embed local images is to create a folder specifically for public media and add the following two patterns to the ignorePatterns array.
17-
>
18-
> `"!(PublicMedia)**/!(*.md)", "!(*.md)"`
16+
> Regardless of the filter plugin used, **all non-markdown files will be emitted and available publically in the final build.** This includes files such as images, voice recordings, PDFs, etc.
1917
2018
## `ignorePatterns`
2119

@@ -28,7 +26,7 @@ Common examples include:
2826

2927
- `some/folder`: exclude the entire of `some/folder`
3028
- `*.md`: exclude all files with a `.md` extension
31-
- `!*.md` exclude all files that _don't_ have a `.md` extension
29+
- `!(*.md)` exclude all files that _don't_ have a `.md` extension. Note that negations _must_ parenthesize the rest of the pattern!
3230
- `**/private`: exclude any files or folders named `private` at any level of nesting
3331

3432
> [!warning]

docs/layout-components.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,15 @@ Component.Flex({
4141
})
4242
```
4343
44+
> [!note] Overriding behavior
45+
> Components inside `Flex` get an additional CSS class `flex-component` that add the `display: flex` property. If you want to override this behavior, you can add a `display` property to the component's CSS class in your custom CSS file.
46+
>
47+
> ```scss
48+
> .flex-component {
49+
> display: block; // or any other display type
50+
> }
51+
> ```
52+
4453
## `MobileOnly` Component
4554
4655
The `MobileOnly` component is a wrapper that makes its child component only visible on mobile devices. This is useful for creating responsive layouts where certain components should only appear on smaller screens.

quartz/plugins/transformers/frontmatter.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,11 @@ export const FrontMatter: QuartzTransformerPlugin<Partial<Options>> = (userOpts)
109109
const socialImage = coalesceAliases(data, ["socialImage", "image", "cover"])
110110

111111
const created = coalesceAliases(data, ["created", "date"])
112-
if (created) data.created = created
112+
if (created) {
113+
data.created = created
114+
data.modified ||= created // if modified is not set, use created
115+
}
116+
113117
const modified = coalesceAliases(data, [
114118
"modified",
115119
"lastmod",

quartz/plugins/transformers/lastmod.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,17 @@ const defaultOptions: Options = {
1212
priority: ["frontmatter", "git", "filesystem"],
1313
}
1414

15+
// YYYY-MM-DD
16+
const iso8601DateOnlyRegex = /^\d{4}-\d{2}-\d{2}$/
17+
1518
function coerceDate(fp: string, d: any): Date {
19+
// check ISO8601 date-only format
20+
// we treat this one as local midnight as the normal
21+
// js date ctor treats YYYY-MM-DD as UTC midnight
22+
if (typeof d === "string" && iso8601DateOnlyRegex.test(d)) {
23+
d = `${d}T00:00:00`
24+
}
25+
1626
const dt = new Date(d)
1727
const invalidDate = isNaN(dt.getTime()) || dt.getTime() === 0
1828
if (invalidDate && d !== undefined) {

quartz/styles/base.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,10 @@ a {
128128
}
129129
}
130130

131+
.flex-component {
132+
display: flex;
133+
}
134+
131135
.desktop-only {
132136
display: flex;
133137

0 commit comments

Comments
 (0)