Commit Graph

288 Commits

Author SHA1 Message Date
Corey 2ba1e30532 fixed upstream update, have breadcrumbs now 2023-10-25 14:49:50 -04:00
Corey e66f1edb83 Merge branch 'v4' of https://github.com/jackyzha0 2023-10-25 14:14:44 -04:00
Jacky Zhao 01fc8e4640 fix: disable semi-broken flexsearch cache 2023-10-25 09:40:43 -07:00
Jacky Zhao 7c01e8dde0 feat: openLinksInNewTab option for link transformer 2023-10-22 09:54:12 -07:00
Jacky Zhao b7ae7a99db fix: styling for nested popover tag in page list 2023-10-21 21:12:11 -07:00
Jacky Zhao 60b3bc34cb fix: catch html to jsx errors (closes #547) 2023-10-21 21:06:02 -07:00
Jacky Zhao dc834015d0 fix(style): tag float orientation for long tags on page listing 2023-10-21 21:06:02 -07:00
Jacky Zhao 1e357ef5ac fix(style): prioritize base and custom scss over component css 2023-10-21 21:06:02 -07:00
Jacky Zhao af9ddadc4d
fix(css): import base from custom instead of the other way around (#536) 2023-10-14 13:45:56 -07:00
Jacky Zhao f66d2c23ac fix: ctrl+click with spa enabled 2023-10-08 09:15:06 -07:00
Jacky Zhao 3268d45a20 css: make article relative 2023-10-05 13:48:52 -07:00
Jacky Zhao afa163f2fe
style: styling for codeblocks without langs (#527) 2023-10-05 13:30:06 -07:00
Ben Schlegel cec4877adb
fix(breadcrumbs): problem with folder whitespace (#522)
* fix(breadcrumbs): problem with folder whitespace

use slugs for folder hrefs so folder paths get resolved properly

* feat: only use `slug` for constructing crumbs

* fix: remove capitalization
2023-10-05 09:19:56 -07:00
Luca Salvarani c8f5dbbad3
fix: Fix `Backlinks` not applying the display class (#519)
* fix: Fix `Backlinks` not applying the display class

Fix #518

* fix: Apply `displayClass` to all layout components

* refactor: Use same style

* fix: Remove `undefined` class using coalescing operator
2023-10-01 17:20:55 -07:00
bfahrenfort ab5efac75f
Fix: RSS title escaping (#521)
* Fix title escaping

* npm run format
2023-10-01 09:47:22 -07:00
Hrishikesh Barman 2f99339dcf
feat: add transformations for latex in oxhugofm (#510)
ox-hugo currently supports the following syntax for latex equations:
- https://orgmode.org/manual/LaTeX-fragments.html
- https://ox-hugo.scripter.co/doc/equations

This syntax is supported by mathjax as is mentioned in the ox-hugo documentation.

But quartz uses remark-math which has some issues with the \( \) syntax.
See https://github.com/remarkjs/remark-math/issues/39

This change adds few more transformations to the OxHugoFlavouredMarkdown
plugin, which makes a best effort conversion of this syntax into what
the Quartz Latex transformer plugin supports.

With these changes, the generated files show latex formatting with
default quartz configuration.

Sidenote on `\_` escape by ox-hugo:

ox-hugo escapes, _ using \_, we match against it after we transform
equations into what quartz supports($$ and $).

This could be achieved using lookaround like regex as follows
```js
(?<=(\$|\$\$)[\s\S]*) -> Positive lookbehind for $ or $$
\\_ -> Matches \_
(?=[\s\S]*(?:\1)) Positive lookahead for $ or $$ if matched
const escapedUnderscoreRegex = new RegExp(/(?<=(\$|\$\$)[\s\S]*)\\_(?=[\s\S]*(?:\1))/, "g")
````

But since lookahead/behind can slow things down on large files, we just
look up all equations with $ and $$ delimiters and then try replacing \_
2023-09-29 11:35:26 -07:00
ArtfulAzeria 5232d09af5
feat: Better and more responsive tag behavior (#515)
* fix(explorer): default sortFn implementation (#511)

* fix: use `numeric` + `base` for localeCompare

* docs(explorer): update default sortFn

* fix: better and more responsive tag behavior

* tags css moved to TagList.tsx

* used npm run format

* merged tag declarations

---------

Co-authored-by: Ben Schlegel <31989404+benschlegel@users.noreply.github.com>
2023-09-29 11:17:48 -07:00
Ben Schlegel 0b61f6fbfd
feat: implement breadcrumb component (#508)
* feat: implement breadcrumbs

* style: fix styling, move breadcrumbs to top

* refactor: move `capitalize to `lang.ts``

* refactor: clean breadcrumb generation

* feat: add options to breadcrumbs

* feat: implement `resolveFrontmatterTitle`

* feat: add `hideOnRoot` option

* feat(consistency): capitalize every crumb

* style: add `flex-wrap` to parent container

* refactor: clean `Breadcrumbs.tsx`

* feat(accessibility): use `nav`, add aria label

* style: improve look in popovers by adding margin

* docs: write docs for breadcrumb component

* refactor: collapse `if` condition for hideOnRoot

* chore: add todo for perf optimization

* docs: update introduction
2023-09-29 10:26:15 +02:00
Ben Schlegel d4c122646c
fix(explorer): default sortFn implementation (#511)
* fix: use `numeric` + `base` for localeCompare

* docs(explorer): update default sortFn
2023-09-28 08:39:44 -07:00
Jacky Zhao d22c3c107a fix: coerce title to string 2023-09-25 18:15:55 -07:00
Corey bd2a3e84be
Update quartz version (#6)
* fix: async-mutex not exclusively locking correectly

* fix: server-handler crash from filename (closes #386)

* fix: typo in bootstrap-cli.mjs (#394)

* fixed broken CJK links (#390)

* fix: spa hijacks back button (closes #400)

* fix: tag support for non-latin alphabets (fixes #398)

* fix: properly lock across source and content refresh by sharing a mutex

* fix: toc for cyrillic and other non-latin alphabets (closes #396)

* fix: percent-encoding for files with %, contentIndex for non-latin chars (closes #397, closes #399)

* version bump to 4.0.9

* fix(esbuild): conflict with esbuild-sass-plugin (#402)

* deps: esbuild and esbuild-sass-plugin

* deps: install exact

* deps: native addons for lightningcss

* fix: builds should no accumulate on repeated changes (closes #404)

* Fix #403 by moving documentation to separate directory to avoid merge conflicts (#405)

* fix: use proper full base for links.ts

* docs: make incompability of trailing slashes clear

* fix: text wrap in popover

* docs: update `hosting.md` with Vercel hosting instructions (#406)

* Update hosting.md with Vercel hosting instructions

* Update docs/hosting.md

Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>

* Update docs/hosting.md

Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>

* Run npm run format

---------

Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>

* format

* Revert contentIndex to RSS 2.0 (#407)

* docs: fix typo in `authoring content.md` (#408)

* fix: lock to never read when site is building

* feat: add defaultDateType config

* version bump to 4.0.10

* fix: add better warning when defaultDateType is not set due to upgrade

* fix: ensure recentnotes uses proper date

* format

* feat: reproducible build (#412)

for sitemap, RSS and contentIndex.json.

* style: integrate tertiary color to text-select (#413)

* format, ensure ci runs on prs

* feat(plugins): add toml support for frontmatter (#418)

* feat(plugins): add toml support for frontmatter

Currently frontmatter is expected to be yaml, with delimiter set to
"---". This might not always be the case, for example ox-hugo(a hugo
exporter for org-mode files) exports in toml format with the delimiter
set to "+++" by default.

With this change, the users will be able use frontmatter plugin to
support this toml frontmatter format.

Example usage: `Plugin.FrontMatter({delims: "+++", language: 'toml'})`

- [0] https://ox-hugo.scripter.co/doc/org-meta-data-to-hugo-front-matter/

* fixup! feat(plugins): add toml support for frontmatter

* feat(plugins): add OxHugoFlavouredMarkdown (#419)

* feat(plugins): add OxHugoFlavouredMarkdown

ox-hugo is an org exporter backend that exports org files to
hugo-compatible markdown in an opinionated way. This plugin adds some
tweaks to the generated markdown to make it compatible with quartz but
the list of changes applied it is not extensive.

In the future however, we could leapfrog ox-hugo altogether and
create a quartz site directly out of org-roam files. That way we won't
have to do all the ritual dancing that this plugin has to perform.
See https://github.com/k2052/org-to-markdown

* fix: add toml to remarkFrontmatter configuration

* docs: add docs for OxHugoFlavouredMarkdown

* fixup! docs: add docs for OxHugoFlavouredMarkdown

* docs: simplify oxhugo page

* style: fix mulitline callout styling

* feat: support CLI arguments for `npx quartz create` (#421)

* feat(cli): add new args for content + link resolve

* feat(cli): validate cmd args

* feat(cli): add chalk + error code to errors

* feat(cli): support for setup/link via args

* refactor(cli): use yargs choices instead of manual

Scrap manual check if arguments are valid, use yargs "choices" field instead.

* feat(cli): add in-dir argument+ handle errors

add new "in-directory" argument, used if "setup" is "copy" or "symlink" to determine source. add error handling for invalid permutations of arguments or non existent path

* feat(cli): dynamically use cli or provided args

use "in-directory" arg as `originalFolder` if available, otherwise get it from manual cli process

* run format

* fix: use process.exit instead of return

* refactor: split CommonArgv and CreateArgv

* refactor(cli): rename create args, use ${} syntax

* fix(cli): fix link resolution strategy arg

* format

* feat(consistency): allow partial cmd args

* Fix search bar after navigate (#424)

* fix: slugify tag on page before adding (closes #411)

* cleanup: rework cli to allow invoking create and build outside of cli (#428)

* refactor: move `bootstrap-cli.mjs` tp cli

also update reference in docs

* refactor(cli): move build handler to `cli-functions`

* refactor(cli): move create to handler + helpers

* refactor(cli): extract arg definitions

* refactor: rename handlers and helpers

* refactor(cli): move update, await handlers

* refactor(cli): create constants, migrate to helpers

* refactor(cli): migrate `restore`

* refactor(cli): migrate `sync`

* format

* refactor(cli): remove old imports/functions

* refactor(cli): remove unused imports + format

* chore: remove old log statement

* fix: fix imports, clean duplicate code

* fix: relative import

* fix: simplified cacheFile path

* fix: update cacheFile import path

* refactor: move bootstrap-cli to quartz

* format

* revert: revert path to bootstrap-cli

* ci: re-run

* ci: fix  execution permission

* feat: support configurable ws port and remote development (#429)

Co-authored-by: Jeremy Press <jeremy@replit.com>
Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>

* Fix typo :) (#430)

* fix: correct graph labels for `index.md` nodes (#431)

* feat: support kebab-case and nested tags in Obsidian-flavored Markdown tag-in-content parsing (#425)

* enhancement: support kebab-case and nested tags in ofm transformer

* update regex/capture groups to allow for (arbitrarily) nested values and tags of only -/_

* Update quartz/plugins/transformers/ofm.ts

---------

Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>

* fix: aliasredirects not using full path, add permalink support

* fix: regex for matching highlights (closes #437) (#438)

* fix:  regex for matching highlights

* fix: regex for empty highlights

* Adds Pelayo Arbues to showcase (#435)

* feat: Implement search for tags (#436)

* Quartz sync: Aug 29, 2023, 10:17 PM

* style: add basic style to tags in search

* feat: add SearchType + tags to search preview

* feat: support multiple matches

* style(search): add style to matching tags

* feat(search): add content to preview for tag search

* fix: only display tags on tag search

* feat: support basic + tag search

* refactor: extract common `fillDocument`, format

* feat: add hotkey to search for tags

* chore: remove logs

* fix: dont render empty `<ul>` if tags not present

* fix(search-tag): make case insensitive

* refactor: clean `hideSearch` and `showSearch`

* feat: trim content similar to `description.ts`

* fix(search-tag): hotkey for windows

* perf: re-use main index for tag search

* fix(search): matches getting highlighted in title (#440)

* feat: pluralize things in lists

* fix: clipboard button visible in search (#445)

* feat(search): add arrow key navigation (#442)

* feat(search): add arrow navigation

* chore: format

* refactor: simplify arrow navigation

* chore: remove comment

* feat: rework arrow navigation to work without state

* feat: make pressing enter work with arrow navigation

* fix: remove unused css class

* chore: correct comment

* refactor(search): use optional chaining

* feat(analytics): Support for Umami (#449)

* docs: Make it clearer that wikilinks go to paths not page titles (#448)

* docs: update `full-text-search.md` (#447)

* fix: dont transform external links

* feat: 404 page emitter

* docs: correct field for ignorePatterns

* fix: encodeuri for slugs in rss

* fix: escape encoding for titles in rss

* fix: links to index not showing in graph (closes #450)

* typo (it's draft, not drafts) (#456)

* fix: more lenient date parsing for templates

* feat: plugin for remark-breaks (#467)

* feat: plugin for remark-breaks

* fix: update package-lock.json

* fix: styling

Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>

* Update linebreaks.ts

* Update index.ts

---------

Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>

* fix: callout parsing (#469)

* feat: rss limit (closes #459)

* fix: 404 page styling for nested pages (closes #458)

* feat: rich html rss (closes #460)

* feat: resolve block references in obsidian markdown

* fix dont show html in search when rssFullHtml is true (closes #474)

* feat: note transclusion (#475)

* basic transclude

* feat: note transclusion

* feat: display tag in graph view (#466)

* feat: tags in graph view

* fix: revert changing graph forces

* fix: run prettier

* feat: implement file explorer component (closes #201) (#452)

* feat: add basic explorer structure„

* feat: integrate new component/plugin

* feat: add basic explorer structure

* feat: add sort to FileNodes

* style: improve style for explorer

* refactor: remove unused explorer plugin

* refactor: clean explorer structure, fix base (toc)

* refactor: clean css, respect displayClass

* style: add styling to chevron

* refactor: clean up debug statements

* refactor: remove unused import

* fix: clicking folder icon sometimes turns invisible

* refactor: clean css

* feat(explorer): add config for title

* feat: add config for folder click behavior

* fix: `no-pointer` not being set for all elements

new approach, have one `no-pointer` class, that removes pointer events and one `clickable` class on the svg and button (everything that can normally be clicked). then, find all children with `clickable` and toggle `no-pointer`

* fix: bug where nested folders got incorrect height

this fixes the bug where nested folders weren't calculating their total height correctly. done by adding class to main container of all children and calculating total

* feat: introduce `folderDefaultState` config

* feat: store depth for explorer nodes

* feat: implement option for collapsed state + bug fixes

folderBehavior: "link" still has bad styling, but major bugs with pointers fixed (not clean yet, but working)

* fix: default folder icon rotation

* fix: hitbox problem with folder links, fix style

* fix: redirect url for nested folders

* fix: inconsistent behavior with 'collapseFolders' opt

* chore: add comments to `ExplorerNode`

* feat: save explorer state to local storage (not clean)

* feat: rework `getFolders()`, fix localstorage read + write

* feat: set folder state from localStorage

needs serious refactoring but functional (except folder icon orientation)

* fix: folder icon orientation after local storage

* feat: add config for `useSavedState`

* refactor: clean `explorer.inline.ts`

remove unused functions, comments, unused code, add types to EventHandler

* refactor: clean explorer

merge `isSvg` paths, remove console logs

* refactor: add documentation, remove unused funcs

* feat: rework folder collapse logic

use grids instead of jank scuffed solution with calculating total heights

* refactor: remove depth arg from insert

* feat: restore collapse functionality to clicks

allow folder icon + folder label to collapse folders again

* refactor: remove `pointer-event` jank

* feat: improve svg viewbox + remove unused props

* feat: use css selector to toggle icon

rework folder icon to work purely with css instead of JS manipulation

* refactor: remove unused cfg

* feat: move TOC to right sidebar

* refactor: clean css

* style: fix overflow + overflow margin

* fix: use `resolveRelative` to resolve file paths

* fix: `defaultFolderState` config option

* refactor: rename import, rename `folderLi` + ul

* fix: use `QuartzPluginData` type

* docs: add explorer documentation

* fix: use git dates by default, @napi/git is fast enough

* Revert "fix: use git dates by default, @napi/git is fast enough"

This reverts commit 5dcb7e83fc.

* fix: umami analytics date attribute (#477)

* fix: darkmode scroll bars (#480)

* fix(slug): Handle question mark (#481)

* feat(explorer): add config to support custom sort fn

* feat: implement filter function for explorer

* fix: use correct import for `QuartzPluginData`

* feat(explorer): integrate filter option

* feat(explorer): implement `map` fn argument

Add a function for mapping over all FileNodes as an option for `Explorer`

* fix: create deep copy of file passed into tree

* feat: black magic

add config for `order` array, which determines the order in which all passed config functions for explorer will get executed in.

functions will now dynamically be called on `fileTree` via array accessor (e.g. fileTree["sort"].call(...)) with corresponding function from options being passed to call)

* fix: display name for file nodes

* fix(explorer): filter function in `ExplorerNode`

* docs(explorer): write docs for new features

* docs: fix intra page links

* docs: fix examples

* fix: bad visibility for last explorer item (#478)

* fix: bad visibility for last explorer item

* feat(explorer): add pseudo element for observer

* docs: fix explorer example (#483)

* feat: support changes in system theme (#484)

* feat: support changes in system theme

* fix: run prettier

* fix: add content/.gitkeep

* fix(nit): make defaultOptions on explorer not a function

* fix: tag regex no longer includes purely numerical 'tags' (#485)

* fix: tag regex no longer includes purely numerical 'tags'

* fix: formatting

* fix: use guard in findAndReplace() instead of expanding the regex

* feat: Making Quartz available offline by making it a PWA (#465)

* Adding PWA and chaching for offline aviability

* renamed workbox config to fit Quartz' scheme

* Documenting new configuration

* Added missig umami documentation

* Fixed formatting so the build passes, thank you prettier :)

* specified caching strategies to improve performance

* formatting...

* fixing "404 manifest.json not found" on subdirectories by adding a / to manifestpath

* turning it into a plugin

* Removed Workbox-cli and updated @types/node

* Added Serviceworkercode to offline.ts

* formatting

* Removing workbox from docs

* applied suggestions

* Removed path.join for sw path

Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>

* Removed path.join for manifest path

Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>

* Removing path module import

* Added absolute path to manifests start_url and manifest "import" using baseUrl

* Adding protocol to baseurl

Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>

* Adding protocol to start_url too then

* formatting...

* Adding fallback page

* Documenting offline plugin

* formatting...

* merge suggestion

Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>

* merge suggestion

Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>

* merge suggestion

Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>

* merge suggestion

Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>

* merge suggestion

Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>

* merge suggestion

Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>

* merge suggestion

Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>

* merge suggestion

Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>

* merge suggestion

Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>

* merge suggestion

Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>

* merge suggestion

Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>

* merge suggestion

Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>

* formatting...

* Fixing manifest path, all these nits hiding the actual issues .-.

* Offline fallback page through plugins, most things taken from 404 Plugin

* adding Offline Plugin to config

* formatting...

* Turned offline off as default and removed offline.md

---------

Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>

* docs: wording changes for offline support

* docs: document enableToc

* Revert "docs: wording changes for offline support"

This reverts commit 52a172d1a4.

* Revert "feat: Making Quartz available offline by making it a PWA (#465)"

This reverts commit d6301fae90.

* feat(explorer): improve accessibility and consistency (+ bug fix) (#488)

* feat(consistency): use `all: unset` on button

* style: improve accessibility and consistency for explorer

* fix: localStorage bug with folder name changes

* chore: bump quartz version

* feat: display name for folders, expand explorer a little bit (#489)

* feat: display name for folders, expand explorer a little bit

* update docs

* perf: memoize filetree computation (#490)

* perf: memoize filetree computation

* format

* var -> let

* docs(explorer): update default config + new example (#493)

* fix(explorer): display names for folders without frontmatter (#494)

* fix(explorer): display name for folders without `index` file

* docs(explorer): add section for folder display names

* fix(explorer): increase consistency, explicitly use font-family (#496)

* fix(explorer): display name for folders without `index` file

* docs(explorer): add section for folder display names

* docs(explorer): fix broken wikilink

* fix(consistency): explicitly set font + label/link fix

Use consistent styling between folders with `folderClickBehavior: "link"` and `"collapse`

* Update quartz/components/styles/explorer.scss

Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>

* Update quartz/components/styles/explorer.scss

Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>

---------

Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>

* docs(showcase): fix pull request redirect link (#500)

* feat: add warning for missing home page

* feat: add warning for invalid date format

* docs: Adds Vince Imbat to showcase (#501)

* add site to showcase (#504)

* fix: mermaid copy source position

* fix: treat the 0 time as invalid too

* npx quartz update

* added content back

---------

Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>
Co-authored-by: Ikko Eltociear Ashimine <eltociear@gmail.com>
Co-authored-by: 松浦 知也 Matsuura Tomoya <me@matsuuratomoya.com>
Co-authored-by: Aaron Pham <29749331+aarnphm@users.noreply.github.com>
Co-authored-by: kanpov <71177577+kanpov@users.noreply.github.com>
Co-authored-by: Zane Helton <me@zaaane.com>
Co-authored-by: bfahrenfort <59982409+bfahrenfort@users.noreply.github.com>
Co-authored-by: Ben Schlegel <31989404+benschlegel@users.noreply.github.com>
Co-authored-by: Zero King <l2dy@icloud.com>
Co-authored-by: Hrishikesh Barman <geekodour@users.noreply.github.com>
Co-authored-by: Jeremy Press <jeremypress1@gmail.com>
Co-authored-by: Jeremy Press <jeremy@replit.com>
Co-authored-by: Jeffrey Fabian <jeffrey.fabian61@gmail.com>
Co-authored-by: Pelayo Arbués <gonzalezpelayo@gmail.com>
Co-authored-by: Adam Brangenberg <adambrangenberg@proton.me>
Co-authored-by: Dr Kim Foale <kim@gfsc.studio>
Co-authored-by: Stefano Cecere <stefano.cecere@krur.com>
Co-authored-by: Oskar Manhart <52569953+oskardotglobal@users.noreply.github.com>
Co-authored-by: hcplantern <38579760+HCPlantern@users.noreply.github.com>
Co-authored-by: Yuto Nagata <38714187+mouse484@users.noreply.github.com>
Co-authored-by: Christian Gill <gillchristiang@gmail.com>
Co-authored-by: Ben Schlegel <ben5.schlegel@gmail.com>
Co-authored-by: David Fischer <david@konst.fish>
Co-authored-by: rwutscher <richard.wutscher@gmail.com>
Co-authored-by: Vince Imbat <96913392+vinceimbat@users.noreply.github.com>
Co-authored-by: Chad Lee <git@chadly.net>
2023-09-25 17:22:37 -04:00
Jacky Zhao 697bffdb8b fix: treat the 0 time as invalid too 2023-09-24 14:47:30 -07:00
Jacky Zhao ea5742c328 fix: mermaid copy source position 2023-09-24 10:31:54 -07:00
Jacky Zhao 13c8673226 feat: add warning for invalid date format 2023-09-22 10:04:50 -07:00
Jacky Zhao a897cc1f53 feat: add warning for missing home page 2023-09-22 10:04:50 -07:00
Ben Schlegel fa69c2a565
fix(explorer): increase consistency, explicitly use font-family (#496)
* fix(explorer): display name for folders without `index` file

* docs(explorer): add section for folder display names

* docs(explorer): fix broken wikilink

* fix(consistency): explicitly set font + label/link fix

Use consistent styling between folders with `folderClickBehavior: "link"` and `"collapse`

* Update quartz/components/styles/explorer.scss

Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>

* Update quartz/components/styles/explorer.scss

Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>

---------

Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>
2023-09-21 19:35:11 +02:00
Ben Schlegel 8eb1554b13
fix(explorer): display names for folders without frontmatter (#494)
* fix(explorer): display name for folders without `index` file

* docs(explorer): add section for folder display names
2023-09-21 18:54:33 +02:00
Jacky Zhao 48452231d5
perf: memoize filetree computation (#490)
* perf: memoize filetree computation

* format

* var -> let
2023-09-20 16:09:18 -07:00
Jacky Zhao 16d33fb771
feat: display name for folders, expand explorer a little bit (#489)
* feat: display name for folders, expand explorer a little bit

* update docs
2023-09-20 16:08:54 -07:00
Ben Schlegel b029eeadab
feat(explorer): improve accessibility and consistency (+ bug fix) (#488)
* feat(consistency): use `all: unset` on button

* style: improve accessibility and consistency for explorer

* fix: localStorage bug with folder name changes

* chore: bump quartz version
2023-09-20 13:55:29 -07:00
Jacky Zhao 6a9e6352e8 Revert "feat: Making Quartz available offline by making it a PWA (#465)"
This reverts commit d6301fae90.
2023-09-20 13:52:45 -07:00
Jacky Zhao 70e029d151 Revert "docs: wording changes for offline support"
This reverts commit 52a172d1a4.
2023-09-20 13:52:29 -07:00
Jacky Zhao 52a172d1a4 docs: wording changes for offline support 2023-09-20 11:40:36 -07:00
Adam Brangenberg d6301fae90
feat: Making Quartz available offline by making it a PWA (#465)
* Adding PWA and chaching for offline aviability

* renamed workbox config to fit Quartz' scheme

* Documenting new configuration

* Added missig umami documentation

* Fixed formatting so the build passes, thank you prettier :)

* specified caching strategies to improve performance

* formatting...

* fixing "404 manifest.json not found" on subdirectories by adding a / to manifestpath

* turning it into a plugin

* Removed Workbox-cli and updated @types/node

* Added Serviceworkercode to offline.ts

* formatting

* Removing workbox from docs

* applied suggestions

* Removed path.join for sw path

Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>

* Removed path.join for manifest path

Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>

* Removing path module import

* Added absolute path to manifests start_url and manifest "import" using baseUrl

* Adding protocol to baseurl

Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>

* Adding protocol to start_url too then

* formatting...

* Adding fallback page

* Documenting offline plugin

* formatting...

* merge suggestion

Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>

* merge suggestion

Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>

* merge suggestion

Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>

* merge suggestion

Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>

* merge suggestion

Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>

* merge suggestion

Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>

* merge suggestion

Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>

* merge suggestion

Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>

* merge suggestion

Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>

* merge suggestion

Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>

* merge suggestion

Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>

* merge suggestion

Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>

* formatting...

* Fixing manifest path, all these nits hiding the actual issues .-.

* Offline fallback page through plugins, most things taken from 404 Plugin

* adding Offline Plugin to config

* formatting...

* Turned offline off as default and removed offline.md

---------

Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>
2023-09-20 11:38:13 -07:00
rwutscher 27a6087dd5
fix: tag regex no longer includes purely numerical 'tags' (#485)
* fix: tag regex no longer includes purely numerical 'tags'

* fix: formatting

* fix: use guard in findAndReplace() instead of expanding the regex
2023-09-19 12:26:30 -07:00
Jacky Zhao 1bf7e3d8b3 fix(nit): make defaultOptions on explorer not a function 2023-09-19 10:22:39 -07:00
David Fischer cc31a40b0c
feat: support changes in system theme (#484)
* feat: support changes in system theme

* fix: run prettier

* fix: add content/.gitkeep
2023-09-19 09:25:51 -07:00
Ben Schlegel 6a2e0b3ad3
fix: bad visibility for last explorer item (#478)
* fix: bad visibility for last explorer item

* feat(explorer): add pseudo element for observer
2023-09-17 22:04:44 +02:00
Ben Schlegel e67f409ec1
Merge pull request #479 from benschlegel/explorer-config
feat(explorer): add config for custom sort/map/filter functions
2023-09-17 21:36:04 +02:00
Ben Schlegel 4afb099bf3
docs: fix examples 2023-09-17 21:32:23 +02:00
Christian Gill af41f34bfd
fix(slug): Handle question mark (#481) 2023-09-17 11:02:00 -07:00
Ben Schlegel 7ac772fca8
fix: darkmode scroll bars (#480) 2023-09-17 10:29:20 -07:00
Ben Schlegel 94a04ab1c9
fix(explorer): filter function in `ExplorerNode` 2023-09-17 15:51:08 +02:00
Ben Schlegel 9358f73f1c
fix: display name for file nodes 2023-09-17 12:41:06 +02:00
Ben Schlegel f7029012df
feat: black magic
add config for `order` array, which determines the order in which all passed config functions for explorer will get executed in.

functions will now dynamically be called on `fileTree` via array accessor (e.g. fileTree["sort"].call(...)) with corresponding function from options being passed to call)
2023-09-16 21:58:38 +02:00
Ben Schlegel fea352849c
fix: create deep copy of file passed into tree 2023-09-16 19:45:21 +02:00
Ben Schlegel 3d8c470c0d
feat(explorer): implement `map` fn argument
Add a function for mapping over all FileNodes as an option for `Explorer`
2023-09-16 19:35:27 +02:00
Ben Schlegel 31d16fbd2c
feat(explorer): integrate filter option 2023-09-16 19:18:59 +02:00
Ben Schlegel 036a33f70b
fix: use correct import for `QuartzPluginData` 2023-09-16 17:47:44 +02:00
Ben Schlegel 58aea1cb07
feat: implement filter function for explorer 2023-09-16 17:28:58 +02:00