Compare commits

..

10 Commits

Author SHA1 Message Date
a572f8e701 Merge branch 'v4' into jpg 2024-05-02 19:53:54 +02:00
3dd1f22428 Change usage CSS: more flexible for styling 2024-05-02 19:46:40 +02:00
10886de473 Update URL 2024-05-02 19:46:21 +02:00
Emmanuel Ferdman
aee9145691
fix: update link to hosting page (#1054)
* fix: update link to hosting page

* chore: update correct path with using alias

---------

Co-authored-by: Aaron Pham <29749331+aarnphm@users.noreply.github.com>
2024-04-27 21:07:26 -07:00
dependabot[bot]
a37c7775e7
chore(deps): bump preact-render-to-string from 6.4.0 to 6.4.2 (#1094)
Bumps [preact-render-to-string](https://github.com/preactjs/preact-render-to-string) from 6.4.0 to 6.4.2.
- [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](https://github.com/preactjs/preact-render-to-string/compare/6.4.0...v6.4.2)

---
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>
2024-04-27 21:04:38 -07:00
iacore
e763e1969e
Allow pnpm quartz (#1078)
Co-authored-by: iacore <noreply+gpg-stub@1a-insec.net>
2024-04-19 13:02:49 -07:00
Lucas-BRT
6a019dae13
fix: unnecessery 'm' letter removed in pt-BR (#1100) 2024-04-16 18:02:59 -07:00
dependabot[bot]
4d73b8289d
chore(deps): bump workerpool from 9.1.0 to 9.1.1 (#1073)
Bumps [workerpool](https://github.com/josdejong/workerpool) from 9.1.0 to 9.1.1.
- [Changelog](https://github.com/josdejong/workerpool/blob/master/HISTORY.md)
- [Commits](https://github.com/josdejong/workerpool/compare/v9.1.0...v9.1.1)

---
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>
2024-04-12 02:33:05 -04:00
dependabot[bot]
8010093df7
chore(deps-dev): bump @types/node from 20.11.29 to 20.12.5 (#1074)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.11.29 to 20.12.5.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  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>
2024-04-12 02:30:21 -04:00
kwyuan
1f032f538b
feat(analytics): PostHog support (#1072) 2024-04-08 18:43:09 -07:00
9 changed files with 45 additions and 31 deletions

View File

@ -29,6 +29,7 @@ This part of the configuration concerns anything that can affect the whole site.
- `{ provider: 'plausible' }` (managed) or `{ provider: 'plausible', host: '<your-plausible-host>' }` (self-hosted): use [Plausible](https://plausible.io/);
- `{ provider: 'umami', host: '<your-umami-host>', websiteId: '<your-umami-website-id>' }`: use [Umami](https://umami.is/);
- `{ 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)
- `{ provider: 'posthog', apiKey: '<your-posthog-project-apiKey>', host: '<your-posthog-host>' }`: use [Posthog](https://posthog.com/);
- `locale`: used for [[i18n]] and date formatting
- `baseUrl`: this is used for sitemaps and RSS feeds that require an absolute URL to know where the canonical 'home' of your site lives. This is normally the deployed URL of your site (e.g. `quartz.jzhao.xyz` for this site). Do not include the protocol (i.e. `https://`) or any leading or trailing slashes.
- This should also include the subpath if you are [[hosting]] on GitHub pages without a custom domain. For example, if my repository is `jackyzha0/quartz`, GitHub pages would deploy to `https://jackyzha0.github.io/quartz` and the `baseUrl` would be `jackyzha0.github.io/quartz`.

View File

@ -8,7 +8,7 @@ This plugin emits a `CNAME` record that points your subdomain to the default dom
If you want to use a custom domain name like `quartz.example.com` for the site, then this is needed.
See [[Hosting]] for more information.
See [[hosting|Hosting]] for more information.
> [!note]
> For information on how to add, remove or configure plugins, see the [[configuration#Plugins|Configuration]] page.

24
package-lock.json generated
View File

@ -33,7 +33,7 @@
"mdast-util-to-string": "^4.0.0",
"micromorph": "^0.4.5",
"preact": "^10.20.1",
"preact-render-to-string": "^6.4.0",
"preact-render-to-string": "^6.4.2",
"pretty-bytes": "^6.1.1",
"pretty-time": "^1.1.0",
"reading-time": "^1.5.0",
@ -62,7 +62,7 @@
"unified": "^11.0.4",
"unist-util-visit": "^5.0.0",
"vfile": "^6.0.1",
"workerpool": "^9.1.0",
"workerpool": "^9.1.1",
"ws": "^8.15.1",
"yargs": "^17.7.2"
},
@ -74,7 +74,7 @@
"@types/d3": "^7.4.3",
"@types/hast": "^3.0.4",
"@types/js-yaml": "^4.0.9",
"@types/node": "^20.11.29",
"@types/node": "^20.12.5",
"@types/pretty-time": "^1.1.5",
"@types/source-map-support": "^0.5.10",
"@types/ws": "^8.5.10",
@ -1170,9 +1170,9 @@
}
},
"node_modules/@types/node": {
"version": "20.11.29",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.29.tgz",
"integrity": "sha512-P99thMkD/1YkCvAtOd6/zGedKNA0p2fj4ZpjCzcNiSCBWgm3cNRTBfa/qjFnsKkkojxu4vVLtWpesnZ9+ap+gA==",
"version": "20.12.5",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.5.tgz",
"integrity": "sha512-BD+BjQ9LS/D8ST9p5uqBxghlN+S42iuNxjsUGjeZobe/ciXzk2qb1B6IXc6AnRLS+yFJRpN2IPEHMzwspfDJNw==",
"dev": true,
"dependencies": {
"undici-types": "~5.26.4"
@ -4705,9 +4705,9 @@
}
},
"node_modules/preact-render-to-string": {
"version": "6.4.0",
"resolved": "https://registry.npmjs.org/preact-render-to-string/-/preact-render-to-string-6.4.0.tgz",
"integrity": "sha512-pzDwezZaLbK371OiJjXDsZJwVOALzFX5M1wEh2Kr0pEApq5AV6bRH/DFbA/zNA7Lck/duyREPQLLvzu2G6hEQQ==",
"version": "6.4.2",
"resolved": "https://registry.npmjs.org/preact-render-to-string/-/preact-render-to-string-6.4.2.tgz",
"integrity": "sha512-Sio5SvlyZSAXHuvnMgYzVQd67lNIuQe4uSjJ+2gfpJNC6L8zoHQR5xV7B/EjIqrAYWVyJ2eACkTCxVrIzZi6Vw==",
"dependencies": {
"pretty-format": "^3.8.0"
},
@ -6325,9 +6325,9 @@
"integrity": "sha512-Gd9+TUn5nXdwj/hFsPVx5cuHHiF5Bwuc30jZ4+ronF1qHK5O7HD0sgmXWSEgwKquT3ClLoKPVbO6qGwVwLzvAw=="
},
"node_modules/workerpool": {
"version": "9.1.0",
"resolved": "https://registry.npmjs.org/workerpool/-/workerpool-9.1.0.tgz",
"integrity": "sha512-+wRWfm9yyJghvXLSHMQj3WXDxHbibHAQmRrWbqKBfy0RjftZNeQaW+Std5bSYc83ydkrxoPTPOWVlXUR9RWJdQ=="
"version": "9.1.1",
"resolved": "https://registry.npmjs.org/workerpool/-/workerpool-9.1.1.tgz",
"integrity": "sha512-EFoFTSEo9m4V4wNrwzVRjxnf/E/oBpOzcI/R5CIugJhl9RsCiq525rszo4AtqcjQQoqFdu2E3H82AnbtpaQHvg=="
},
"node_modules/wrap-ansi": {
"version": "8.1.0",

View File

@ -12,6 +12,7 @@
"url": "https://github.com/jackyzha0/quartz.git"
},
"scripts": {
"quartz": "./quartz/bootstrap-cli.mjs",
"docs": "npx quartz build --serve -d docs",
"check": "tsc --noEmit && npx prettier . --check",
"format": "npx prettier . --write",
@ -58,7 +59,7 @@
"mdast-util-to-string": "^4.0.0",
"micromorph": "^0.4.5",
"preact": "^10.20.1",
"preact-render-to-string": "^6.4.0",
"preact-render-to-string": "^6.4.2",
"pretty-bytes": "^6.1.1",
"pretty-time": "^1.1.0",
"reading-time": "^1.5.0",
@ -87,7 +88,7 @@
"unified": "^11.0.4",
"unist-util-visit": "^5.0.0",
"vfile": "^6.0.1",
"workerpool": "^9.1.0",
"workerpool": "^9.1.1",
"ws": "^8.15.1",
"yargs": "^17.7.2"
},
@ -96,7 +97,7 @@
"@types/d3": "^7.4.3",
"@types/hast": "^3.0.4",
"@types/js-yaml": "^4.0.9",
"@types/node": "^20.11.29",
"@types/node": "^20.12.5",
"@types/pretty-time": "^1.1.5",
"@types/source-map-support": "^0.5.10",
"@types/ws": "^8.5.10",

View File

@ -15,7 +15,7 @@ const config: QuartzConfig = {
provider: "plausible",
},
locale: "en-US",
baseUrl: "jpg.marchal.dev",
baseUrl: "jp.marchal.dev",
ignorePatterns: ["private", "templates", ".obsidian"],
defaultDateType: "created",
theme: {

View File

@ -25,6 +25,11 @@ export type Analytics =
host?: string
scriptSrc?: string
}
| {
provider: "posthog"
apiKey: string
host?: string
}
export interface GlobalConfiguration {
pageTitle: string

View File

@ -69,7 +69,7 @@ export default {
folderContent: {
folder: "Arquivo",
itemsUnderFolder: ({ count }) =>
count === 1 ? "1 item mneste arquivo." : `${count} items neste arquivo.`,
count === 1 ? "1 item neste arquivo." : `${count} items neste arquivo.`,
},
tagContent: {
tag: "Tag",

View File

@ -129,6 +129,13 @@ function addGlobalPageResources(ctx: BuildCtx, componentResources: ComponentReso
"https://${cfg.analytics.websiteId}.${cfg.analytics.host ?? "goatcounter.com"}/count")
document.head.appendChild(goatcounterScript)
`)
} else if (cfg.analytics?.provider === "posthog") {
componentResources.afterDOMLoaded.push(`
const posthogScript = document.createElement("script")
posthogScript.innerHTML= \`!function(t,e){var o,n,p,r;e.__SV||(window.posthog=e,e._i=[],e.init=function(i,s,a){function g(t,e){var o=e.split(".");2==o.length&&(t=t[o[0]],e=o[1]),t[e]=function(){t.push([e].concat(Array.prototype.slice.call(arguments,0)))}}(p=t.createElement("script")).type="text/javascript",p.async=!0,p.src=s.api_host+"/static/array.js",(r=t.getElementsByTagName("script")[0]).parentNode.insertBefore(p,r);var u=e;for(void 0!==a?u=e[a]=[]:a="posthog",u.people=u.people||[],u.toString=function(t){var e="posthog";return"posthog"!==a&&(e+="."+a),t||(e+=" (stub)"),e},u.people.toString=function(){return u.toString(1)+".people (stub)"},o="capture identify alias people.set people.set_once set_config register register_once unregister opt_out_capturing has_opted_out_capturing opt_in_capturing reset isFeatureEnabled onFeatureFlags getFeatureFlag getFeatureFlagPayload reloadFeatureFlags group updateEarlyAccessFeatureEnrollment getEarlyAccessFeatures getActiveMatchingSurveys getSurveys onSessionId".split(" "),n=0;n<o.length;n++)g(u,o[n]);e._i.push([i,s,a])},e.__SV=1)}(document,window.posthog||[]);
posthog.init('${cfg.analytics.apiKey}',{api_host:'${cfg.analytics.host ?? "https://app.posthog.com"}'})\`
document.head.appendChild(posthogScript)
`)
}
if (cfg.enableSPA) {

View File

@ -143,6 +143,19 @@ footer {
margin-top: 0.5rem;
}
.usage .p {
margin:0;
}
.usage .box {
border: 1px solid var(--darkgray);
border-radius: 0.5rem;
padding: 0.2rem 0.3rem 0.2rem 0.3rem;
display: inline-block;
width: fit-content;
margin: 0.2rem;
}
.usage .left {
padding-right: 1.7rem;
@ -155,19 +168,6 @@ footer {
border-width: 0 2px;
}
.usage .left .box {
border: 1px solid var(--darkgray);
border-radius: 0.5rem;
padding: 0.2rem 0.3rem 0.2rem 0.3rem;
display: inline-block;
width: fit-content;
margin: 0.2rem;
}
.usage .left p {
margin:0;
}
.usage .right {
padding-left: 1rem;
}