Revert "feat: Making Quartz available offline by making it a PWA (#465)"
This reverts commit d6301fae90d9f922618bf0f413e273156731eef7.
4 files deleted
9 files modified
| | |
| | | This part of the configuration concerns anything that can affect the whole site. The following is a list breaking down all the things you can configure: |
| | | |
| | | - `pageTitle`: title of the site. This is also used when generating the [[RSS Feed]] for your site. |
| | | - `description`: description of the site. This will be used when someone installs your site as an App. |
| | | - `enableSPA`: whether to enable [[SPA Routing]] on your site. |
| | | - `enablePopovers`: whether to enable [[popover previews]] on your site. |
| | | - `analytics`: what to use for analytics on your site. Values can be |
| | | - `null`: don't use analytics; |
| | | - `{ provider: "umami", websiteId: <your-umami-id> }`: easy, privacy-friendly, open source, GDPR Compliant analytics; |
| | | - `{ provider: 'plausible' }`: use [Plausible](https://plausible.io/), a privacy-friendly alternative to Google Analytics; or |
| | | - `{ provider: 'google', tagId: <your-google-tag> }`: use Google Analytics |
| | | - `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. |
| | |
| | | |
| | | ## 🔧 Features |
| | | |
| | | - [[Obsidian compatibility]], [[full-text search]], [[graph view]], note transclusion, [[wikilinks]], [[backlinks]], [[Latex]], [[syntax highlighting]], [[popover previews]], [[offline access]] and [many more](./features) right out of the box |
| | | - [[Obsidian compatibility]], [[full-text search]], [[graph view]], note transclusion, [[wikilinks]], [[backlinks]], [[Latex]], [[syntax highlighting]], [[popover previews]], and [many more](./features) right out of the box |
| | | - Hot-reload for both configuration and content |
| | | - Simple JSX layouts and [[creating components|page components]] |
| | | - [[SPA Routing|Ridiculously fast page loads]] and tiny bundle sizes |
| | |
| | | "@types/flexsearch": "^0.7.3", |
| | | "@types/hast": "^2.3.4", |
| | | "@types/js-yaml": "^4.0.5", |
| | | "@types/node": "^20.6.2", |
| | | "@types/node": "^20.1.2", |
| | | "@types/pretty-time": "^1.1.2", |
| | | "@types/source-map-support": "^0.5.6", |
| | | "@types/workerpool": "^6.4.0", |
| | |
| | | }, |
| | | "node_modules/@clack/prompts/node_modules/is-unicode-supported": { |
| | | "version": "1.3.0", |
| | | "extraneous": true, |
| | | "inBundle": true, |
| | | "license": "MIT", |
| | | "engines": { |
| | |
| | | } |
| | | }, |
| | | "node_modules/@types/node": { |
| | | "version": "20.6.2", |
| | | "resolved": "https://registry.npmjs.org/@types/node/-/node-20.6.2.tgz", |
| | | "integrity": "sha512-Y+/1vGBHV/cYk6OI1Na/LHzwnlNCAfU3ZNGrc1LdRe/LAIbdDPTTv/HU3M7yXN448aTVDq3eKRm2cg7iKLb8gw==", |
| | | "version": "20.3.3", |
| | | "resolved": "https://registry.npmjs.org/@types/node/-/node-20.3.3.tgz", |
| | | "integrity": "sha512-wheIYdr4NYML61AjC8MKj/2jrR/kDQri/CIpVoZwldwhnIrD/j9jIU5bJ8yBKuB2VhpFV7Ab6G2XkBjv9r9Zzw==", |
| | | "dev": true |
| | | }, |
| | | "node_modules/@types/parse5": { |
| | |
| | | "@types/flexsearch": "^0.7.3", |
| | | "@types/hast": "^2.3.4", |
| | | "@types/js-yaml": "^4.0.5", |
| | | "@types/node": "^20.6.2", |
| | | "@types/node": "^20.1.2", |
| | | "@types/pretty-time": "^1.1.2", |
| | | "@types/source-map-support": "^0.5.6", |
| | | "@types/workerpool": "^6.4.0", |
| | |
| | | const config: QuartzConfig = { |
| | | configuration: { |
| | | pageTitle: "🪴 Quartz 4.0", |
| | | description: "Quartz Documentation Page and Demo", |
| | | enableSPA: true, |
| | | enablePopovers: true, |
| | | analytics: { |
| | |
| | | |
| | | export interface GlobalConfiguration { |
| | | pageTitle: string |
| | | description: string |
| | | /** Whether to enable single-page-app style rendering. this prevents flashes of unstyled content and improves smoothness of Quartz */ |
| | | enableSPA: boolean |
| | | /** Whether to display Wikipedia-style popovers when hovering over links */ |
| | |
| | | |
| | | const iconPath = joinSegments(baseDir, "static/icon.png") |
| | | const ogImagePath = `https://${cfg.baseUrl}/static/og-image.png` |
| | | const manifest = |
| | | cfg.baseUrl == undefined ? "/manifest.json" : `https://${cfg.baseUrl}/manifest.json` |
| | | |
| | | return ( |
| | | <head> |
| | |
| | | {cfg.baseUrl && <meta property="og:image" content={ogImagePath} />} |
| | | <meta property="og:width" content="1200" /> |
| | | <meta property="og:height" content="675" /> |
| | | <meta name="theme-color" content="#faf8f8" /> |
| | | <link rel="icon" href={iconPath} /> |
| | | <link rel="manifest" href={manifest} /> |
| | | <meta name="description" content={description} /> |
| | | <meta name="generator" content="Quartz" /> |
| | | <link rel="preconnect" href="https://fonts.googleapis.com" /> |
| | |
| | | document.dispatchEvent(event)`) |
| | | } |
| | | |
| | | componentResources.afterDOMLoaded.push(` |
| | | if ('serviceWorker' in navigator) { |
| | | navigator.serviceWorker.register('/sw.js'); |
| | | }`) |
| | | |
| | | let wsUrl = `ws://localhost:${ctx.argv.wsPort}` |
| | | |
| | | if (ctx.argv.remoteDevHost) { |
| | |
| | | export { Static } from "./static" |
| | | export { ComponentResources } from "./componentResources" |
| | | export { NotFoundPage } from "./404" |
| | | export { Offline } from "./offline" |