Skip to content

Commit

Permalink
Revert "feat: Making Quartz available offline by making it a PWA (jac…
Browse files Browse the repository at this point in the history
…kyzha0#465)"

This reverts commit d6301fa.
  • Loading branch information
jackyzha0 committed Sep 20, 2023
1 parent 70e029d commit 6a9e635
Show file tree
Hide file tree
Showing 13 changed files with 6 additions and 235 deletions.
2 changes: 0 additions & 2 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,10 @@ const config: QuartzConfig = {
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.
Expand Down
31 changes: 0 additions & 31 deletions docs/features/offline access.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ This will guide you through initializing your Quartz with content. Once you've d
## 🔧 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
Expand Down
9 changes: 4 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
"@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",
Expand Down
1 change: 0 additions & 1 deletion quartz.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import * as Plugin from "./quartz/plugins"
const config: QuartzConfig = {
configuration: {
pageTitle: "🪴 Quartz 4.0",
description: "Quartz Documentation Page and Demo",
enableSPA: true,
enablePopovers: true,
analytics: {
Expand Down
1 change: 0 additions & 1 deletion quartz/cfg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ export type 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 */
Expand Down
4 changes: 0 additions & 4 deletions quartz/components/Head.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ export default (() => {

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>
Expand All @@ -27,9 +25,7 @@ export default (() => {
{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" />
Expand Down
12 changes: 0 additions & 12 deletions quartz/components/pages/OfflineFallbackPage.tsx

This file was deleted.

5 changes: 0 additions & 5 deletions quartz/plugins/emitters/componentResources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,6 @@ function addGlobalPageResources(
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) {
Expand Down
1 change: 0 additions & 1 deletion quartz/plugins/emitters/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@ export { Assets } from "./assets"
export { Static } from "./static"
export { ComponentResources } from "./componentResources"
export { NotFoundPage } from "./404"
export { Offline } from "./offline"
97 changes: 0 additions & 97 deletions quartz/plugins/emitters/offline.ts

This file was deleted.

74 changes: 0 additions & 74 deletions quartz/static/icon.svg

This file was deleted.

0 comments on commit 6a9e635

Please sign in to comment.