mirror of
https://github.com/jackyzha0/quartz
synced 2026-11-30 22:44:41 +01:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c33b6cfc48 |
No files matched your search
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@jackyzha0/quartz": patch
|
||||
---
|
||||
|
||||
@quartz-community/graph 1.0.5: the graph scales to large sites. On 3,000 notes and 33,000 links, the global graph opens in 0.5 s instead of 2.5 s, and it stops using the CPU once its layout settles. It also loads d3 and PixiJS as pinned, integrity-checked versions, with PixiJS's minified build (200 KB instead of 2.5 MB on every page).
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"@jackyzha0/quartz": patch
|
||||
---
|
||||
|
||||
Component styles are one stylesheet (`component-<hash>.css`, in the `quartz-base` layer as before) instead of one per component. Pages load about 20 fewer render-blocking stylesheets (29 to 11 on the docs site), and the styles they compute are unchanged.
|
||||
Generated
+4
-4
@@ -34,7 +34,7 @@
|
||||
"@quartz-community/folder-page": "^1.1.0",
|
||||
"@quartz-community/footer": "^1.1.1",
|
||||
"@quartz-community/github-flavored-markdown": "^2.1.1",
|
||||
"@quartz-community/graph": "^1.0.4",
|
||||
"@quartz-community/graph": "^1.0.5",
|
||||
"@quartz-community/hard-line-breaks": "^1.1.0",
|
||||
"@quartz-community/latex": "^1.1.0",
|
||||
"@quartz-community/note-properties": "^1.2.0",
|
||||
@@ -2734,9 +2734,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@quartz-community/graph": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/@quartz-community/graph/-/graph-1.0.4.tgz",
|
||||
"integrity": "sha512-h0tijZqaxhmq3R8c7BtFV8RE3Mvoki8RjHQgYk/owyyzVJKSuHoyB5qXp889hk0rbpeiWajP32unEaumfPxuMQ==",
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/@quartz-community/graph/-/graph-1.0.5.tgz",
|
||||
"integrity": "sha512-rkz9dbltHRVYOFGDiyDKroLWwuaax6GjpBwCmR7qsMP2YIsfsHupGnz11CR4hY9LF+CaIPyscM9vKl7KN62x1Q==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@quartz-community/types": "^1.0.0",
|
||||
|
||||
+1
-1
@@ -64,7 +64,7 @@
|
||||
"@quartz-community/folder-page": "^1.1.0",
|
||||
"@quartz-community/footer": "^1.1.1",
|
||||
"@quartz-community/github-flavored-markdown": "^2.1.1",
|
||||
"@quartz-community/graph": "^1.0.4",
|
||||
"@quartz-community/graph": "^1.0.5",
|
||||
"@quartz-community/hard-line-breaks": "^1.1.0",
|
||||
"@quartz-community/latex": "^1.1.0",
|
||||
"@quartz-community/note-properties": "^1.2.0",
|
||||
|
||||
@@ -430,13 +430,11 @@ export const ComponentResources: QuartzEmitterPlugin = () => {
|
||||
include: Features.MediaQueries,
|
||||
}).code.toString()
|
||||
|
||||
// All component styles go into one stylesheet, in their order, in one
|
||||
// `quartz-base` layer: a file per component meant ~20 render-blocking
|
||||
// requests per page, many for a few hundred bytes.
|
||||
const cssStringToFilename = new Map<string, string>()
|
||||
const componentCss = [...componentResources.componentCssStrings]
|
||||
if (componentCss.length > 0) {
|
||||
const wrapped = `@layer quartz-base {\n${componentCss.join("\n")}\n}`
|
||||
for (const cssString of componentResources.componentCssStrings) {
|
||||
if (cssStringToFilename.has(cssString)) continue
|
||||
|
||||
const wrapped = `@layer quartz-base {\n${cssString}\n}`
|
||||
const minified = transform({
|
||||
filename: "component.css",
|
||||
code: Buffer.from(wrapped),
|
||||
@@ -448,7 +446,7 @@ export const ComponentResources: QuartzEmitterPlugin = () => {
|
||||
const hash = hashContent(minified)
|
||||
const slug = `component-${hash}`
|
||||
const filename = `${slug}.css`
|
||||
for (const cssString of componentCss) cssStringToFilename.set(cssString, filename)
|
||||
cssStringToFilename.set(cssString, filename)
|
||||
|
||||
yield write({
|
||||
ctx,
|
||||
|
||||
Reference in new issue
Block a user