mirror of
https://github.com/vacp2p/roadmap.git
synced 2026-01-07 14:53:56 -05:00
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 commit5dcb7e83fc. * 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 commit52a172d1a4. * Revert "feat: Making Quartz available offline by making it a PWA (#465)" This reverts commitd6301fae90. * 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>
This commit is contained in:
18
.gitignore
vendored
18
.gitignore
vendored
@@ -1,12 +1,10 @@
|
||||
.DS_Store
|
||||
public
|
||||
resources
|
||||
.idea
|
||||
node_modules/
|
||||
quartz/.quartz-cache/
|
||||
content/.obsidian
|
||||
static/linkmap
|
||||
assets/indices/linkIndex.json
|
||||
assets/indices/contentIndex.json
|
||||
quartz/.quartz-cache/
|
||||
linkmap
|
||||
prof
|
||||
tsconfig.tsbuildinfo
|
||||
.obsidian
|
||||
.quartz-cache
|
||||
private/
|
||||
.replit
|
||||
replit.nix
|
||||
node_modules
|
||||
@@ -11,9 +11,13 @@ The content, today, contains the definition of work planned by various projects,
|
||||
|
||||
Each project is given as much autonomy as possible to work as they see fit, with a minimal reporting scheme that sits on top that allows for aggregation of information and project tracking.
|
||||
|
||||
<<<<<<< HEAD
|
||||
In a nutshell, projects give a definitions of their roadmap up-front, which includes the mapping of issues to epics, and epics to milestones. They also provide perceived risks and dependencies associated with their work.
|
||||
|
||||
The projects then report a weekly "diff" associated with the work they did each week, which is ostensibly a stand-up. The Insights team can work from there to do what they need.
|
||||
=======
|
||||
## Sponsors
|
||||
>>>>>>> eed4472a (fix: use proper full base for links.ts)
|
||||
|
||||
## Contribution
|
||||
The bulk of the content is added by the Insights team within the Logos Collective, which is a team that works to keep track of activity within the projects in order to provide analysis and insight based on that work to various stakeholders, including the projects themselves.
|
||||
|
||||
425
assets/indices/contentIndex.json
Normal file
425
assets/indices/contentIndex.json
Normal file
File diff suppressed because one or more lines are too long
998
assets/indices/linkIndex.json
Normal file
998
assets/indices/linkIndex.json
Normal file
@@ -0,0 +1,998 @@
|
||||
{
|
||||
"index": {
|
||||
"links": {
|
||||
"/": [
|
||||
{
|
||||
"source": "/",
|
||||
"target": "/roadmap/waku/milestones-overview",
|
||||
"text": "Milestones"
|
||||
},
|
||||
{
|
||||
"source": "/",
|
||||
"target": "/tags/waku-updates",
|
||||
"text": "weekly updates"
|
||||
},
|
||||
{
|
||||
"source": "/",
|
||||
"target": "/roadmap/codex/milestones-overview",
|
||||
"text": "Milestones"
|
||||
},
|
||||
{
|
||||
"source": "/",
|
||||
"target": "/tags/codex-updates",
|
||||
"text": "weekly updates"
|
||||
},
|
||||
{
|
||||
"source": "/",
|
||||
"target": "/roadmap/nomos/milestones-overview",
|
||||
"text": "Milestones"
|
||||
},
|
||||
{
|
||||
"source": "/",
|
||||
"target": "/tags/nomos-updates",
|
||||
"text": "weekly updates"
|
||||
},
|
||||
{
|
||||
"source": "/",
|
||||
"target": "/roadmap/vac/milestones-overview",
|
||||
"text": "Milestones"
|
||||
},
|
||||
{
|
||||
"source": "/",
|
||||
"target": "/tags/vac-updates",
|
||||
"text": "weekly updates"
|
||||
},
|
||||
{
|
||||
"source": "/",
|
||||
"target": "/roadmap/innovation_lab/milestones_overview",
|
||||
"text": "Milestones"
|
||||
},
|
||||
{
|
||||
"source": "/",
|
||||
"target": "/tags/ilab-updates",
|
||||
"text": "weekly updates"
|
||||
},
|
||||
{
|
||||
"source": "/",
|
||||
"target": "/roadmap/acid/milestones-overview",
|
||||
"text": "Milestones"
|
||||
},
|
||||
{
|
||||
"source": "/",
|
||||
"target": "/tags/acid-updates",
|
||||
"text": "weekly updates"
|
||||
}
|
||||
],
|
||||
"/private/notes/CJK-+-Latex-Support-%E6%B5%8B%E8%AF%95": [
|
||||
{
|
||||
"source": "/private/notes/CJK-+-Latex-Support-%E6%B5%8B%E8%AF%95",
|
||||
"target": "/config",
|
||||
"text": "config"
|
||||
}
|
||||
],
|
||||
"/private/notes/config": [
|
||||
{
|
||||
"source": "/private/notes/config",
|
||||
"target": "/troubleshooting",
|
||||
"text": "FAQ and Troubleshooting guide"
|
||||
},
|
||||
{
|
||||
"source": "/private/notes/config",
|
||||
"target": "/CJK-+-Latex-Support-%E6%B5%8B%E8%AF%95",
|
||||
"text": "CJK + Latex Support (测试)"
|
||||
}
|
||||
],
|
||||
"/private/notes/editing": [
|
||||
{
|
||||
"source": "/private/notes/editing",
|
||||
"target": "/obsidian",
|
||||
"text": "How to setup your Obsidian Vault to work with Quartz"
|
||||
},
|
||||
{
|
||||
"source": "/private/notes/editing",
|
||||
"target": "/preview-changes",
|
||||
"text": "Preview Quartz Changes"
|
||||
},
|
||||
{
|
||||
"source": "/private/notes/editing",
|
||||
"target": "/hosting",
|
||||
"text": "Hosting Quartz online!"
|
||||
},
|
||||
{
|
||||
"source": "/private/notes/editing",
|
||||
"target": "/troubleshooting",
|
||||
"text": "FAQ and Troubleshooting guide"
|
||||
}
|
||||
],
|
||||
"/private/notes/hosting": [
|
||||
{
|
||||
"source": "/private/notes/hosting",
|
||||
"target": "/custom-Domain",
|
||||
"text": "Learn how to set it up with Quartz"
|
||||
},
|
||||
{
|
||||
"source": "/private/notes/hosting",
|
||||
"target": "/ignore-notes",
|
||||
"text": "Excluding pages from being published"
|
||||
},
|
||||
{
|
||||
"source": "/private/notes/hosting",
|
||||
"target": "/config",
|
||||
"text": "Customizing Quartz"
|
||||
},
|
||||
{
|
||||
"source": "/private/notes/hosting",
|
||||
"target": "/troubleshooting",
|
||||
"text": "FAQ and Troubleshooting guide"
|
||||
}
|
||||
],
|
||||
"/private/notes/obsidian": [
|
||||
{
|
||||
"source": "/private/notes/obsidian",
|
||||
"target": "/setup",
|
||||
"text": "setup"
|
||||
},
|
||||
{
|
||||
"source": "/private/notes/obsidian",
|
||||
"target": "/preview-changes",
|
||||
"text": "Preview Quartz Changes"
|
||||
}
|
||||
],
|
||||
"/private/notes/preview-changes": [
|
||||
{
|
||||
"source": "/private/notes/preview-changes",
|
||||
"target": "/hosting",
|
||||
"text": "Hosting Quartz online!"
|
||||
}
|
||||
],
|
||||
"/private/notes/search": [
|
||||
{
|
||||
"source": "/private/notes/search",
|
||||
"target": "/hosting",
|
||||
"text": "hosting"
|
||||
}
|
||||
],
|
||||
"/private/notes/setup": [
|
||||
{
|
||||
"source": "/private/notes/setup",
|
||||
"target": "/editing",
|
||||
"text": "Editing Notes in Quartz"
|
||||
},
|
||||
{
|
||||
"source": "/private/notes/setup",
|
||||
"target": "/troubleshooting",
|
||||
"text": "FAQ and Troubleshooting guide"
|
||||
}
|
||||
],
|
||||
"/private/notes/troubleshooting": [
|
||||
{
|
||||
"source": "/private/notes/troubleshooting",
|
||||
"target": "/CJK-+-Latex-Support-%E6%B5%8B%E8%AF%95",
|
||||
"text": "CJK + Latex Support (测试)"
|
||||
},
|
||||
{
|
||||
"source": "/private/notes/troubleshooting",
|
||||
"target": "/hosting",
|
||||
"text": "hosting"
|
||||
},
|
||||
{
|
||||
"source": "/private/notes/troubleshooting",
|
||||
"target": "/ignore-notes",
|
||||
"text": "excluding pages from being published"
|
||||
},
|
||||
{
|
||||
"source": "/private/notes/troubleshooting",
|
||||
"target": "/hosting",
|
||||
"text": "hosting"
|
||||
},
|
||||
{
|
||||
"source": "/private/notes/troubleshooting",
|
||||
"target": "/obsidian",
|
||||
"text": "Obsidian"
|
||||
},
|
||||
{
|
||||
"source": "/private/notes/troubleshooting",
|
||||
"target": "/editing",
|
||||
"text": "the 'how to edit' guide"
|
||||
},
|
||||
{
|
||||
"source": "/private/notes/troubleshooting",
|
||||
"target": "/hosting",
|
||||
"text": "the hosting guide"
|
||||
},
|
||||
{
|
||||
"source": "/private/notes/troubleshooting",
|
||||
"target": "/config",
|
||||
"text": "customization guide"
|
||||
},
|
||||
{
|
||||
"source": "/private/notes/troubleshooting",
|
||||
"target": "/editing",
|
||||
"text": "local editing"
|
||||
}
|
||||
],
|
||||
"/private/roadmap/consensus/candidates/carnot/overview": [
|
||||
{
|
||||
"source": "/private/roadmap/consensus/candidates/carnot/overview",
|
||||
"target": "/roadmap/consensus/index",
|
||||
"text": "consensus"
|
||||
},
|
||||
{
|
||||
"source": "/private/roadmap/consensus/candidates/carnot/overview",
|
||||
"target": "/FAQ",
|
||||
"text": "FAQ"
|
||||
},
|
||||
{
|
||||
"source": "/private/roadmap/consensus/candidates/carnot/overview",
|
||||
"target": "/",
|
||||
"text": "Recovery Failure Probabilities"
|
||||
}
|
||||
],
|
||||
"/private/roadmap/consensus/development/prototypes": [
|
||||
{
|
||||
"source": "/private/roadmap/consensus/development/prototypes",
|
||||
"target": "/tags/candidates",
|
||||
"text": "Consensus Candidates"
|
||||
}
|
||||
],
|
||||
"/private/roadmap/consensus/overview": [
|
||||
{
|
||||
"source": "/private/roadmap/consensus/overview",
|
||||
"target": "/private/roadmap/consensus/candidates/carnot/overview",
|
||||
"text": "Carnot"
|
||||
},
|
||||
{
|
||||
"source": "/private/roadmap/consensus/overview",
|
||||
"target": "/claro",
|
||||
"text": "Claro"
|
||||
},
|
||||
{
|
||||
"source": "/private/roadmap/consensus/overview",
|
||||
"target": "/snow-family",
|
||||
"text": "snow-family"
|
||||
},
|
||||
{
|
||||
"source": "/private/roadmap/consensus/overview",
|
||||
"target": "/prototypes",
|
||||
"text": "prototypes"
|
||||
},
|
||||
{
|
||||
"source": "/private/roadmap/consensus/overview",
|
||||
"target": "/distributed-systems-researcher",
|
||||
"text": "distributed-systems-researcher"
|
||||
}
|
||||
],
|
||||
"/private/roadmap/consensus/theory/overview": [
|
||||
{
|
||||
"source": "/private/roadmap/consensus/theory/overview",
|
||||
"target": "/snow-family",
|
||||
"text": "Snow Family Analysis"
|
||||
}
|
||||
],
|
||||
"/private/roadmap/consensus/theory/snow-family": [
|
||||
{
|
||||
"source": "/private/roadmap/consensus/theory/snow-family",
|
||||
"target": "/",
|
||||
"text": "whitepapers"
|
||||
}
|
||||
],
|
||||
"/private/roadmap/networking/overview": [
|
||||
{
|
||||
"source": "/private/roadmap/networking/overview",
|
||||
"target": "/status-waku-kurtosis",
|
||||
"text": "Status' use of Waku study w/ Kurtosis"
|
||||
},
|
||||
{
|
||||
"source": "/private/roadmap/networking/overview",
|
||||
"target": "/carnot-waku-specification",
|
||||
"text": "Using Waku for Carnot Overlay"
|
||||
},
|
||||
{
|
||||
"source": "/private/roadmap/networking/overview",
|
||||
"target": "/roadmap/development/prototypes",
|
||||
"text": "Tiny Node"
|
||||
}
|
||||
],
|
||||
"/private/roadmap/networking/status-network-agents": [
|
||||
{
|
||||
"source": "/private/roadmap/networking/status-network-agents",
|
||||
"target": "/status-waku-kurtosis",
|
||||
"text": "Status Waku scalability study"
|
||||
}
|
||||
],
|
||||
"/private/roadmap/networking/status-waku-kurtosis": [
|
||||
{
|
||||
"source": "/private/roadmap/networking/status-waku-kurtosis",
|
||||
"target": "/private/roadmap/networking/overview",
|
||||
"text": "Networking Overview"
|
||||
},
|
||||
{
|
||||
"source": "/private/roadmap/networking/status-waku-kurtosis",
|
||||
"target": "/private/requirements/overview",
|
||||
"text": "Technical Requirements"
|
||||
},
|
||||
{
|
||||
"source": "/private/roadmap/networking/status-waku-kurtosis",
|
||||
"target": "/status-network-agents",
|
||||
"text": "Status Network Agent Breakdown"
|
||||
}
|
||||
],
|
||||
"/private/roadmap/virtual-machines/overview": [
|
||||
{
|
||||
"source": "/private/roadmap/virtual-machines/overview",
|
||||
"target": "/zero-knowledge-research-engineer",
|
||||
"text": "ZK Research Engineer"
|
||||
}
|
||||
],
|
||||
"/roadmap/waku/milestones-overview": [
|
||||
{
|
||||
"source": "/roadmap/waku/milestones-overview",
|
||||
"target": "/roadmap/waku/milestone-waku-10-users",
|
||||
"text": "Waku Network support for 10k users"
|
||||
}
|
||||
]
|
||||
},
|
||||
"backlinks": {
|
||||
"/": [
|
||||
{
|
||||
"source": "/private/roadmap/consensus/candidates/carnot/overview",
|
||||
"target": "/",
|
||||
"text": "Recovery Failure Probabilities"
|
||||
},
|
||||
{
|
||||
"source": "/private/roadmap/consensus/theory/snow-family",
|
||||
"target": "/",
|
||||
"text": "whitepapers"
|
||||
}
|
||||
],
|
||||
"/CJK-+-Latex-Support-%E6%B5%8B%E8%AF%95": [
|
||||
{
|
||||
"source": "/private/notes/config",
|
||||
"target": "/CJK-+-Latex-Support-%E6%B5%8B%E8%AF%95",
|
||||
"text": "CJK + Latex Support (测试)"
|
||||
},
|
||||
{
|
||||
"source": "/private/notes/troubleshooting",
|
||||
"target": "/CJK-+-Latex-Support-%E6%B5%8B%E8%AF%95",
|
||||
"text": "CJK + Latex Support (测试)"
|
||||
}
|
||||
],
|
||||
"/FAQ": [
|
||||
{
|
||||
"source": "/private/roadmap/consensus/candidates/carnot/overview",
|
||||
"target": "/FAQ",
|
||||
"text": "FAQ"
|
||||
}
|
||||
],
|
||||
"/carnot-waku-specification": [
|
||||
{
|
||||
"source": "/private/roadmap/networking/overview",
|
||||
"target": "/carnot-waku-specification",
|
||||
"text": "Using Waku for Carnot Overlay"
|
||||
}
|
||||
],
|
||||
"/claro": [
|
||||
{
|
||||
"source": "/private/roadmap/consensus/overview",
|
||||
"target": "/claro",
|
||||
"text": "Claro"
|
||||
}
|
||||
],
|
||||
"/config": [
|
||||
{
|
||||
"source": "/private/notes/CJK-+-Latex-Support-%E6%B5%8B%E8%AF%95",
|
||||
"target": "/config",
|
||||
"text": "config"
|
||||
},
|
||||
{
|
||||
"source": "/private/notes/hosting",
|
||||
"target": "/config",
|
||||
"text": "Customizing Quartz"
|
||||
},
|
||||
{
|
||||
"source": "/private/notes/troubleshooting",
|
||||
"target": "/config",
|
||||
"text": "customization guide"
|
||||
}
|
||||
],
|
||||
"/custom-Domain": [
|
||||
{
|
||||
"source": "/private/notes/hosting",
|
||||
"target": "/custom-Domain",
|
||||
"text": "Learn how to set it up with Quartz"
|
||||
}
|
||||
],
|
||||
"/distributed-systems-researcher": [
|
||||
{
|
||||
"source": "/private/roadmap/consensus/overview",
|
||||
"target": "/distributed-systems-researcher",
|
||||
"text": "distributed-systems-researcher"
|
||||
}
|
||||
],
|
||||
"/editing": [
|
||||
{
|
||||
"source": "/private/notes/setup",
|
||||
"target": "/editing",
|
||||
"text": "Editing Notes in Quartz"
|
||||
},
|
||||
{
|
||||
"source": "/private/notes/troubleshooting",
|
||||
"target": "/editing",
|
||||
"text": "the 'how to edit' guide"
|
||||
},
|
||||
{
|
||||
"source": "/private/notes/troubleshooting",
|
||||
"target": "/editing",
|
||||
"text": "local editing"
|
||||
}
|
||||
],
|
||||
"/hosting": [
|
||||
{
|
||||
"source": "/private/notes/editing",
|
||||
"target": "/hosting",
|
||||
"text": "Hosting Quartz online!"
|
||||
},
|
||||
{
|
||||
"source": "/private/notes/preview-changes",
|
||||
"target": "/hosting",
|
||||
"text": "Hosting Quartz online!"
|
||||
},
|
||||
{
|
||||
"source": "/private/notes/search",
|
||||
"target": "/hosting",
|
||||
"text": "hosting"
|
||||
},
|
||||
{
|
||||
"source": "/private/notes/troubleshooting",
|
||||
"target": "/hosting",
|
||||
"text": "hosting"
|
||||
},
|
||||
{
|
||||
"source": "/private/notes/troubleshooting",
|
||||
"target": "/hosting",
|
||||
"text": "hosting"
|
||||
},
|
||||
{
|
||||
"source": "/private/notes/troubleshooting",
|
||||
"target": "/hosting",
|
||||
"text": "the hosting guide"
|
||||
}
|
||||
],
|
||||
"/ignore-notes": [
|
||||
{
|
||||
"source": "/private/notes/hosting",
|
||||
"target": "/ignore-notes",
|
||||
"text": "Excluding pages from being published"
|
||||
},
|
||||
{
|
||||
"source": "/private/notes/troubleshooting",
|
||||
"target": "/ignore-notes",
|
||||
"text": "excluding pages from being published"
|
||||
}
|
||||
],
|
||||
"/obsidian": [
|
||||
{
|
||||
"source": "/private/notes/editing",
|
||||
"target": "/obsidian",
|
||||
"text": "How to setup your Obsidian Vault to work with Quartz"
|
||||
},
|
||||
{
|
||||
"source": "/private/notes/troubleshooting",
|
||||
"target": "/obsidian",
|
||||
"text": "Obsidian"
|
||||
}
|
||||
],
|
||||
"/preview-changes": [
|
||||
{
|
||||
"source": "/private/notes/editing",
|
||||
"target": "/preview-changes",
|
||||
"text": "Preview Quartz Changes"
|
||||
},
|
||||
{
|
||||
"source": "/private/notes/obsidian",
|
||||
"target": "/preview-changes",
|
||||
"text": "Preview Quartz Changes"
|
||||
}
|
||||
],
|
||||
"/private/requirements/overview": [
|
||||
{
|
||||
"source": "/private/roadmap/networking/status-waku-kurtosis",
|
||||
"target": "/private/requirements/overview",
|
||||
"text": "Technical Requirements"
|
||||
}
|
||||
],
|
||||
"/private/roadmap/consensus/candidates/carnot/overview": [
|
||||
{
|
||||
"source": "/private/roadmap/consensus/overview",
|
||||
"target": "/private/roadmap/consensus/candidates/carnot/overview",
|
||||
"text": "Carnot"
|
||||
}
|
||||
],
|
||||
"/private/roadmap/networking/overview": [
|
||||
{
|
||||
"source": "/private/roadmap/networking/status-waku-kurtosis",
|
||||
"target": "/private/roadmap/networking/overview",
|
||||
"text": "Networking Overview"
|
||||
}
|
||||
],
|
||||
"/prototypes": [
|
||||
{
|
||||
"source": "/private/roadmap/consensus/overview",
|
||||
"target": "/prototypes",
|
||||
"text": "prototypes"
|
||||
}
|
||||
],
|
||||
"/roadmap/acid/milestones-overview": [
|
||||
{
|
||||
"source": "/",
|
||||
"target": "/roadmap/acid/milestones-overview",
|
||||
"text": "Milestones"
|
||||
}
|
||||
],
|
||||
"/roadmap/codex/milestones-overview": [
|
||||
{
|
||||
"source": "/",
|
||||
"target": "/roadmap/codex/milestones-overview",
|
||||
"text": "Milestones"
|
||||
}
|
||||
],
|
||||
"/roadmap/consensus/index": [
|
||||
{
|
||||
"source": "/private/roadmap/consensus/candidates/carnot/overview",
|
||||
"target": "/roadmap/consensus/index",
|
||||
"text": "consensus"
|
||||
}
|
||||
],
|
||||
"/roadmap/development/prototypes": [
|
||||
{
|
||||
"source": "/private/roadmap/networking/overview",
|
||||
"target": "/roadmap/development/prototypes",
|
||||
"text": "Tiny Node"
|
||||
}
|
||||
],
|
||||
"/roadmap/innovation_lab/milestones_overview": [
|
||||
{
|
||||
"source": "/",
|
||||
"target": "/roadmap/innovation_lab/milestones_overview",
|
||||
"text": "Milestones"
|
||||
}
|
||||
],
|
||||
"/roadmap/nomos/milestones-overview": [
|
||||
{
|
||||
"source": "/",
|
||||
"target": "/roadmap/nomos/milestones-overview",
|
||||
"text": "Milestones"
|
||||
}
|
||||
],
|
||||
"/roadmap/vac/milestones-overview": [
|
||||
{
|
||||
"source": "/",
|
||||
"target": "/roadmap/vac/milestones-overview",
|
||||
"text": "Milestones"
|
||||
}
|
||||
],
|
||||
"/roadmap/waku/milestone-waku-10-users": [
|
||||
{
|
||||
"source": "/roadmap/waku/milestones-overview",
|
||||
"target": "/roadmap/waku/milestone-waku-10-users",
|
||||
"text": "Waku Network support for 10k users"
|
||||
}
|
||||
],
|
||||
"/roadmap/waku/milestones-overview": [
|
||||
{
|
||||
"source": "/",
|
||||
"target": "/roadmap/waku/milestones-overview",
|
||||
"text": "Milestones"
|
||||
}
|
||||
],
|
||||
"/setup": [
|
||||
{
|
||||
"source": "/private/notes/obsidian",
|
||||
"target": "/setup",
|
||||
"text": "setup"
|
||||
}
|
||||
],
|
||||
"/snow-family": [
|
||||
{
|
||||
"source": "/private/roadmap/consensus/overview",
|
||||
"target": "/snow-family",
|
||||
"text": "snow-family"
|
||||
},
|
||||
{
|
||||
"source": "/private/roadmap/consensus/theory/overview",
|
||||
"target": "/snow-family",
|
||||
"text": "Snow Family Analysis"
|
||||
}
|
||||
],
|
||||
"/status-network-agents": [
|
||||
{
|
||||
"source": "/private/roadmap/networking/status-waku-kurtosis",
|
||||
"target": "/status-network-agents",
|
||||
"text": "Status Network Agent Breakdown"
|
||||
}
|
||||
],
|
||||
"/status-waku-kurtosis": [
|
||||
{
|
||||
"source": "/private/roadmap/networking/overview",
|
||||
"target": "/status-waku-kurtosis",
|
||||
"text": "Status' use of Waku study w/ Kurtosis"
|
||||
},
|
||||
{
|
||||
"source": "/private/roadmap/networking/status-network-agents",
|
||||
"target": "/status-waku-kurtosis",
|
||||
"text": "Status Waku scalability study"
|
||||
}
|
||||
],
|
||||
"/tags/acid-updates": [
|
||||
{
|
||||
"source": "/",
|
||||
"target": "/tags/acid-updates",
|
||||
"text": "weekly updates"
|
||||
}
|
||||
],
|
||||
"/tags/candidates": [
|
||||
{
|
||||
"source": "/private/roadmap/consensus/development/prototypes",
|
||||
"target": "/tags/candidates",
|
||||
"text": "Consensus Candidates"
|
||||
}
|
||||
],
|
||||
"/tags/codex-updates": [
|
||||
{
|
||||
"source": "/",
|
||||
"target": "/tags/codex-updates",
|
||||
"text": "weekly updates"
|
||||
}
|
||||
],
|
||||
"/tags/ilab-updates": [
|
||||
{
|
||||
"source": "/",
|
||||
"target": "/tags/ilab-updates",
|
||||
"text": "weekly updates"
|
||||
}
|
||||
],
|
||||
"/tags/nomos-updates": [
|
||||
{
|
||||
"source": "/",
|
||||
"target": "/tags/nomos-updates",
|
||||
"text": "weekly updates"
|
||||
}
|
||||
],
|
||||
"/tags/vac-updates": [
|
||||
{
|
||||
"source": "/",
|
||||
"target": "/tags/vac-updates",
|
||||
"text": "weekly updates"
|
||||
}
|
||||
],
|
||||
"/tags/waku-updates": [
|
||||
{
|
||||
"source": "/",
|
||||
"target": "/tags/waku-updates",
|
||||
"text": "weekly updates"
|
||||
}
|
||||
],
|
||||
"/troubleshooting": [
|
||||
{
|
||||
"source": "/private/notes/config",
|
||||
"target": "/troubleshooting",
|
||||
"text": "FAQ and Troubleshooting guide"
|
||||
},
|
||||
{
|
||||
"source": "/private/notes/editing",
|
||||
"target": "/troubleshooting",
|
||||
"text": "FAQ and Troubleshooting guide"
|
||||
},
|
||||
{
|
||||
"source": "/private/notes/hosting",
|
||||
"target": "/troubleshooting",
|
||||
"text": "FAQ and Troubleshooting guide"
|
||||
},
|
||||
{
|
||||
"source": "/private/notes/setup",
|
||||
"target": "/troubleshooting",
|
||||
"text": "FAQ and Troubleshooting guide"
|
||||
}
|
||||
],
|
||||
"/zero-knowledge-research-engineer": [
|
||||
{
|
||||
"source": "/private/roadmap/virtual-machines/overview",
|
||||
"target": "/zero-knowledge-research-engineer",
|
||||
"text": "ZK Research Engineer"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"links": [
|
||||
{
|
||||
"source": "/",
|
||||
"target": "/roadmap/waku/milestones-overview",
|
||||
"text": "Milestones"
|
||||
},
|
||||
{
|
||||
"source": "/",
|
||||
"target": "/tags/waku-updates",
|
||||
"text": "weekly updates"
|
||||
},
|
||||
{
|
||||
"source": "/",
|
||||
"target": "/roadmap/codex/milestones-overview",
|
||||
"text": "Milestones"
|
||||
},
|
||||
{
|
||||
"source": "/",
|
||||
"target": "/tags/codex-updates",
|
||||
"text": "weekly updates"
|
||||
},
|
||||
{
|
||||
"source": "/",
|
||||
"target": "/roadmap/nomos/milestones-overview",
|
||||
"text": "Milestones"
|
||||
},
|
||||
{
|
||||
"source": "/",
|
||||
"target": "/tags/nomos-updates",
|
||||
"text": "weekly updates"
|
||||
},
|
||||
{
|
||||
"source": "/",
|
||||
"target": "/roadmap/vac/milestones-overview",
|
||||
"text": "Milestones"
|
||||
},
|
||||
{
|
||||
"source": "/",
|
||||
"target": "/tags/vac-updates",
|
||||
"text": "weekly updates"
|
||||
},
|
||||
{
|
||||
"source": "/",
|
||||
"target": "/roadmap/innovation_lab/milestones_overview",
|
||||
"text": "Milestones"
|
||||
},
|
||||
{
|
||||
"source": "/",
|
||||
"target": "/tags/ilab-updates",
|
||||
"text": "weekly updates"
|
||||
},
|
||||
{
|
||||
"source": "/",
|
||||
"target": "/roadmap/acid/milestones-overview",
|
||||
"text": "Milestones"
|
||||
},
|
||||
{
|
||||
"source": "/",
|
||||
"target": "/tags/acid-updates",
|
||||
"text": "weekly updates"
|
||||
},
|
||||
{
|
||||
"source": "/private/notes/CJK-+-Latex-Support-%E6%B5%8B%E8%AF%95",
|
||||
"target": "/config",
|
||||
"text": "config"
|
||||
},
|
||||
{
|
||||
"source": "/private/notes/config",
|
||||
"target": "/troubleshooting",
|
||||
"text": "FAQ and Troubleshooting guide"
|
||||
},
|
||||
{
|
||||
"source": "/private/notes/config",
|
||||
"target": "/CJK-+-Latex-Support-%E6%B5%8B%E8%AF%95",
|
||||
"text": "CJK + Latex Support (测试)"
|
||||
},
|
||||
{
|
||||
"source": "/private/notes/editing",
|
||||
"target": "/obsidian",
|
||||
"text": "How to setup your Obsidian Vault to work with Quartz"
|
||||
},
|
||||
{
|
||||
"source": "/private/notes/editing",
|
||||
"target": "/preview-changes",
|
||||
"text": "Preview Quartz Changes"
|
||||
},
|
||||
{
|
||||
"source": "/private/notes/editing",
|
||||
"target": "/hosting",
|
||||
"text": "Hosting Quartz online!"
|
||||
},
|
||||
{
|
||||
"source": "/private/notes/editing",
|
||||
"target": "/troubleshooting",
|
||||
"text": "FAQ and Troubleshooting guide"
|
||||
},
|
||||
{
|
||||
"source": "/private/notes/hosting",
|
||||
"target": "/custom-Domain",
|
||||
"text": "Learn how to set it up with Quartz"
|
||||
},
|
||||
{
|
||||
"source": "/private/notes/hosting",
|
||||
"target": "/ignore-notes",
|
||||
"text": "Excluding pages from being published"
|
||||
},
|
||||
{
|
||||
"source": "/private/notes/hosting",
|
||||
"target": "/config",
|
||||
"text": "Customizing Quartz"
|
||||
},
|
||||
{
|
||||
"source": "/private/notes/hosting",
|
||||
"target": "/troubleshooting",
|
||||
"text": "FAQ and Troubleshooting guide"
|
||||
},
|
||||
{
|
||||
"source": "/private/notes/obsidian",
|
||||
"target": "/setup",
|
||||
"text": "setup"
|
||||
},
|
||||
{
|
||||
"source": "/private/notes/obsidian",
|
||||
"target": "/preview-changes",
|
||||
"text": "Preview Quartz Changes"
|
||||
},
|
||||
{
|
||||
"source": "/private/notes/preview-changes",
|
||||
"target": "/hosting",
|
||||
"text": "Hosting Quartz online!"
|
||||
},
|
||||
{
|
||||
"source": "/private/notes/search",
|
||||
"target": "/hosting",
|
||||
"text": "hosting"
|
||||
},
|
||||
{
|
||||
"source": "/private/notes/setup",
|
||||
"target": "/editing",
|
||||
"text": "Editing Notes in Quartz"
|
||||
},
|
||||
{
|
||||
"source": "/private/notes/setup",
|
||||
"target": "/troubleshooting",
|
||||
"text": "FAQ and Troubleshooting guide"
|
||||
},
|
||||
{
|
||||
"source": "/private/notes/troubleshooting",
|
||||
"target": "/CJK-+-Latex-Support-%E6%B5%8B%E8%AF%95",
|
||||
"text": "CJK + Latex Support (测试)"
|
||||
},
|
||||
{
|
||||
"source": "/private/notes/troubleshooting",
|
||||
"target": "/hosting",
|
||||
"text": "hosting"
|
||||
},
|
||||
{
|
||||
"source": "/private/notes/troubleshooting",
|
||||
"target": "/ignore-notes",
|
||||
"text": "excluding pages from being published"
|
||||
},
|
||||
{
|
||||
"source": "/private/notes/troubleshooting",
|
||||
"target": "/hosting",
|
||||
"text": "hosting"
|
||||
},
|
||||
{
|
||||
"source": "/private/notes/troubleshooting",
|
||||
"target": "/obsidian",
|
||||
"text": "Obsidian"
|
||||
},
|
||||
{
|
||||
"source": "/private/notes/troubleshooting",
|
||||
"target": "/editing",
|
||||
"text": "the 'how to edit' guide"
|
||||
},
|
||||
{
|
||||
"source": "/private/notes/troubleshooting",
|
||||
"target": "/hosting",
|
||||
"text": "the hosting guide"
|
||||
},
|
||||
{
|
||||
"source": "/private/notes/troubleshooting",
|
||||
"target": "/config",
|
||||
"text": "customization guide"
|
||||
},
|
||||
{
|
||||
"source": "/private/notes/troubleshooting",
|
||||
"target": "/editing",
|
||||
"text": "local editing"
|
||||
},
|
||||
{
|
||||
"source": "/private/roadmap/consensus/candidates/carnot/overview",
|
||||
"target": "/roadmap/consensus/index",
|
||||
"text": "consensus"
|
||||
},
|
||||
{
|
||||
"source": "/private/roadmap/consensus/candidates/carnot/overview",
|
||||
"target": "/FAQ",
|
||||
"text": "FAQ"
|
||||
},
|
||||
{
|
||||
"source": "/private/roadmap/consensus/candidates/carnot/overview",
|
||||
"target": "/",
|
||||
"text": "Recovery Failure Probabilities"
|
||||
},
|
||||
{
|
||||
"source": "/private/roadmap/consensus/development/prototypes",
|
||||
"target": "/tags/candidates",
|
||||
"text": "Consensus Candidates"
|
||||
},
|
||||
{
|
||||
"source": "/private/roadmap/consensus/overview",
|
||||
"target": "/private/roadmap/consensus/candidates/carnot/overview",
|
||||
"text": "Carnot"
|
||||
},
|
||||
{
|
||||
"source": "/private/roadmap/consensus/overview",
|
||||
"target": "/claro",
|
||||
"text": "Claro"
|
||||
},
|
||||
{
|
||||
"source": "/private/roadmap/consensus/overview",
|
||||
"target": "/snow-family",
|
||||
"text": "snow-family"
|
||||
},
|
||||
{
|
||||
"source": "/private/roadmap/consensus/overview",
|
||||
"target": "/prototypes",
|
||||
"text": "prototypes"
|
||||
},
|
||||
{
|
||||
"source": "/private/roadmap/consensus/overview",
|
||||
"target": "/distributed-systems-researcher",
|
||||
"text": "distributed-systems-researcher"
|
||||
},
|
||||
{
|
||||
"source": "/private/roadmap/consensus/theory/overview",
|
||||
"target": "/snow-family",
|
||||
"text": "Snow Family Analysis"
|
||||
},
|
||||
{
|
||||
"source": "/private/roadmap/consensus/theory/snow-family",
|
||||
"target": "/",
|
||||
"text": "whitepapers"
|
||||
},
|
||||
{
|
||||
"source": "/private/roadmap/networking/overview",
|
||||
"target": "/status-waku-kurtosis",
|
||||
"text": "Status' use of Waku study w/ Kurtosis"
|
||||
},
|
||||
{
|
||||
"source": "/private/roadmap/networking/overview",
|
||||
"target": "/carnot-waku-specification",
|
||||
"text": "Using Waku for Carnot Overlay"
|
||||
},
|
||||
{
|
||||
"source": "/private/roadmap/networking/overview",
|
||||
"target": "/roadmap/development/prototypes",
|
||||
"text": "Tiny Node"
|
||||
},
|
||||
{
|
||||
"source": "/private/roadmap/networking/status-network-agents",
|
||||
"target": "/status-waku-kurtosis",
|
||||
"text": "Status Waku scalability study"
|
||||
},
|
||||
{
|
||||
"source": "/private/roadmap/networking/status-waku-kurtosis",
|
||||
"target": "/private/roadmap/networking/overview",
|
||||
"text": "Networking Overview"
|
||||
},
|
||||
{
|
||||
"source": "/private/roadmap/networking/status-waku-kurtosis",
|
||||
"target": "/private/requirements/overview",
|
||||
"text": "Technical Requirements"
|
||||
},
|
||||
{
|
||||
"source": "/private/roadmap/networking/status-waku-kurtosis",
|
||||
"target": "/status-network-agents",
|
||||
"text": "Status Network Agent Breakdown"
|
||||
},
|
||||
{
|
||||
"source": "/private/roadmap/virtual-machines/overview",
|
||||
"target": "/zero-knowledge-research-engineer",
|
||||
"text": "ZK Research Engineer"
|
||||
},
|
||||
{
|
||||
"source": "/roadmap/waku/milestones-overview",
|
||||
"target": "/roadmap/waku/milestone-waku-10-users",
|
||||
"text": "Waku Network support for 10k users"
|
||||
}
|
||||
]
|
||||
}
|
||||
BIN
content/images copy/dns records.png
Normal file
BIN
content/images copy/dns records.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 76 KiB |
BIN
content/images copy/quartz layout.png
Normal file
BIN
content/images copy/quartz layout.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 55 KiB |
BIN
content/images copy/quartz transform pipeline.png
Normal file
BIN
content/images copy/quartz transform pipeline.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 72 KiB |
21
content/index copy.md
Normal file
21
content/index copy.md
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
title: ""
|
||||
---
|
||||
This site attempts to inform the previous, current, and future work required to fulfill the requirements of the projects under the Logos Collective, a complete tech stack that provides infrastructure for the self-sovereign network state. To learn more about the motivation, please visit the [Logos Collective Site](https://logos.co).
|
||||
|
||||
This site is an ongoing work in progress. The links within are an attempt to capture a lot of moving targets. This means that the information here may or may not be the bleeding edge of what is true with respect to the development within the Logos Collective projects. Your use of this Website is subject to the following [[terms-of-use|terms of use]] which we ask you to read carefully prior to your use of the Website.
|
||||
|
||||
## Navigation
|
||||
|
||||
### Projects
|
||||
- [Waku](waku/index.md)
|
||||
- [Codex](codex/overview.md)
|
||||
- [Nomos](nomos)
|
||||
|
||||
### Services
|
||||
- [Vac](vac/index.md)
|
||||
- [Comms (Acid Info)](acid/index.md)
|
||||
- [[insight/index|Insight]]
|
||||
|
||||
### Skunk works
|
||||
- [Innovation Lab](innovation_lab/index.md)
|
||||
@@ -1,16 +0,0 @@
|
||||
---
|
||||
title: "Logos Network Requirements Overview"
|
||||
tags:
|
||||
- "requirements"
|
||||
---
|
||||
|
||||
This document describes the requirements of the Logos Network.
|
||||
|
||||
> Network sovereignty is an extension of the collective sovereignty of the individuals within.
|
||||
|
||||
> Meaningful participation in the network should be acheivable by affordable and accessible consumer grade hardware.
|
||||
|
||||
> Privacy by default.
|
||||
|
||||
> A given CiC should have the option to gracefully exit the network and operate on its own.
|
||||
|
||||
@@ -1,103 +0,0 @@
|
||||
---
|
||||
title: "Frequently Asked Questions"
|
||||
tags:
|
||||
- "Carnot"
|
||||
- "consensus"
|
||||
openToc: true
|
||||
---
|
||||
|
||||
## Network Requirements and Assumptions
|
||||
|
||||
### What assumptions do we need Waku to fulfill? - Corey
|
||||
> `Moh:` Waku needs to fill the following requirements, taken from the Carnot paper:
|
||||
|
||||
> **Definition 3** (Probabilistic Reliable Dissemination). _After the GST, and when the leader is correct, all the correct nodes deliver the proposal sent by the leader (w.h.p)._
|
||||
|
||||
> **Definition 4** (Probabilistic Fulfillment). _After the GST, and when the current and previous leaders are correct, the number of votes collected by teh current leader is $2c+1$ (w.h.p)._
|
||||
|
||||
## Tradeoffs
|
||||
|
||||
### I think the main clear disadvantage of such a scheme is the added latency of the multiple layers. - Alvaro
|
||||
|
||||
> `Moh:` The added latency will be O(log(n/C)), where C is the committee size. But I guess it will be hard to avoid it. Though it also depends on how fast the network layer (potentially Waku) propagats msgs and also on execution time of the transaction as well.
|
||||
|
||||
> `Alvaro:` Well IIUC the only latency we are introducing is directly proportional to the levels of subcommitee nesting (ie the log(n/C)), which is understandably the price to pay. We have to make sure though that what we gain by introducing this is really worth the extra cost vs the typical comittee formation via randao or perhaps VDFs
|
||||
|
||||
> `Moh:` Again the Typical committee formation with randao can reduce their wait time value to match our latency, but then it becomes vulnerable and fail if the network latency becomes greater than their slot interval. If they keep it too large it may not fail but becomes slow. We won't have that problem. If an adversary has the power to slow down the network then their liveness will fail, whereas we won't have that issue.
|
||||
|
||||
## How would you compare Aptos and Carnot? - Alvaro
|
||||
|
||||
> `Moh:` It is variant of DiemBFT, Sui is based on Nahrwal, both cannot scale to more than few hunderd of nodes. That is why they achieve that low latency.
|
||||
|
||||
> `Alvaro:` Yes, so they need to select a committee of that size in order to operate at that latency What's wrong with selecting a committee vs Carnot's solution? This I'm asking genuinely to understand and because everyone will ask this question when we release.
|
||||
|
||||
> `Moh:` When you select a committee you have to wait for a time slot to make sure the result of consensus has propagated. Again strong synchrony assumption (slot time), formation of forks, increase in PoS attack vector come into play
|
||||
Within committee the protocol does not need a wait time but for its results to get propagated if scalability is to be achieved, then wait time has to be added or signatures have to be collected from thousands of nodes.
|
||||
|
||||
> `Alvaro:` Can you elaborate?
|
||||
|
||||
> `Moh:` Ethereum (and any other protocol who runs the consensus in a single committee selected from a large group on nodes) has wait time so that the output of the consenus propagates to all honest nodes before the next committee is selected. Else the next committee will fail or only forks will be formed and chain length won't increase. But since this wait time as stated, increases latency, makes the protocol vulnerable, Ethereum wants to avoid it to achieve responsivess. To avoid wait time (add responsiveness) a protocol has to collect attestation signatures from 2/3rd of all nodes (not a single committee) to move to the second round (Carnot is already responsive). But aggregating and verifying signatures thousands of signatures is expensive and time consuming. This is why they are working to improve BLS signatures. Instead we have changed the consensus protocol in such a way that a small number of signatures need to be aggregated and verified to achieve responsiveness and fast finality. We can further improve performance by using the improved BLS signatures.
|
||||
|
||||
> One cannot achieve fast finality while running the consensus in a small committee. Because attestation of a Block within the single committee is not enough. This block can be averted if the leader of the next committee has not seen it. Therefore, there should be enough delay so that all honest nodes can see it. This is why we have this wait/slot time. Another issue can be a malicious leader from the next chosen committee can also avert a block of honest leader and hence preventing honest leaders from getting rewards. If blocks of honest leaders are averted for long time, stake of malicious leaders will increase. Moreover, malicious leaders can delay blocks of honest nodes by making fork and averting them. Addressing these issues will further make the protocol complex, while still laking fast finality.
|
||||
|
||||
## Data Distribution
|
||||
|
||||
### How much failure rate of erasure code transmission are we expecting. Basically, what are the EC coding parameters that we expect to be sending such that we have some failure rate of transmission? Has that been looked into? - Dmitriy
|
||||
> `Moh:` This is a great question and it points to the tension between the failure rate vs overhead. We have briefly looked into this (today me and Marcin @madxor discussed such cases), but we haven’t thoroughly analyzed this. In our case, the rate of failure also depends on committee size. We look into $10^{-3}$ to $10^{-6}$ probability of failure. And in this case, the coding overhead can be somewhere between 200%-500% approximately. This means for a committee size of 500 (while expecting receipt of messages from 251 correct nodes), for a failure rate of $10^{-6}$ a single node has to send > 6Mb of data for a 1Mb of actual data. Though 5x overhead is large, it still prevent us from sending/receiving 500 Mb of data in return for a failure probability of 1 proposal out of 1 million. From the protocol perspective, we can address EC failures in multiple ways: a: Since the root committee only forwards the coded chunks only when they have successfully rebuilt the block. This means the root committee can be contacted to download additional coded chunks to decode the block. b: We allow this failure and let the leader be replaced but since there is proof that the failure is due to the reason that a decoder failed to reconstruct the block, therefore, the leader cannot be punished (if we chose to employ punishment in PoS).
|
||||
|
||||
### How much data should a given block be. Are there limits on this and if so, what are they and what do they depend on? - Dmitriy
|
||||
> `Moh:` This question can be answered during simulations and experiments over links of different bandwidths and latencies. We will test the protocol performances with different block sizes. As we know increasing the block size results in increased throughput as well as latency. What is the most appropriate block size can be determined once we observe the tradeoff between throughput vs latency.
|
||||
|
||||
## Signature Propagation
|
||||
|
||||
### Who sends the signatures up from a given committee? Do that have any leadered power within the committee? - Tanguy
|
||||
> `Moh:` Each node in a committee multicasts its vote to all members of the parent committee. Since the size of the vote is small the bit complexity will be low. Introducing a leader within each committee will create a single point of failure within each committee. This is why we avoid maintaining a leader within each committee
|
||||
|
||||
## Network Scale
|
||||
|
||||
### What is our expected minimum number of nodes within the network? - Dmitriy
|
||||
> `Moh:` For a small number of nodes we can have just a single committee. But I am not sure how many nodes will join our network
|
||||
|
||||
## Byzantine Behavior
|
||||
|
||||
### Can we also consider a flavor that adds attestation/attribution to misbehaving nodes? That will come at a price but there might be a set of use cases which would like to have lower performance with strong attribution. Not saying that it must be part of the initial design, but can be think-through/added later. - Marcin
|
||||
> `Moh:` Attestation to misbehaving nodes is part of this protocol. For example, if a node sends an incorrect vote or if a leader proposes an invalid transaction, then this proof will be shared with the network to punish the misbehaving nodes (Though currently this is not part of pseudocode). But it is not possible to reliably prove the attestation of not participation.
|
||||
|
||||
> `Marcin:` Great, and definitely, we cannot attest that a node was not participating - I was not suggesting that;). But we can also think about extending the attestation for lazy-participants case (if it’s not already part of the protocol).
|
||||
|
||||
> `Moh:` OK, thanks for the clarification 😁 . Of course we can have this feature to forward the proof of participation of successor committees. In the first version of Carnot we had this feature as a sliding window. One could choose the size of the window (in terms of tree levels) for which a node should forward the proof of participation. In the most recent version the size of sliding window is 0. And it is 1 for the root committee. It means root committee members have to forward the proof of participation of their child committee members. Since I was able to prove protocol correctness without forwarding the proofs so we avoid it. But it can be part of the protocol without any significant changes in the protocol
|
||||
|
||||
> If the proof scheme is efficient ( as the results you presented) in practice and the cost of creating and verifying proofs is not significant then actually adding proofs can be good. But not required.
|
||||
|
||||
### Also, how do you reward online validators / punish offline ones if you can't prove at the block level that someone attested or not? - Tanguy
|
||||
> `Moh:` This is very tricky and so far no one has done it right (to my knowledge). Current reward mechanism for attestation, favours fast nodes.This means if malicious nodes in the network are fast, they can increase their stake in the network faster than the honest nodes and eventually take control of the network. Or in the case of Ethereum a Byzantine leader can include signature of malicious nodes more frequently in the proof of attestation, hence malicious nodes will be rewarded more frequently. Also let me add that I don't have definite answer to your question currently, but I think by revising the protocol assumptions, incentive mechanism and using a game theoretical approach this problem can be resolved.
|
||||
|
||||
> An honest node should wait for a specific number of children votes (to make sure everyone is voting on the same proposal) before voting but does not need to provide any cryptographic proof. Though we build a threshold signature from root committee members and it’s children but not from the whole tree. As long as enough number of nodes follow the the protocol we should be fine. I am working on protocol proofs. Also I think bugs should be discovered during development and testing phase. Changing protocol to detect potential bug might not be a good practice.
|
||||
|
||||
### doesn't having randomly distributed malicious nodes (say there is a 20%) increase the odds that over a third of a committee end up being from those malicious ones? It seems intuitive: since a 20% at the global scale is always <1/3, but when randomly distributed there is always non-zero chance they end up in a single group, thus affecting liveness more and more the closer we get to that global 1/3. Consequently, if I'm understanding the algorithm correctly, it would have worse liveness guarantees that classical pBFT, say with a randomly-selected commitee from the total set. - Alvaro
|
||||
|
||||
> `Alexander:` We assume that fraction of malicious nodes is $1/4$ and given we chooses comm. sizes, which will depend on total number of nodes, appropriately this guarantees that with high probability we are below $1/3$ in each committee.
|
||||
|
||||
> `Alvaro:` ok, but then both the global guarantee is below that current "standard" of 1/3 of malicious nodes and even then we are talking about non-zero probabilities that a comm has the power to slow down consensus via requiring reformation of comms (is this right?)
|
||||
|
||||
> `Alexander:` This is the price we pay to improve scalability. Also these probabilities of failure can be very low.
|
||||
|
||||
### What happens in Carnot when one committee is taken over by >1/3 intra-comm byzantine nodes? - Alvaro
|
||||
|
||||
> `Moh:` When there is a failure the overlay is recalculated. By gradually increasing the fault tolerance by a small value, the probability of failure of a committee slightly increases but upon recalculating the correct overlay, inactive nodes that caused the failure of previous overlay (when no committee has more than 1/3 Byzantine nodes) will be slashed.
|
||||
|
||||
|
||||
|
||||
## Synchronicity
|
||||
|
||||
### How to guarantee synchronicity. In particular how to avoid that in a big network different nodes see a proposal with 2c+1 votes but different votes and thus different random seed - Giacomo
|
||||
|
||||
> `Moh:` The assumption is that there exists some known finite time bound Δ and a special event called GST (Global Stabilization Time) such that:
|
||||
|
||||
> The adversary must cause the GST event to eventually happen after some unknown finite time. Any message sent at time x must be delivered by time $\delta + \text{max}(x,GST)$. In the Partial synchrony model, the system behaves asynchronously till GST and synchronously after GST.
|
||||
|
||||
> Moreover, votes travel one level at a time from tree leaves to the tree root. We only need the proof of votes of root+child committees to conclude with a high probability that the majority of nodes have voted.
|
||||
|
||||
### That's a timeout? How does this work exactly without timing assumptions? Trying to find this in the document -Alvaro
|
||||
|
||||
> `Moh:` Each committee only verifies the votes of its child committees. Once a verified 2/3rd votes of its child members, it then sends it vote to its parent. In this way each layer of the tree verifies the votes (attests) the layer below. Thus, a node does not have to collect and verify 2/3rd of all thousands of votes (as done in other responsive BFTs) but only from its child nodes.
|
||||
@@ -1,53 +0,0 @@
|
||||
---
|
||||
title: "Carnot Overview"
|
||||
tags:
|
||||
- "consensus"
|
||||
- "candidate"
|
||||
- "Carnot"
|
||||
editor: "Corey Petty"
|
||||
---
|
||||
|
||||
Carnot (formerly LogosBFT) is a Byzantine Fault Tolerant (BFT) [consensus](roadmap/consensus/index.md) candidate for the Nomos Network that utilizes Fountain Codes and a committees tree structure to optimize message propagation in the presence of a large number of nodes, while maintaining high througput and fast finality. More specifically, these are the research contributions in Carnot. To our knowledge, Carnot is the first consensus protocol that can achieve together all of these properties:
|
||||
|
||||
1. Scalability: Carnot is highly scalable, scaling to thousands of nodes.
|
||||
2. Responsiveness: The ability of a protocol to operate with the speed of a wire but not a maximum delay (block delay, slot time, etc.) is called responsiveness. Responsiveness reduces latency and helps the Carnot achieve Fast Finality. Moreover, it improves Carnot's resilience against adversaries that can slow down network traffic.
|
||||
3. Fork avoidance: Carnot avoids the formation of forks in a happy path. Forks formation has the following adverse consequences that the Carnot avoids.
|
||||
1. Wastage of resources on orphan blocks and reduced throughput with increased latency for transactions in orphan blocks
|
||||
2. Increased attack vector on PoS as attackers can employ a strategy to force the network to accept their fork resulting in increased stake for adversaries.
|
||||
|
||||
- [FAQ](FAQ.md): Here is a page that tracks various questions people have around Carnot.
|
||||
|
||||
## Work Streams
|
||||
|
||||
### Current State of the Art
|
||||
An ongoing survey of the current state of the art around Consensus Mechanisms and their peripheral dependencies is being conducted by Tuanir, and can be found in the following WIP Overleaf document:
|
||||
- [WIP Consensus SoK](https://www.overleaf.com/project/633acc1acaa6ffe456d1ab1f)
|
||||
|
||||
### Committee Tree Overlay
|
||||
The basis of Carnot is dependent upon establishing an committee overlay tree structure for message distribution.
|
||||
|
||||
An overview video can be found in the following link:
|
||||
- [Carnot Overview by Moh during Offsite](https://drive.google.com/file/d/17L0JPgC0L1ejbjga7_6ZitBfHUe3VO11/view?usp=sharing)
|
||||
|
||||
The details of this are being worked on by Moh and Alexander and can be found in the following overleaf documents:
|
||||
- [Moh's draft](https://www.overleaf.com/project/6341fb4a3cf4f20f158afad3)
|
||||
- [Alexander's notes on the statistical properties of committees](https://www.overleaf.com/project/630c7e20e56998385e7d8416)
|
||||
- [Alexander's python code for computing committee sizes](https://github.com/AMozeika/committees)
|
||||
|
||||
A simulation notebook is being worked on by Corey to investigate the properties of various tree overlay structures and estimate their practical performance:
|
||||
- [Corey's Overlay Jupyter Notebook](https://github.com/logos-co/scratch/tree/main/corpetty/committee_sim)
|
||||
|
||||
#### Failure Recovery
|
||||
There exists a timeout that triggers an overlay reconfiguration. Currently work is being done to calculate the probabilities of another failure based on a given percentage of byzantine nodes within the network.
|
||||
- [Recovery Failure Probabilities]() - LINK TO WORK HERE
|
||||
|
||||
### Random Beacon
|
||||
A random beacon is required to choose a leader and establish a seed for defining the overlay tree. Marcin is working on the various avenues. His previous presentations can be found in the following presentation slides (in chronological order):
|
||||
- [Intro to Multiparty Random Beacons](https://cloud.logos.co/index.php/s/b39EmQrZRt5rrfL)
|
||||
- [Circles of Trust](https://cloud.logos.co/index.php/s/NXJZX8X8pHg6akw)
|
||||
- [Compact Certificates of Knowledge](https://cloud.logos.co/index.php/s/oSJ4ykR4A55QHkG)
|
||||
|
||||
### Erasure Coding (LT Codes / Fountain Codes / Raptor Codes)
|
||||
In order to reduce message complexity during propagation, we are investigating the use of Luby Transform (LT) codes, more specifically [Fountain Codes](https://en.wikipedia.org/wiki/Fountain_code), to break up the block to be propagated to validators and recombined by local peers within a committee.
|
||||
- [LT Code implementation in Rust](https://github.com/chrido/fountain) - unclear about legal status of LT or Raptor Codes, it is currently under investigation.
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
---
|
||||
title: "Claro: Consensus Candidate"
|
||||
tags:
|
||||
- "consensus"
|
||||
- "candidate"
|
||||
- "claro"
|
||||
---
|
||||
|
||||
|
||||
|
||||
**Claro** (formerly Glacier) is a consensus candidate for the Logos network that aims to be an improvement to the Avalanche family of consensus protocols.
|
||||
|
||||
|
||||
### Implementations
|
||||
The protocol has been implemented in multiple languages to facilitate learning and testing. The individual code repositories can be found in the following links:
|
||||
- Rust (reference)
|
||||
- Python
|
||||
- Common Lisp
|
||||
|
||||
### Simulations/Experiments/Analysis
|
||||
In order to test the performance of the protocol, and how it stacked up to the Avalanche family of protocols, we have performed a multitude of simulations and experiments under various assumptions.
|
||||
- [Alvaro's initial Python implementations and simulation code](https://github.com/status-im/consensus-models)
|
||||
|
||||
### Specification
|
||||
Currently the Claro consensus protocol is being drafted into a specification so that other implementations can be created. It's draft resides under [Vac](https://vac.dev) and can be tracked [here](https://github.com/vacp2p/rfc/pull/512/)
|
||||
|
||||
### Additional Information
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
---
|
||||
title: "Development Work"
|
||||
tags:
|
||||
- "consensus"
|
||||
- "development"
|
||||
---
|
||||
@@ -1,14 +0,0 @@
|
||||
---
|
||||
title: "Consensus Prototypes"
|
||||
tags:
|
||||
- "consensus"
|
||||
- "development"
|
||||
---
|
||||
|
||||
Consensus Prototypes is a collection of Rust implementations of the [Consensus Candidates](tags/candidates)
|
||||
|
||||
## Tiny Node
|
||||
|
||||
|
||||
## Required Roles
|
||||
- Lead Developer (filled)
|
||||
@@ -1,22 +0,0 @@
|
||||
---
|
||||
title: "Consensus Work"
|
||||
tags:
|
||||
- "consensus"
|
||||
---
|
||||
|
||||
Consensus is the foundation of the network. It is how a group of peer-to-peer nodes understands how to agree on information in a distributed way, particuluarly in the presence of byzantine actors.
|
||||
|
||||
## Consensus Roadmap
|
||||
### Consensus Candidates
|
||||
- [Carnot](private/roadmap/consensus/candidates/carnot/overview.md) - Carnot is the current leading consensus candidate for the Nomos network. It is designed to maximize efficiency of message dissemination while supoorting hundreds of thousands of full validators. It gets its name from the thermodynamic concept of the [Carnot Cycle](https://en.wikipedia.org/wiki/Carnot_cycle), which defines maximal efficiency of work from heat through iterative gas expansions and contractions.
|
||||
- [Claro](claro.md) - Claro is a variant of the Avalanche Snow family of protocols, designed to be more efficient at the decision making process by leveraging the concept of "confidence" across peer responses.
|
||||
|
||||
|
||||
### Theoretical Analysis
|
||||
- [snow-family](snow-family.md)
|
||||
|
||||
### Development
|
||||
- [prototypes](prototypes.md)
|
||||
|
||||
## Open Roles
|
||||
- [distributed-systems-researcher](distributed-systems-researcher.md)
|
||||
@@ -1,11 +0,0 @@
|
||||
---
|
||||
title: "Consensus Theory Work"
|
||||
tags:
|
||||
- "consensus"
|
||||
- "theory"
|
||||
---
|
||||
|
||||
This track of work is dedicated to creating theoretical models of distributed consensus in order to evaluate them from a mathematical standpoint.
|
||||
|
||||
## Navigation
|
||||
- [Snow Family Analysis](snow-family.md)
|
||||
@@ -1,9 +0,0 @@
|
||||
---
|
||||
title: "Theoretical Analysis of the Snow Family of Consensus Protocols"
|
||||
tags:
|
||||
- "consensus"
|
||||
- "theory"
|
||||
- "snow"
|
||||
---
|
||||
|
||||
In order to evaluate the properties of the Avalanche family of consensus protocols more rigorously than the original [whitepapers](), we work to create an analytical framework to explore and better understand the theoretical boundaries of the underlying protocols, and under what parameterization they will break vs a set of adversarial strategies
|
||||
@@ -1,57 +0,0 @@
|
||||
---
|
||||
title: "A Specification proposal for using Waku for Carnot Consensus"
|
||||
tags:
|
||||
- "waku"
|
||||
- "carnot"
|
||||
- "networking"
|
||||
- "consensus"
|
||||
---
|
||||
|
||||
##### Definition Reference
|
||||
- $k$ - size of a given committee
|
||||
- $n_C$ - number of committees in the overlay, or nodes in the tree
|
||||
- $d$ - depth of the overlay tree
|
||||
- $n_d$ - number of committees at a given depth of the tree
|
||||
|
||||
## Motivation
|
||||
In #Carnot, an overlay is created to facilitate message distribution and voting aggregation. This document will focus on the differentiated channels of communication for message distribution. Whether or not voting aggregation and subsequenty traversal back up the tree can utilize the same channels will be investigated later.
|
||||
|
||||
The overlay is described as a binary tree of committees, where a individual in each committee propogates messages to an assigned node in their two children committees of the tree, until the leaf nodes have recieved enough information to reconstitute the proposal block.
|
||||
|
||||
This communication protocol will naturally form "pools of information streams" that people will need to listen to in order to do their assigned work:
|
||||
- inner committee communication
|
||||
- parent-child chain communication
|
||||
- intitial leader distribution
|
||||
|
||||
### **inner committee communication**
|
||||
all members of a given committee will need to gossip with each other in order to reform the initial proposal block
|
||||
- This results in $n_C$ pools of $k$-sized communication pools.
|
||||
|
||||
### **parent-child chain communication**
|
||||
The formation of the committee and the lifecycle of a chunk of erasure coded data forms a number of "parent-child" chains.
|
||||
- If we completely minimize the communcation between committees, then this results in $k$ number of $n_C$-sized communication pools.
|
||||
- It is not clear if individual levels of the tree needs to "execute" the message to their children, or if the root committee can broadcast to everyone within its assigned parent-chain communcation pool at the same time.
|
||||
- It is also unclear if individual levels of the tree need to send independant messages to each of their children, or if a unified communication pool can be leveraged at the tree-level. This results in $d$ communication pools of $n_d$-size.
|
||||
|
||||
### **initial leader distribution**
|
||||
For each proposal, a leader needs to distribute the erasure coded proposal block to the root committee
|
||||
- This results in a single communication pool of size $k(+1)$.
|
||||
- the $(+1)$ above is the leader, who could also be a part of the root committee. The leader changes with each block proposal, and we seek to minimize the time between leader selection and a round start. Thusly, this results in a requirement that each node in the network must maintain a connection to every node in the root committee.
|
||||
|
||||
## Proposal
|
||||
This part of the document will attempt to propose using various aspects of Waku, to facilitate both the setup of the above-mentioned communication pools as well as encryption schemes to add a layer of privacy (and hopefully efficiency) to message distribution.
|
||||
|
||||
We seek to minimize the availability of data such that an individual has only the information to do his job and nothing more.
|
||||
|
||||
We also seek to minimize the amount of messages being passed such that eventually everyone can reconstruct the initial proposal block
|
||||
|
||||
`???` for Waku-Relay, 6 connections is optimal, resulting in latency ???
|
||||
|
||||
`???` Is it better to have multiple pubsub topics with a simple encryption scheme or a single one with a complex encryption scheme
|
||||
|
||||
As there seems to be a lot of dynamic change from one proposal to the next, I would expect [`noise`](https://vac.dev/wakuv2-noise) to be a quality candidate to facilitate the creation of secure ephemeral keys in the to-be proposed encryption scheme.
|
||||
|
||||
It is also of interest how [`contentTopics`](https://rfc.vac.dev/spec/23/) can be leveraged to optimize the communication pools.
|
||||
|
||||
## Whiteboard diagram and notes
|
||||

|
||||
@@ -1,26 +0,0 @@
|
||||
---
|
||||
title: "P2P Networking Overview"
|
||||
tags:
|
||||
- "networking"
|
||||
- "overview"
|
||||
---
|
||||
|
||||
This page summarizes the work around the P2P networking layer of the Nomos project.
|
||||
|
||||
## Waku
|
||||
[Waku](https://waku.org) is an privacy-preserving, ephemeral, peer-to-peer (P2P) messaging suite of protocols which is developed under [Vac](https://vac.dev) and maintained/productionized by the [Logos Collective](https://logos.co).
|
||||
|
||||
It is hopeful that Nomos can leverage the work of the Waku project to provide the P2P networking layer and peripheral services associated with passing messages around the network. Below is a list of the associated work to investigate the use of Waku within the Nomos Project.
|
||||
|
||||
### Scalability and Fault-Tolerance Studies
|
||||
Currently, the amount of research and analysis of the scalability of Waku is not sufficient to give enough confidence that Waku can serve as the networking layer for the Nomos project. Thusly, it is our effort to push this analysis forward by investigating the various boundaries of scale for Waku. Below is a list of endeavors in this direction which we hope serves the broader community:
|
||||
- [Status' use of Waku study w/ Kurtosis](status-waku-kurtosis.md)
|
||||
- [Using Waku for Carnot Overlay](carnot-waku-specification.md)
|
||||
|
||||
### Rust implementations
|
||||
We have created and maintain a stop-gap solution to using Waku with the Rust programming language, which is wrapping the [go-waku](https://github.com/status-im/go-waku) library in Rust and publishing it as a crate. This library allows us to do tests with our [Tiny Node](roadmap/development/prototypes.md#Tiny-Node) implementation more quickly while also providing other projects in the ecosystem to leverage Waku within their Rust codebases more quickly.
|
||||
|
||||
It is desired that we implement a more robust and efficient Rust library for Waku, but this is a significant amount of work.
|
||||
|
||||
Links:
|
||||
- [Rust bindings to go-waku repo](https://github.com/waku-org/waku-rust-bindings)
|
||||
@@ -1,51 +0,0 @@
|
||||
---
|
||||
title: "Status Network Agents Breakdown"
|
||||
tags:
|
||||
- "status"
|
||||
- "waku"
|
||||
- "scalability"
|
||||
---
|
||||
|
||||
This page creates a model to describe the impact of the various clients within the Status ecosystem by describing their individual contribution to the messages within the Waku network they leverage.
|
||||
|
||||
This model will serve to create a realistic network topology while also informing the appropriate _dimensions of scale_ that are relevant to explore in the [Status Waku scalability study](status-waku-kurtosis.md)
|
||||
|
||||
Status has three main clients that users interface with (in increasing "network weight" ordering):
|
||||
- Status Web
|
||||
- Status Mobile
|
||||
- Status Desktop
|
||||
|
||||
Each of these clients has differing (on average) resources available to them, and thusly, provides and consumes different Waku protocols and services within the Status network. Here we will detail their associated messaging impact to the network using the following model:
|
||||
|
||||
```
|
||||
Agent
|
||||
- feature
|
||||
- protocol
|
||||
- contentTopic, messageType, payloadSize, frequency
|
||||
```
|
||||
|
||||
By describing all `Agents` and their associated feature list, we should be able do the following:
|
||||
|
||||
- Estimate how much impact per unit time an individual `Agent` impacts the Status network
|
||||
- Create a realistic network topology and usage within a simulation framework (_e.g._ Kurtosis)
|
||||
- Facilitate a Status Specification of `Agents`
|
||||
- Set an example for future agent based modeling and simulation work for the Waku protocol suite
|
||||
|
||||
## Status Web
|
||||
|
||||
## Status Mobile
|
||||
|
||||
## Status Desktop
|
||||
Status Desktop serves as the backbone for the Status Network, as the software runs on hardware that is has more available resources, typically has more stable network and robust connections, and generally has a drastically lower churn (or none at all). This results in it running the most Waku protocols for longer periods of time, resulting int he heaviest usage of the Waku network w.r.t. messaging.
|
||||
|
||||
Here is the model breakdown of its usage:
|
||||
```
|
||||
Status Desktop
|
||||
- Prekey bundle broadcast
|
||||
- Account sync
|
||||
- Historical message melivery
|
||||
- Waku-Relay (answering message queries)
|
||||
- Message propogation
|
||||
- Waku-Relay
|
||||
- Waku-Lightpush (receiving)
|
||||
```
|
||||
@@ -1,22 +0,0 @@
|
||||
---
|
||||
title: "Status' use of Waku - A Scalability Study"
|
||||
tags:
|
||||
- "networking"
|
||||
- "scalability"
|
||||
- "waku"
|
||||
---
|
||||
|
||||
[Status](https://status.im) is the largest consumer of the Waku protocol, leveraging it for their entire networking stack. THeir upcoming release of Status Desktop and the associated Communities product will heavily push the limits of what Waku can do. As mentioned in the [Networking Overview](private/roadmap/networking/overview.md) page, rigorous scalability studies have yet to be conducted of Waku (v2).
|
||||
|
||||
While these studies most immediately benefit the Status product suite, it behooves the Nomos Project to assist as the lessons learned immediately inform us the limits of what the Waku protocol suite can handle, and how that fits within our [Technical Requirements](private/requirements/overview.md).
|
||||
|
||||
This work has been kicked off as a partnership with the [Kurtosis](https://kurtosis.com) distributed systems development platform. It is our hope that the experience and accumen gained during this partnership and study will serve us in the future with respect to Nomos developme, and more broadly, all projects under the Logos Collective.
|
||||
|
||||
As such, here is an overview of the various resources towards this endeavor:
|
||||
- [Status Network Agent Breakdown](status-network-agents.md) - A document that describes the archetypal agents that participate in the Status Network and their associated Waku consumption.
|
||||
- [Wakurtosis repo](https://github.com/logos-co/wakurtosis) - A Kurtosis module to run scalability studies
|
||||
- [Waku Topology Test repo](https://github.com/logos-co/Waku-topology-test) - a Python script that facilitates setting up a reasonable network topology for the purpose of injecting the network configuration into the above Kurtosis repo
|
||||
- [Initial Vac forum post introducing this work](https://forum.vac.dev/t/waku-v2-scalability-studies/142)
|
||||
- [Waku Github Issue detailing work progression](https://github.com/waku-org/pm/issues/2)
|
||||
- this is also a place to maintain communications of progress
|
||||
- [Initial Waku V2 theoretical scalability study](https://vac.dev/waku-v1-v2-bandwidth-comparison)
|
||||
@@ -1,64 +0,0 @@
|
||||
---
|
||||
titles: "Virtual Machines Overview"
|
||||
tags:
|
||||
- "virtual machines"
|
||||
- "zero knowledge"
|
||||
---
|
||||
|
||||
## Motivation
|
||||
Logos seeks to use a privacy-first virtual machine for transaction execution. We believe this can only be acheived through zero-knowledge. The majority of current work in the field focuses more towards the aggregation and subsequent verification of transactions. This leads us to explore the researching and development of a privacy-first virtual machine.
|
||||
|
||||
LINK TO APPROPRIATE NETWORK REQUIREMENTS HERE
|
||||
|
||||
#### Educational Resources
|
||||
- primer on Zero Knowledge Virtual Machines - [link](https://youtu.be/GRFPGJW0hic)
|
||||
|
||||
### Implementations:
|
||||
- TinyRAM - link
|
||||
- CairoVM
|
||||
- zkSync
|
||||
- Hermes
|
||||
- [MIDEN](https://polygon.technology/solutions/polygon-miden/) (Polygon)
|
||||
- RISC-0
|
||||
- RISC-0 Rust Starter Repository - [link](https://github.com/risc0/risc0-rust-starter)
|
||||
- targets RISC-V architecture
|
||||
- benefits:
|
||||
- a lot of languages already compile to RISC-V
|
||||
- negatives:
|
||||
- not optimized or EVM where most tooling exists currently
|
||||
|
||||
## General Building Blocks of a ZK-VM
|
||||
- CPU
|
||||
- modeled with "execution trays"
|
||||
- RAM
|
||||
- overhead to look out for
|
||||
- range checks
|
||||
- bitwise operations
|
||||
- hashing
|
||||
- Specialized circuits
|
||||
- Recursion
|
||||
|
||||
## Approaches
|
||||
- zk-WASM
|
||||
- zk-EVM
|
||||
- RISC-0
|
||||
- RISK-0 Rust Starter Repository - [link](https://github.com/risc0/risc0-rust-starter)
|
||||
- targets RISC-V architecture
|
||||
- benefits:
|
||||
- a lot of languages already compile to RISC-V
|
||||
- https://youtu.be/2MXHgUGEsHs - Why use the RISC Zero zkVM?
|
||||
- negatives:
|
||||
- not optimized or EVM where most tooling exists currently
|
||||
|
||||
## General workstreams
|
||||
- bytecode compiler
|
||||
- zero-knowledge circuit design
|
||||
- opcode architecture (???)
|
||||
- engineering
|
||||
- required proof system
|
||||
- control flow
|
||||
- MAST (as used in MIDEN)
|
||||
|
||||
## Roles
|
||||
- [ZK Research Engineer](zero-knowledge-research-engineer.md)
|
||||
- Senior Rust Developer
|
||||
@@ -1,83 +0,0 @@
|
||||
---
|
||||
title: "Open Role: Distributed Systems Researcher"
|
||||
tags:
|
||||
- "role"
|
||||
---
|
||||
|
||||
|
||||
## About Status
|
||||
|
||||
Status is building the tools and infrastructure for the advancement of a secure, private, and open web3.
|
||||
|
||||
With the high level goals of preserving the right to privacy, mitigating the risk of censorship, and promoting economic trade in a transparent, open manner, Status is building a community where anyone is welcome to join and contribute.
|
||||
|
||||
As an organization, Status seeks to push the web3 ecosystem forward through research, creation of developer tools, and support of the open source community.
|
||||
|
||||
As a product, Status is an open source, Ethereum-based app that gives users the power to chat, transact, and access a revolutionary world of DApps on the decentralized web. But Status is also building foundational infrastructure for the whole Ethereum ecosystem, including the Nimbus ETH 1.0 and 2.0 clients, the Keycard hardware wallet, and the Waku messaging protocol (a continuation of Whisper).
|
||||
|
||||
As a team, Status has been completely distributed since inception. Our team is currently 100+ core contributors strong, and welcomes a growing number of community members from all walks of life, scattered all around the globe.
|
||||
|
||||
We care deeply about open source, and our organizational structure has minimal hierarchy and no fixed work hours. We believe in working with a high degree of autonomy while supporting the organization's priorities.
|
||||
|
||||
|
||||
|
||||
## Who are we?
|
||||
|
||||
We are the Blockchain Infrastructure Team, and we are building the foundation used by other projects at the Status Network. We are researching consensus algorithms, Multi-Party Computation techniques, ZKPs and other cutting-edge solutions with the aim to take the blockchain technology to the next level of security, decentralization and scalability for a wide range of use cases. We are currently in a research phase, working with models and simulations. In the near future, we will start implementing the research. You will have the opportunity to participate in developing -and improving- the state of the art of blockchain technologies, as well as turning it into a reality
|
||||
|
||||
## The job
|
||||
|
||||
**Responsibilities:**
|
||||
- This role is dedicated to pure research
|
||||
- Primarily, ensuring that solutions are sound and diving deeper into their formal definition.
|
||||
- Additionally, he/she would be regularly going through papers, bringing new ideas and staying up-to-date.
|
||||
- Designing, specifying and verifying distributed systems by leveraging formal and experimental techniques.
|
||||
- Conducting theoretical and practical analysis of the performance of distributed systems.
|
||||
- Designing and analysing incentive systems.
|
||||
- Collaborating with both internal and external customers and the teams responsible for the actual implementation.
|
||||
- Researching new techniques for designing, analysing and implementing dependable distributed systems.
|
||||
- Publishing and presenting research results both internally and externally.
|
||||
|
||||
|
||||
**Ideally you will have:**
|
||||
[Don’t worry if you don’t meet all of these criteria, we’d still love to hear from you anyway if you think you’d be a great fit for this role!]
|
||||
- Strong background in Computer Science and Math, or a related area.
|
||||
- Academic background (The ability to analyze, digest and improve the State of the Art in our fields of interest. Specifically, familiarity with formal proofs and/or the scientific method.)
|
||||
- Distributed Systems with a focus on Blockchain
|
||||
- Analysis of algorithms
|
||||
- Familiarity with Python and/or complex systems modeling software
|
||||
- Deep knowledge of algorithms (much more academic, such as have dealt with papers, moving from research to pragmatic implementation)
|
||||
- Experience in analysing the correctness and security of distributed systems.
|
||||
- Familiarity with the application of formal method techniques.
|
||||
- Comfortable with “reverse engineering” code in a number of languages including Java, Go, Rust, etc. Even if no experience in these languages, the ability to read and "reverse engineer" code of other projects is important.
|
||||
- Keen communicator, eager to share your work in a wide variety of contexts, like internal and public presentations, blog posts and academic papers.
|
||||
- Capable of deep and creative thinking.
|
||||
- Passionate about blockchain technology in general.
|
||||
- Able to manage the uncertainties and ambiguities associated with working in a remote-first, distributed, decentralised environment.
|
||||
- A strong alignment to our principles: https://status.im/about/#our-principles
|
||||
|
||||
|
||||
**Bonus points:**
|
||||
- Experience working remotely.
|
||||
- Experience working for an open source organization.
|
||||
- TLA+/PRISM would be desirable.
|
||||
- PhD in Computer Science, Mathematics, or a related area.
|
||||
- Experience Multi-Party Computation and Zero-Knowledge Proofs
|
||||
- Track record of scientific publications.
|
||||
- Previous experience in remote or globally distributed teams.
|
||||
|
||||
## Hiring process
|
||||
|
||||
The hiring process for this role will be:
|
||||
- Interview with our People Ops team
|
||||
- Interview with Alvaro (Team Lead)
|
||||
- Interview with Corey (Chief Security Officer)
|
||||
- Interview with Jarrad (Cofounder) or Daniel
|
||||
|
||||
The steps may change along the way if we see it makes sense to adapt the interview stages, so please consider the above as a guideline.
|
||||
|
||||
|
||||
|
||||
## Compensation
|
||||
|
||||
We are happy to pay salaries in either 100% fiat or any mix of fiat and/or crypto. For more information regarding benefits at Status: https://people-ops.status.im/tag/perks/
|
||||
@@ -1,63 +0,0 @@
|
||||
---
|
||||
title: "Rust Developer"
|
||||
tags:
|
||||
- "role"
|
||||
- "engineering"
|
||||
- "rust"
|
||||
---
|
||||
|
||||
# Role: Rust Developer
|
||||
at Status
|
||||
|
||||
Remote, Worldwide
|
||||
|
||||
**About Status**
|
||||
|
||||
Status is an organization building the tools and infrastructure for the advancement of a secure, private, and open web3. We have been completely distributed since inception. Our team is currently 100+ core contributors strong and welcomes a growing number of community members from all walks of life, scattered all around the globe. We care deeply about open source, and our organizational structure has a minimal hierarchy and no fixed work hours. We believe in working with a high degree of autonomy while supporting the organization's priorities.
|
||||
|
||||
**About Logos**
|
||||
|
||||
A group of Status Contributors is also involved in a new community lead project, called Logos, and this particular role will enable you to also focus on this project. Logos is a grassroots movement to provide trust-minimized, corruption-resistant governing services and social institutions to underserved citizens.
|
||||
|
||||
Logos’ infrastructure will provide a base for the provisioning of the next-generation of governing services and social institutions - paving the way to economic opportunities for those who need them most, whilst respecting basic human rights through the network’s design.You can read more about Logos here: [in this small handbook](https://github.com/acid-info/public-assets/blob/master/logos-manual.pdf) for mindful readers like yourself.
|
||||
|
||||
**Who are we?**
|
||||
|
||||
We are the Blockchain Infrastructure Team, and we are building the foundation used by other projects at the [Status Network](https://statusnetwork.com/). We are researching consensus algorithms, Multi-Party Computation techniques, ZKPs and other cutting-edge solutions with the aim to take the blockchain technology to the next level of security, decentralization and scalability for a wide range of use cases. We are currently in a research phase, working with models and simulations. In the near future, we will start implementing the research. You will have the opportunity to participate in developing -and improving- the state of the art of blockchain technologies, as well as turning it into a reality.
|
||||
|
||||
**Responsibilities:**
|
||||
|
||||
- Develop and maintenance of internal rust libraries
|
||||
- 1st month: comfortable with dev framework, simulation app. Improve python lib?
|
||||
- 2th-3th month: Start dev of prototype node services
|
||||
|
||||
**Ideally you will have:**
|
||||
|
||||
- “Extensive” Rust experience (Async programming is a must)
|
||||
Ideally they have some GitHub projects to show
|
||||
- Experience with Python
|
||||
- Strong competency in developing and maintaining complex libraries or applications
|
||||
- Experience in, and passion for, blockchain technology.
|
||||
- A strong alignment to our principles: [https://status.im/about/#our-principles](https://status.im/about/#our-principles)
|
||||
|
||||
|
||||
**Bonus points if**
|
||||
|
||||
- E.g. Comfortable working remotely and asynchronously
|
||||
- Experience working for an open source organization.
|
||||
- Peer-to-peer or networking experience
|
||||
|
||||
_[Don’t worry if you don’t meet all of these criteria, we’d still love to hear from you anyway if you think you’d be a great fit for this role!]_
|
||||
|
||||
**Compensation**
|
||||
|
||||
We are happy to pay in either 100% fiat or any mix of fiat and/or crypto. For more information regarding benefits at Status: [https://people-ops.status.im/tag/perks/](https://people-ops.status.im/tag/perks/)
|
||||
|
||||
**Hiring Process**
|
||||
|
||||
The hiring process for this role will be:
|
||||
|
||||
1. Interview with Maya (People Ops team)
|
||||
2. Interview with Corey (Logos Program Owner)
|
||||
3. Interview with Daniel (Engineering Lead)
|
||||
4. Interview with Jarrad (Cofounder)
|
||||
@@ -1,79 +0,0 @@
|
||||
---
|
||||
title: "Zero Knowledge Research Engineer"
|
||||
tags:
|
||||
- "engineering"
|
||||
- "role"
|
||||
- "zero knowledge"
|
||||
---
|
||||
at Status
|
||||
|
||||
Remote, Worldwide
|
||||
|
||||
**About Status**
|
||||
|
||||
Status is building the tools and infrastructure for the advancement of a secure, private, and open web3.
|
||||
|
||||
With the high level goals of preserving the right to privacy, mitigating the risk of censorship, and promoting economic trade in a transparent, open manner, Status is building a community where anyone is welcome to join and contribute.
|
||||
|
||||
As an organization, Status seeks to push the web3 ecosystem forward through research, creation of developer tools, and support of the open source community.
|
||||
|
||||
As a product, Status is an open source, Ethereum-based app that gives users the power to chat, transact, and access a revolutionary world of DApps on the decentralized web. But Status is also building foundational infrastructure for the whole Ethereum ecosystem, including the Nimbus ETH 1.0 and 2.0 clients, the Keycard hardware wallet, and the Waku messaging protocol (a continuation of Whisper).
|
||||
|
||||
As a team, Status has been completely distributed since inception. Our team is currently 100+ core contributors strong, and welcomes a growing number of community members from all walks of life, scattered all around the globe.
|
||||
|
||||
We care deeply about open source, and our organizational structure has minimal hierarchy and no fixed work hours. We believe in working with a high degree of autonomy while supporting the organization's priorities.
|
||||
|
||||
**Who are we**
|
||||
|
||||
[Vac](http://vac.dev/) **builds** [public good](https://en.wikipedia.org/wiki/Public_good) protocols for the decentralized web.
|
||||
|
||||
We do applied research based on which we build protocols, libraries and publications. Custodians of protocols that reflect [a set of principles](http://vac.dev/principles) - liberty, privacy, etc.
|
||||
|
||||
You can see a sample of some of our work here: [Vac, Waku v2 and Ethereum Messaging](https://vac.dev/waku-v2-ethereum-messaging), [Privacy-preserving p2p economic spam protection in Waku v2](https://vac.dev/rln-relay), [Waku v2 RFC](https://rfc.vac.dev/spec/10/). Our attitude towards ZK: [Vac <3 ZK](https://forum.vac.dev/t/vac-3-zk/97).
|
||||
|
||||
**The role**
|
||||
|
||||
This role will be part of a new team that will make a provable and private WASM engine that runs everywhere. As a research engineer, you will be responsible for researching, designing, analyzing and implementing circuits that allow for proving private computation of execution in WASM. This includes having a deep understanding of relevant ZK proof systems and tooling (zk-SNARK, Circom, Plonk/Halo 2, zk-STARK, etc), as well as different architectures (zk-EVM Community Effort, Polygon Hermez and similar) and their trade-offs. You will collaborate with the Vac Research team, and work with requirements from our new Logos program. As one of the first hires of a greenfield project, you are expected to take on significant responsibility, while collaborating with other research engineers, including compiler engineers and senior Rust engineers.
|
||||
|
||||
|
||||
**Key responsibilities**
|
||||
|
||||
- Research, analyze and design proof systems and architectures for private computation
|
||||
- Be familiar and adapt to research needs zero-knowledge circuits written in Rust Design and implement zero-knowledge circuits in Rust
|
||||
- Write specifications and communicate research findings through write-ups
|
||||
- Break down complex problems, and know what can and what can’t be dealt with later
|
||||
- Perform security analysis, measure performance of and debug circuits
|
||||
|
||||
**You ideally will have**
|
||||
|
||||
- Very strong academic or engineering background (PhD-level or equivalent in industry); relevant research experience
|
||||
- Experience with low level/strongly typed languages (C/C++/Go/Rust or Java/C#)
|
||||
- Experience with Open Source software
|
||||
- Deep understanding of Zero-Knowledge proof systems (zk-SNARK, circom, Plonk/Halo2, zk-STARK), elliptic curve cryptography, and circuit design
|
||||
- Keen communicator, eager to share your work in a wide variety of contexts, like internal and public presentations, blog posts and academic papers.
|
||||
- Experience in, and passion for, blockchain technology.
|
||||
- A strong alignment to our principles: [https://status.im/about/#our-principles](https://status.im/about/#our-principles)
|
||||
|
||||
**Bonus points if**
|
||||
|
||||
- Experience in provable and/or private computation (zkEVM, other ZK VM)
|
||||
- Rust Zero Knowledge tooling
|
||||
- Experience with WebAssemblyWASM
|
||||
|
||||
[Don’t worry if you don’t meet all of these criteria, we’d still love to hear from you anyway if you think you’d be a great fit for this role. Just explain to us why in your cover letter].
|
||||
|
||||
**Hiring process**
|
||||
|
||||
The hiring process for this role will be:
|
||||
|
||||
1. Interview with Angel/Maya from our Talent team
|
||||
2. Interview with team member from the Vac team
|
||||
3. Pair programming task with the Vac team
|
||||
4. Interview with Oskar, the Vac team lead
|
||||
5. Interview with Jacek, Program lead
|
||||
|
||||
The steps may change along the way if we see it makes sense to adapt the interview stages, so please consider the above as a guideline.
|
||||
|
||||
**Compensation**
|
||||
|
||||
We are happy to pay in either 100% fiat or any mix of fiat and/or crypto. For more information regarding benefits at Status: [https://people-ops.status.im/tag/perks/](https://people-ops.status.im/tag/perks/)
|
||||
5
content/tags copy/component.md
Normal file
5
content/tags copy/component.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: Components
|
||||
---
|
||||
|
||||
Want to create your own custom component? Check out the advanced guide on [[creating components]] for more information.
|
||||
3
docs/advanced/index.md
Normal file
3
docs/advanced/index.md
Normal file
@@ -0,0 +1,3 @@
|
||||
---
|
||||
title: "Advanced"
|
||||
---
|
||||
@@ -35,7 +35,7 @@ Some common frontmatter fields that are natively supported by Quartz:
|
||||
|
||||
## Syncing your Content
|
||||
|
||||
When you're Quartz is at a point you're happy with, you can save your changes to GitHub by doing `npx quartz sync`.
|
||||
When your Quartz is at a point you're happy with, you can save your changes to GitHub by doing `npx quartz sync`.
|
||||
|
||||
> [!hint] Flags and options
|
||||
> For full help options, you can run `npx quartz sync --help`.
|
||||
@@ -31,6 +31,7 @@ This part of the configuration concerns anything that can affect the whole site.
|
||||
- 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`
|
||||
- Note that Quartz 4 will avoid using this as much as possible and use relative URLs whenever it can to make sure your site works no matter _where_ you end up actually deploying it.
|
||||
- `ignorePatterns`: a list of [glob](<https://en.wikipedia.org/wiki/Glob_(programming)>) patterns that Quartz should ignore and not search through when looking for files inside the `content` folder. See [[private pages]] for more details.
|
||||
- `defaultDateType`: whether to use created, modified, or published as the default date to display on pages and page listings.
|
||||
- `theme`: configure how the site looks.
|
||||
- `typography`: what fonts to use. Any font available on [Google Fonts](https://fonts.google.com/) works here.
|
||||
- `header`: Font to use for headers
|
||||
38
docs/features/OxHugo compatibility.md
Normal file
38
docs/features/OxHugo compatibility.md
Normal file
@@ -0,0 +1,38 @@
|
||||
---
|
||||
tags:
|
||||
- plugin/transformer
|
||||
---
|
||||
|
||||
[org-roam](https://www.orgroam.com/) is a plain-text personal knowledge management system for [emacs](https://en.wikipedia.org/wiki/Emacs). [ox-hugo](https://github.com/kaushalmodi/ox-hugo) is org exporter backend that exports `org-mode` files to [Hugo](https://gohugo.io/) compatible Markdown.
|
||||
|
||||
Because the Markdown generated by ox-hugo is not pure Markdown but Hugo specific, we need to transform it to fit into Quartz. This is done by `Plugin.OxHugoFlavouredMarkdown`. Even though this [[making plugins|plugin]] was written with `ox-hugo` in mind, it should work for any Hugo specific Markdown.
|
||||
|
||||
```typescript title="quartz.config.ts"
|
||||
plugins: {
|
||||
transformers: [
|
||||
Plugin.FrontMatter({ delims: "+++", language: "toml" }), // if toml frontmatter
|
||||
// ...
|
||||
Plugin.OxHugoFlavouredMarkdown(),
|
||||
Plugin.GitHubFlavoredMarkdown(),
|
||||
// ...
|
||||
],
|
||||
},
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
Quartz by default doesn't understand `org-roam` files as they aren't Markdown. You're responsible for using an external tool like `ox-hugo` to export the `org-roam` files as Markdown content to Quartz and managing the static assets so that they're available in the final output.
|
||||
|
||||
## Configuration
|
||||
|
||||
- Link resolution
|
||||
- `wikilinks`: Whether to replace `{{ relref }}` with Quartz [[wikilinks]]
|
||||
- `removePredefinedAnchor`: Whether to remove [pre-defined anchor set by ox-hugo](https://ox-hugo.scripter.co/doc/anchors/).
|
||||
- Image handling
|
||||
- `replaceFigureWithMdImg`: Whether to replace `<figure/>` with `![]()`
|
||||
- Formatting
|
||||
- `removeHugoShortcode`: Whether to remove hugo shortcode syntax (`{{}}`)
|
||||
|
||||
> [!warning]
|
||||
>
|
||||
> While you can use `Plugin.OxHugoFlavoredMarkdown` and `Plugin.ObsidianFlavoredMarkdown` together, it's not recommended because it might mutate the file in unexpected ways. Use with caution.
|
||||
@@ -3,3 +3,5 @@ Quartz creates an RSS feed for all the content on your site by generating an `in
|
||||
## Configuration
|
||||
|
||||
- Remove RSS feed: set the `enableRSS` field of `Plugin.ContentIndex` in `quartz.config.ts` to be `false`.
|
||||
- Change number of entries: set the `rssLimit` field of `Plugin.ContentIndex` to be the desired value. It defaults to latest 10 items.
|
||||
- Use rich HTML output in RSS: set `rssFullHtml` field of `Plugin.ContentIndex` to be `true`.
|
||||
240
docs/features/explorer.md
Normal file
240
docs/features/explorer.md
Normal file
@@ -0,0 +1,240 @@
|
||||
---
|
||||
title: "Explorer"
|
||||
tags:
|
||||
- component
|
||||
---
|
||||
|
||||
Quartz features an explorer that allows you to navigate all files and folders on your site. It supports nested folders and is highly customizable.
|
||||
|
||||
By default, it shows all folders and files on your page. To display the explorer in a different spot, you can edit the [[layout]].
|
||||
|
||||
Display names for folders get determined by the `title` frontmatter field in `folder/index.md` (more detail in [[authoring content | Authoring Content]]). If this file does not exist or does not contain frontmatter, the local folder name will be used instead.
|
||||
|
||||
> [!info]
|
||||
> The explorer uses local storage by default to save the state of your explorer. This is done to ensure a smooth experience when navigating to different pages.
|
||||
>
|
||||
> To clear/delete the explorer state from local storage, delete the `fileTree` entry (guide on how to delete a key from local storage in chromium based browsers can be found [here](https://docs.devolutions.net/kb/general-knowledge-base/clear-browser-local-storage/clear-chrome-local-storage/)). You can disable this by passing `useSavedState: false` as an argument.
|
||||
|
||||
## Customization
|
||||
|
||||
Most configuration can be done by passing in options to `Component.Explorer()`.
|
||||
|
||||
For example, here's what the default configuration looks like:
|
||||
|
||||
```typescript title="quartz.layout.ts"
|
||||
Component.Explorer({
|
||||
title: "Explorer", // title of the explorer component
|
||||
folderClickBehavior: "collapse", // what happens when you click a folder ("link" to navigate to folder page on click or "collapse" to collapse folder on click)
|
||||
folderDefaultState: "collapsed", // default state of folders ("collapsed" or "open")
|
||||
useSavedState: true, // wether to use local storage to save "state" (which folders are opened) of explorer
|
||||
// Sort order: folders first, then files. Sort folders and files alphabetically
|
||||
sortFn: (a, b) => {
|
||||
... // default implementation shown later
|
||||
},
|
||||
filterFn: filterFn: (node) => node.name !== "tags", // filters out 'tags' folder
|
||||
mapFn: undefined,
|
||||
// what order to apply functions in
|
||||
order: ["filter", "map", "sort"],
|
||||
})
|
||||
```
|
||||
|
||||
When passing in your own options, you can omit any or all of these fields if you'd like to keep the default value for that field.
|
||||
|
||||
Want to customize it even more?
|
||||
|
||||
- Removing table of contents: remove `Component.Explorer()` from `quartz.layout.ts`
|
||||
- (optional): After removing the explorer component, you can move the [[table of contents | Table of Contents]] component back to the `left` part of the layout
|
||||
- Changing `sort`, `filter` and `map` behavior: explained in [[#Advanced customization]]
|
||||
- Component:
|
||||
- Wrapper (Outer component, generates file tree, etc): `quartz/components/Explorer.tsx`
|
||||
- Explorer node (recursive, either a folder or a file): `quartz/components/ExplorerNode.tsx`
|
||||
- Style: `quartz/components/styles/explorer.scss`
|
||||
- Script: `quartz/components/scripts/explorer.inline.ts`
|
||||
|
||||
## Advanced customization
|
||||
|
||||
This component allows you to fully customize all of its behavior. You can pass a custom `sort`, `filter` and `map` function.
|
||||
All functions you can pass work with the `FileNode` class, which has the following properties:
|
||||
|
||||
```ts title="quartz/components/ExplorerNode.tsx" {2-5}
|
||||
export class FileNode {
|
||||
children: FileNode[] // children of current node
|
||||
name: string // last part of slug
|
||||
displayName: string // what actually should be displayed in the explorer
|
||||
file: QuartzPluginData | null // set if node is a file, see `QuartzPluginData` for more detail
|
||||
depth: number // depth of current node
|
||||
|
||||
... // rest of implementation
|
||||
}
|
||||
```
|
||||
|
||||
Every function you can pass is optional. By default, only a `sort` function will be used:
|
||||
|
||||
```ts title="Default sort function"
|
||||
// Sort order: folders first, then files. Sort folders and files alphabetically
|
||||
Component.Explorer({
|
||||
sortFn: (a, b) => {
|
||||
if ((!a.file && !b.file) || (a.file && b.file)) {
|
||||
return a.displayName.localeCompare(b.displayName)
|
||||
}
|
||||
if (a.file && !b.file) {
|
||||
return 1
|
||||
} else {
|
||||
return -1
|
||||
}
|
||||
},
|
||||
})
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
You can pass your own functions for `sortFn`, `filterFn` and `mapFn`. All functions will be executed in the order provided by the `order` option (see [[#Customization]]). These functions behave similarly to their `Array.prototype` counterpart, except they modify the entire `FileNode` tree in place instead of returning a new one.
|
||||
|
||||
For more information on how to use `sort`, `filter` and `map`, you can check [Array.prototype.sort()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort), [Array.prototype.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter) and [Array.prototype.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).
|
||||
|
||||
Type definitions look like this:
|
||||
|
||||
```ts
|
||||
sortFn: (a: FileNode, b: FileNode) => number
|
||||
filterFn: (node: FileNode) => boolean
|
||||
mapFn: (node: FileNode) => void
|
||||
```
|
||||
|
||||
> [!tip]
|
||||
> You can check if a `FileNode` is a folder or a file like this:
|
||||
>
|
||||
> ```ts
|
||||
> if (node.file) {
|
||||
> // node is a file
|
||||
> } else {
|
||||
> // node is a folder
|
||||
> }
|
||||
> ```
|
||||
|
||||
## Basic examples
|
||||
|
||||
These examples show the basic usage of `sort`, `map` and `filter`.
|
||||
|
||||
### Use `sort` to put files first
|
||||
|
||||
Using this example, the explorer will alphabetically sort everything, but put all **files** above all **folders**.
|
||||
|
||||
```ts title="quartz.layout.ts"
|
||||
Component.Explorer({
|
||||
sortFn: (a, b) => {
|
||||
if ((!a.file && !b.file) || (a.file && b.file)) {
|
||||
return a.displayName.localeCompare(b.displayName)
|
||||
}
|
||||
if (a.file && !b.file) {
|
||||
return -1
|
||||
} else {
|
||||
return 1
|
||||
}
|
||||
},
|
||||
})
|
||||
```
|
||||
|
||||
### Change display names (`map`)
|
||||
|
||||
Using this example, the display names of all `FileNodes` (folders + files) will be converted to full upper case.
|
||||
|
||||
```ts title="quartz.layout.ts"
|
||||
Component.Explorer({
|
||||
mapFn: (node) => {
|
||||
node.displayName = node.displayName.toUpperCase()
|
||||
},
|
||||
})
|
||||
```
|
||||
|
||||
### Remove list of elements (`filter`)
|
||||
|
||||
Using this example, you can remove elements from your explorer by providing an array of folders/files using the `omit` set.
|
||||
|
||||
```ts title="quartz.layout.ts"
|
||||
Component.Explorer({
|
||||
filterFn: (node) => {
|
||||
// set containing names of everything you want to filter out
|
||||
const omit = new Set(["authoring content", "tags", "hosting"])
|
||||
return !omit.has(node.name.toLowerCase())
|
||||
},
|
||||
})
|
||||
```
|
||||
|
||||
You can customize this by changing the entries of the `omit` set. Simply add all folder or file names you want to remove.
|
||||
|
||||
### Show every element in explorer
|
||||
|
||||
To override the default filter function that removes the `tags` folder from the explorer, you can set the filter function to `undefined`.
|
||||
|
||||
```ts title="quartz.layout.ts"
|
||||
Component.Explorer({
|
||||
filterFn: undefined, // apply no filter function, every file and folder will visible
|
||||
})
|
||||
```
|
||||
|
||||
## Advanced examples
|
||||
|
||||
### Add emoji prefix
|
||||
|
||||
To add emoji prefixes (📁 for folders, 📄 for files), you could use a map function like this:
|
||||
|
||||
```ts title="quartz.layout.ts"
|
||||
Component.Explorer({
|
||||
mapFn: (node) => {
|
||||
// dont change name of root node
|
||||
if (node.depth > 0) {
|
||||
// set emoji for file/folder
|
||||
if (node.file) {
|
||||
node.displayName = "📄 " + node.displayName
|
||||
} else {
|
||||
node.displayName = "📁 " + node.displayName
|
||||
}
|
||||
}
|
||||
},
|
||||
}})
|
||||
```
|
||||
|
||||
### Putting it all together
|
||||
|
||||
In this example, we're going to customize the explorer by using functions from examples above to [[#Add emoji prefix | add emoji prefixes]], [[#remove-list-of-elements-filter| filter out some folders]] and [[#use-sort-to-put-files-first | sort with files above folders]].
|
||||
|
||||
```ts title="quartz.layout.ts"
|
||||
Component.Explorer({
|
||||
filterFn: sampleFilterFn,
|
||||
mapFn: sampleMapFn,
|
||||
sortFn: sampleSortFn,
|
||||
order: ["filter", "sort", "map"],
|
||||
})
|
||||
```
|
||||
|
||||
Notice how we customized the `order` array here. This is done because the default order applies the `sort` function last. While this normally works well, it would cause unintended behavior here, since we changed the first characters of all display names. In our example, `sort` would be applied based off the emoji prefix instead of the first _real_ character.
|
||||
|
||||
To fix this, we just changed around the order and apply the `sort` function before changing the display names in the `map` function.
|
||||
|
||||
> [!tip]
|
||||
> When writing more complicated functions, the `layout` file can start to look very cramped.
|
||||
> You can fix this by defining your functions in another file.
|
||||
>
|
||||
> ```ts title="functions.ts"
|
||||
> import { Options } from "./quartz/components/ExplorerNode"
|
||||
> export const mapFn: Options["mapFn"] = (node) => {
|
||||
> // implement your function here
|
||||
> }
|
||||
> export const filterFn: Options["filterFn"] = (node) => {
|
||||
> // implement your function here
|
||||
> }
|
||||
> export const sortFn: Options["sortFn"] = (a, b) => {
|
||||
> // implement your function here
|
||||
> }
|
||||
> ```
|
||||
>
|
||||
> You can then import them like this:
|
||||
>
|
||||
> ```ts title="quartz.layout.ts"
|
||||
> import { mapFn, filterFn, sortFn } from "./functions.ts"
|
||||
> Component.Explorer({
|
||||
> mapFn: mapFn,
|
||||
> filterFn: filterFn,
|
||||
> sortFn: sortFn,
|
||||
> })
|
||||
> ```
|
||||
@@ -6,9 +6,11 @@ tags:
|
||||
|
||||
Full-text search in Quartz is powered by [Flexsearch](https://github.com/nextapps-de/flexsearch). It's fast enough to return search results in under 10ms for Quartzs as large as half a million words.
|
||||
|
||||
It can be opened by either clicking on the search bar or pressing ⌘+K. The top 5 search results are shown on each query. Matching subterms are highlighted and the most relevant 30 words are excerpted. Clicking on a search result will navigate to that page.
|
||||
It can be opened by either clicking on the search bar or pressing `⌘`/`ctrl` + `K`. The top 5 search results are shown on each query. Matching subterms are highlighted and the most relevant 30 words are excerpted. Clicking on a search result will navigate to that page.
|
||||
|
||||
This component is also keyboard accessible: Tab and Shift+Tab will cycle forward and backward through search results and Enter will navigate to the highlighted result (first result by default).
|
||||
To search content by tags, you can either press `⌘`/`ctrl` + `shift` + `K` or start your query with `#` (e.g. `#components`).
|
||||
|
||||
This component is also keyboard accessible: Tab and Shift+Tab will cycle forward and backward through search results and Enter will navigate to the highlighted result (first result by default). You are also able to navigate search results using `ArrowUp` and `ArrowDown`.
|
||||
|
||||
> [!info]
|
||||
> Search requires the `ContentIndex` emitter plugin to be present in the [[configuration]].
|
||||
@@ -17,7 +19,7 @@ This component is also keyboard accessible: Tab and Shift+Tab will cycle forward
|
||||
|
||||
By default, it indexes every page on the site with **Markdown syntax removed**. This means link URLs for instance are not indexed.
|
||||
|
||||
It properly tokenizes Chinese, Korean, and Japenese characters and constructs separate indexes for the title and content, weighing title matches above content matches.
|
||||
It properly tokenizes Chinese, Korean, and Japenese characters and constructs separate indexes for the title, content and tags, weighing title matches above content matches.
|
||||
|
||||
## Customization
|
||||
|
||||
@@ -25,4 +27,4 @@ It properly tokenizes Chinese, Korean, and Japenese characters and constructs se
|
||||
- Component: `quartz/components/Search.tsx`
|
||||
- Style: `quartz/components/styles/search.scss`
|
||||
- Script: `quartz/components/scripts/search.inline.ts`
|
||||
- You can edit `contextWindowWords` or `numSearchResults` to suit your needs
|
||||
- You can edit `contextWindowWords`, `numSearchResults` or `numTagResults` to suit your needs
|
||||
@@ -8,11 +8,11 @@ There may be some notes you want to avoid publishing as a website. Quartz suppor
|
||||
|
||||
## Filter Plugins
|
||||
|
||||
[[making plugins#Filters|Filter plugins]] are plugins that filter out content based off of certain criteria. By default, Quartz uses the `Plugin.RemoveDrafts` plugin which filters out any note that has `drafts: true` in the frontmatter.
|
||||
[[making plugins#Filters|Filter plugins]] are plugins that filter out content based off of certain criteria. By default, Quartz uses the `Plugin.RemoveDrafts` plugin which filters out any note that has `draft: true` in the frontmatter.
|
||||
|
||||
If you'd like to only publish a select number of notes, you can instead use `Plugin.ExplicitPublish` which will filter out all notes except for any that have `publish: true` in the frontmatter.
|
||||
|
||||
## `ignoreFiles`
|
||||
## `ignorePatterns`
|
||||
|
||||
This is a field in `quartz.config.ts` under the main [[configuration]] which allows you to specify a list of patterns to effectively exclude from parsing all together. Any valid [glob](https://github.com/mrmlnc/fast-glob#pattern-syntax) pattern works here.
|
||||
|
||||
@@ -24,4 +24,4 @@ Common examples include:
|
||||
- `**/private`: exclude any files or folders named `private` at any level of nesting
|
||||
|
||||
> [!warning]
|
||||
> Marking something as private via either a plugin or through the `ignoreFiles` pattern will only prevent a page from being included in the final built site. If your GitHub repository is public, also be sure to include an ignore for those in the `.gitignore` of your Quartz. See the `git` [documentation](https://git-scm.com/docs/gitignore#_pattern_format) for more information.
|
||||
> Marking something as private via either a plugin or through the `ignorePatterns` pattern will only prevent a page from being included in the final built site. If your GitHub repository is public, also be sure to include an ignore for those in the `.gitignore` of your Quartz. See the `git` [documentation](https://git-scm.com/docs/gitignore#_pattern_format) for more information.
|
||||
@@ -8,6 +8,7 @@ tags:
|
||||
Quartz can automatically generate a table of contents from a list of headings on each page. It will also show you your current scroll position on the site by marking headings you've scrolled through with a different colour.
|
||||
|
||||
By default, it will show all headers from H1 (`# Title`) all the way to H3 (`### Title`) and will only show the table of contents if there is more than 1 header on the page.
|
||||
You can also hide the table of contents on a page by adding `showToc: false` to the frontmatter for that page.
|
||||
|
||||
> [!info]
|
||||
> This feature requires both `Plugin.TableOfContents` in your `quartz.config.ts` and `Component.TableOfContents` in your `quartz.layout.ts` to function correctly.
|
||||
@@ -4,15 +4,14 @@ draft: true
|
||||
|
||||
## high priority backlog
|
||||
|
||||
- static dead link detection
|
||||
- block links: https://help.obsidian.md/Linking+notes+and+files/Internal+links#Link+to+a+block+in+a+note
|
||||
- note/header/block transcludes: https://help.obsidian.md/Linking+notes+and+files/Embedding+files
|
||||
- static dead link detection
|
||||
- docker support
|
||||
|
||||
## misc backlog
|
||||
|
||||
- breadcrumbs component
|
||||
- filetree component
|
||||
- cursor chat extension
|
||||
- https://giscus.app/ extension
|
||||
- sidenotes? https://github.com/capnfabs/paperesque
|
||||
@@ -10,9 +10,7 @@ This is enabled as a part of [[Obsidian compatibility]] and can be configured an
|
||||
|
||||
## Syntax
|
||||
|
||||
- `[[Path to file]]`: produces a link to `Path to file` with the text `Path to file`
|
||||
- `[[Path to file | Here's the title override]]`: produces a link to `Path to file` with the text `Here's the title override`
|
||||
- `[[Path to file#Anchor]]`: produces a link to the anchor `Anchor` in the file `Path to file`
|
||||
|
||||
> [!warning]
|
||||
> Currently, Quartz does not support block references or note embed syntax.
|
||||
- `[[Path to file]]`: produces a link to `Path to file.md` (or `Path-to-file.md`) with the text `Path to file`
|
||||
- `[[Path to file | Here's the title override]]`: produces a link to `Path to file.md` with the text `Here's the title override`
|
||||
- `[[Path to file#Anchor]]`: produces a link to the anchor `Anchor` in the file `Path to file.md`
|
||||
- `[[Path to file#^block-ref]]`: produces a link to the specific block `block-ref` in the file `Path to file.md`
|
||||
@@ -30,6 +30,9 @@ To add a custom domain, check out [Cloudflare's documentation](https://developer
|
||||
|
||||
Like Quartz 3, you can deploy the site generated by Quartz 4 via GitHub Pages.
|
||||
|
||||
> [!warning]
|
||||
> Quartz generates files in the format of `file.html` instead of `file/index.html` which means the trailing slashes for _non-folder paths_ are dropped. As GitHub pages does not do this redirect, this may cause existing links to your site that use trailing slashes to break. If not breaking existing links is important to you, consider using [[#Cloudflare Pages]].
|
||||
|
||||
In your local Quartz, create a new file `quartz/.github/workflows/deploy.yml`.
|
||||
|
||||
```yaml title="quartz/.github/workflows/deploy.yml"
|
||||
@@ -113,3 +116,53 @@ See the [GitHub documentation](https://docs.github.com/en/pages/configuring-a-cu
|
||||
> There could be many different reasons why your changes aren't showing up but the most likely reason is that you forgot to push your changes to GitHub.
|
||||
>
|
||||
> Make sure you save your changes to Git and sync it to GitHub by doing `npx quartz sync`. This will also make sure to pull any updates you may have made from other devices so you have them locally.
|
||||
|
||||
## Vercel
|
||||
|
||||
### Fix URLs
|
||||
|
||||
Before deploying to Vercel, a `vercel.json` file is required at the root of the project directory. It needs to contain the following configuration so that URLs don't require the `.html` extension:
|
||||
|
||||
```json title="vercel.json"
|
||||
{
|
||||
"cleanUrls": true
|
||||
}
|
||||
```
|
||||
|
||||
### Deploy to Vercel
|
||||
|
||||
1. Log in to the [Vercel Dashboard](https://vercel.com/dashboard) and click "Add New..." > Project
|
||||
2. Import the Git repository containing your Quartz project.
|
||||
3. Give the project a name (lowercase characters and hyphens only)
|
||||
4. Check that these configuration options are set:
|
||||
|
||||
| Configuration option | Value |
|
||||
| ----------------------------------------- | ------------------ |
|
||||
| Framework Preset | `Other` |
|
||||
| Root Directory | `./` |
|
||||
| Build and Output Settings > Build Command | `npx quartz build` |
|
||||
|
||||
5. Press Deploy. Once it's live, you'll have 2 `*.vercel.app` URLs to view the page.
|
||||
|
||||
### Custom Domain
|
||||
|
||||
> [!note]
|
||||
> If there is something already hosted on the domain, these steps will not work without replacing the previous content. As a workaround, you could use Next.js rewrites or use the next section to create a subdomain.
|
||||
|
||||
1. Update the `baseUrl` in `quartz.config.js` if necessary.
|
||||
2. Go to the [Domains - Dashboard](https://vercel.com/dashboard/domains) page in Vercel.
|
||||
3. Connect the domain to Vercel
|
||||
4. Press "Add" to connect a custom domain to Vercel.
|
||||
5. Select your Quartz repository and press Continue.
|
||||
6. Enter the domain you want to connect it to.
|
||||
7. Follow the instructions to update your DNS records until you see "Valid Configuration"
|
||||
|
||||
### Use a Subdomain
|
||||
|
||||
Using `docs.example.com` is an example of a subdomain. They're a simple way of connecting multiple deployments to one domain.
|
||||
|
||||
1. Update the `baseUrl` in `quartz.config.js` if necessary.
|
||||
2. Ensure your domain has been added to the [Domains - Dashboard](https://vercel.com/dashboard/domains) page in Vercel.
|
||||
3. Go to the [Vercel Dashboard](https://vercel.com/dashboard) and select your Quartz project.
|
||||
4. Go to the Settings tab and then click Domains in the sidebar
|
||||
5. Enter your subdomain into the field and press Add
|
||||
BIN
docs/images/dns records.png
Normal file
BIN
docs/images/dns records.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 76 KiB |
BIN
docs/images/quartz layout.png
Normal file
BIN
docs/images/quartz layout.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 55 KiB |
BIN
docs/images/quartz transform pipeline.png
Normal file
BIN
docs/images/quartz transform pipeline.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 72 KiB |
21
docs/index.md
Normal file
21
docs/index.md
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
title: ""
|
||||
---
|
||||
This site attempts to inform the previous, current, and future work required to fulfill the requirements of the projects under the Logos Collective, a complete tech stack that provides infrastructure for the self-sovereign network state. To learn more about the motivation, please visit the [Logos Collective Site](https://logos.co).
|
||||
|
||||
This site is an ongoing work in progress. The links within are an attempt to capture a lot of moving targets. This means that the information here may or may not be the bleeding edge of what is true with respect to the development within the Logos Collective projects. Your use of this Website is subject to the following [[terms-of-use|terms of use]] which we ask you to read carefully prior to your use of the Website.
|
||||
|
||||
## Navigation
|
||||
|
||||
### Projects
|
||||
- [Waku](waku/index.md)
|
||||
- [Codex](codex/overview.md)
|
||||
- [Nomos](nomos)
|
||||
|
||||
### Services
|
||||
- [Vac](vac/index.md)
|
||||
- [Comms (Acid Info)](acid/index.md)
|
||||
- [[insight/index|Insight]]
|
||||
|
||||
### Skunk works
|
||||
- [Innovation Lab](innovation_lab/index.md)
|
||||
42
docs/layout.md
Normal file
42
docs/layout.md
Normal file
@@ -0,0 +1,42 @@
|
||||
---
|
||||
title: Layout
|
||||
---
|
||||
|
||||
Certain emitters may also output [HTML](https://developer.mozilla.org/en-US/docs/Web/HTML) files. To enable easy customization, these emitters allow you to fully rearrange the layout of the page. The default page layouts can be found in `quartz.layout.ts`.
|
||||
|
||||
Each page is composed of multiple different sections which contain `QuartzComponents`. The following code snippet lists all of the valid sections that you can add components to:
|
||||
|
||||
```typescript title="quartz/cfg.ts"
|
||||
export interface FullPageLayout {
|
||||
head: QuartzComponent // single component
|
||||
header: QuartzComponent[] // laid out horizontally
|
||||
beforeBody: QuartzComponent[] // laid out vertically
|
||||
pageBody: QuartzComponent // single component
|
||||
left: QuartzComponent[] // vertical on desktop, horizontal on mobile
|
||||
right: QuartzComponent[] // vertical on desktop, horizontal on mobile
|
||||
footer: QuartzComponent // single component
|
||||
}
|
||||
```
|
||||
|
||||
These correspond to following parts of the page:
|
||||
|
||||
![[quartz layout.png|800]]
|
||||
|
||||
> [!note]
|
||||
> There are two additional layout fields that are _not_ shown in the above diagram.
|
||||
>
|
||||
> 1. `head` is a single component that renders the `<head>` [tag](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/head) in the HTML. This doesn't appear visually on the page and is only is responsible for metadata about the document like the tab title, scripts, and styles.
|
||||
> 2. `header` is a set of components that are laid out horizontally and appears _before_ the `beforeBody` section. This enables you to replicate the old Quartz 3 header bar where the title, search bar, and dark mode toggle. By default, Quartz 4 doesn't place any components in the `header`.
|
||||
|
||||
Quartz **components**, like plugins, can take in additional properties as configuration options. If you're familiar with React terminology, you can think of them as Higher-order Components.
|
||||
|
||||
See [a list of all the components](component.md) for all available components along with their configuration options. You can also checkout the guide on [[creating components]] if you're interested in further customizing the behaviour of Quartz.
|
||||
|
||||
### Style
|
||||
|
||||
Most meaningful style changes like colour scheme and font can be done simply through the [[configuration#General Configuration|general configuration]] options. However, if you'd like to make more involved style changes, you can do this by writing your own styles. Quartz 4, like Quartz 3, uses [Sass](https://sass-lang.com/guide/) for styling.
|
||||
|
||||
You can see the base style sheet in `quartz/styles/base.scss` and write your own in `quartz/styles/custom.scss`.
|
||||
|
||||
> [!note]
|
||||
> Some components may provide their own styling as well! For example, `quartz/components/Darkmode.tsx` imports styles from `quartz/components/styles/darkmode.scss`. If you'd like to customize styling for a specific component, double check the component definition to see how its styles are defined.
|
||||
@@ -12,9 +12,12 @@ Want to see what Quartz can do? Here are some cool community gardens:
|
||||
- [Course notes for Information Technology Advanced Theory](https://a2itnotes.github.io/quartz/)
|
||||
- [Data Dictionary 🧠](https://glossary.airbyte.com/)
|
||||
- [sspaeti.com's Second Brain](https://brain.sspaeti.com/)
|
||||
- [oldwinterの数字花园](https://garden.oldwinter.top/)
|
||||
- [oldwinter の数字花园](https://garden.oldwinter.top/)
|
||||
- [Abhijeet's Math Wiki](https://abhmul.github.io/quartz/Math-Wiki/)
|
||||
- [Mike's AI Garden 🤖🪴](https://mwalton.me/)
|
||||
- [Matt Dunn's Second Brain](https://mattdunn.info/)
|
||||
- [Pelayo Arbues' Notes](https://pelayoarbues.github.io/)
|
||||
- [Vince Imbat's Talahardin](https://vinceimbat.com/)
|
||||
- [🧠🌳 Chad's Mind Garden](https://www.chadly.net/)
|
||||
|
||||
If you want to see your own on here, submit a [Pull Request adding yourself to this file](https://github.com/jackyzha0/quartz/blob/v4/content/showcase.md)!
|
||||
If you want to see your own on here, submit a [Pull Request adding yourself to this file](https://github.com/jackyzha0/quartz/blob/v4/docs/showcase.md)!
|
||||
5
docs/tags/component.md
Normal file
5
docs/tags/component.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: Components
|
||||
---
|
||||
|
||||
Want to create your own custom component? Check out the advanced guide on [[creating components]] for more information.
|
||||
0
docs/tags/vac-updates.md
Normal file
0
docs/tags/vac-updates.md
Normal file
438
package-lock.json
generated
438
package-lock.json
generated
@@ -1,23 +1,23 @@
|
||||
{
|
||||
"name": "@jackyzha0/quartz",
|
||||
"version": "4.0.8",
|
||||
"version": "4.1.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@jackyzha0/quartz",
|
||||
"version": "4.0.8",
|
||||
"version": "4.1.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@clack/prompts": "^0.6.3",
|
||||
"@floating-ui/dom": "^1.4.0",
|
||||
"@napi-rs/simple-git": "^0.1.8",
|
||||
"@napi-rs/simple-git": "0.1.9",
|
||||
"async-mutex": "^0.4.0",
|
||||
"chalk": "^4.1.2",
|
||||
"chokidar": "^3.5.3",
|
||||
"cli-spinner": "^0.2.10",
|
||||
"d3": "^7.8.5",
|
||||
"esbuild-sass-plugin": "^2.9.0",
|
||||
"esbuild-sass-plugin": "^2.12.0",
|
||||
"flexsearch": "0.7.21",
|
||||
"github-slugger": "^2.0.0",
|
||||
"globby": "^13.1.4",
|
||||
@@ -27,7 +27,7 @@
|
||||
"hast-util-to-string": "^2.0.0",
|
||||
"is-absolute-url": "^4.0.1",
|
||||
"js-yaml": "^4.1.0",
|
||||
"lightningcss": "^1.21.5",
|
||||
"lightningcss": "1.21.7",
|
||||
"mdast-util-find-and-replace": "^2.2.2",
|
||||
"mdast-util-to-hast": "^12.3.0",
|
||||
"mdast-util-to-string": "^3.2.0",
|
||||
@@ -45,6 +45,7 @@
|
||||
"rehype-raw": "^6.1.1",
|
||||
"rehype-slug": "^5.1.0",
|
||||
"remark": "^14.0.2",
|
||||
"remark-breaks": "^3.0.3",
|
||||
"remark-frontmatter": "^4.0.1",
|
||||
"remark-gfm": "^3.0.1",
|
||||
"remark-math": "^5.1.1",
|
||||
@@ -55,6 +56,7 @@
|
||||
"serve-handler": "^6.1.5",
|
||||
"source-map-support": "^0.5.21",
|
||||
"to-vfile": "^7.2.4",
|
||||
"toml": "^3.0.0",
|
||||
"unified": "^10.1.2",
|
||||
"unist-util-visit": "^4.1.2",
|
||||
"vfile": "^5.3.7",
|
||||
@@ -77,7 +79,7 @@
|
||||
"@types/workerpool": "^6.4.0",
|
||||
"@types/ws": "^8.5.5",
|
||||
"@types/yargs": "^17.0.24",
|
||||
"esbuild": "^0.18.11",
|
||||
"esbuild": "0.19.2",
|
||||
"prettier": "^3.0.0",
|
||||
"tsx": "^3.12.7",
|
||||
"typescript": "^5.0.4"
|
||||
@@ -540,9 +542,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/android-arm": {
|
||||
"version": "0.18.11",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.18.11.tgz",
|
||||
"integrity": "sha512-q4qlUf5ucwbUJZXF5tEQ8LF7y0Nk4P58hOsGk3ucY0oCwgQqAnqXVbUuahCddVHfrxmpyewRpiTHwVHIETYu7Q==",
|
||||
"version": "0.19.2",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.2.tgz",
|
||||
"integrity": "sha512-tM8yLeYVe7pRyAu9VMi/Q7aunpLwD139EY1S99xbQkT4/q2qa6eA4ige/WJQYdJ8GBL1K33pPFhPfPdJ/WzT8Q==",
|
||||
"cpu": [
|
||||
"arm"
|
||||
],
|
||||
@@ -555,9 +557,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/android-arm64": {
|
||||
"version": "0.18.11",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.18.11.tgz",
|
||||
"integrity": "sha512-snieiq75Z1z5LJX9cduSAjUr7vEI1OdlzFPMw0HH5YI7qQHDd3qs+WZoMrWYDsfRJSq36lIA6mfZBkvL46KoIw==",
|
||||
"version": "0.19.2",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.2.tgz",
|
||||
"integrity": "sha512-lsB65vAbe90I/Qe10OjkmrdxSX4UJDjosDgb8sZUKcg3oefEuW2OT2Vozz8ef7wrJbMcmhvCC+hciF8jY/uAkw==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -570,9 +572,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/android-x64": {
|
||||
"version": "0.18.11",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.18.11.tgz",
|
||||
"integrity": "sha512-iPuoxQEV34+hTF6FT7om+Qwziv1U519lEOvekXO9zaMMlT9+XneAhKL32DW3H7okrCOBQ44BMihE8dclbZtTuw==",
|
||||
"version": "0.19.2",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.2.tgz",
|
||||
"integrity": "sha512-qK/TpmHt2M/Hg82WXHRc/W/2SGo/l1thtDHZWqFq7oi24AjZ4O/CpPSu6ZuYKFkEgmZlFoa7CooAyYmuvnaG8w==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -585,9 +587,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/darwin-arm64": {
|
||||
"version": "0.18.11",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.18.11.tgz",
|
||||
"integrity": "sha512-Gm0QkI3k402OpfMKyQEEMG0RuW2LQsSmI6OeO4El2ojJMoF5NLYb3qMIjvbG/lbMeLOGiW6ooU8xqc+S0fgz2w==",
|
||||
"version": "0.19.2",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.2.tgz",
|
||||
"integrity": "sha512-Ora8JokrvrzEPEpZO18ZYXkH4asCdc1DLdcVy8TGf5eWtPO1Ie4WroEJzwI52ZGtpODy3+m0a2yEX9l+KUn0tA==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -600,9 +602,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/darwin-x64": {
|
||||
"version": "0.18.11",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.18.11.tgz",
|
||||
"integrity": "sha512-N15Vzy0YNHu6cfyDOjiyfJlRJCB/ngKOAvoBf1qybG3eOq0SL2Lutzz9N7DYUbb7Q23XtHPn6lMDF6uWbGv9Fw==",
|
||||
"version": "0.19.2",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.2.tgz",
|
||||
"integrity": "sha512-tP+B5UuIbbFMj2hQaUr6EALlHOIOmlLM2FK7jeFBobPy2ERdohI4Ka6ZFjZ1ZYsrHE/hZimGuU90jusRE0pwDw==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -615,9 +617,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/freebsd-arm64": {
|
||||
"version": "0.18.11",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.11.tgz",
|
||||
"integrity": "sha512-atEyuq6a3omEY5qAh5jIORWk8MzFnCpSTUruBgeyN9jZq1K/QI9uke0ATi3MHu4L8c59CnIi4+1jDKMuqmR71A==",
|
||||
"version": "0.19.2",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.2.tgz",
|
||||
"integrity": "sha512-YbPY2kc0acfzL1VPVK6EnAlig4f+l8xmq36OZkU0jzBVHcOTyQDhnKQaLzZudNJQyymd9OqQezeaBgkTGdTGeQ==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -630,9 +632,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/freebsd-x64": {
|
||||
"version": "0.18.11",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.18.11.tgz",
|
||||
"integrity": "sha512-XtuPrEfBj/YYYnAAB7KcorzzpGTvOr/dTtXPGesRfmflqhA4LMF0Gh/n5+a9JBzPuJ+CGk17CA++Hmr1F/gI0Q==",
|
||||
"version": "0.19.2",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.2.tgz",
|
||||
"integrity": "sha512-nSO5uZT2clM6hosjWHAsS15hLrwCvIWx+b2e3lZ3MwbYSaXwvfO528OF+dLjas1g3bZonciivI8qKR/Hm7IWGw==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -645,9 +647,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/linux-arm": {
|
||||
"version": "0.18.11",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.18.11.tgz",
|
||||
"integrity": "sha512-Idipz+Taso/toi2ETugShXjQ3S59b6m62KmLHkJlSq/cBejixmIydqrtM2XTvNCywFl3VC7SreSf6NV0i6sRyg==",
|
||||
"version": "0.19.2",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.2.tgz",
|
||||
"integrity": "sha512-Odalh8hICg7SOD7XCj0YLpYCEc+6mkoq63UnExDCiRA2wXEmGlK5JVrW50vZR9Qz4qkvqnHcpH+OFEggO3PgTg==",
|
||||
"cpu": [
|
||||
"arm"
|
||||
],
|
||||
@@ -660,9 +662,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/linux-arm64": {
|
||||
"version": "0.18.11",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.18.11.tgz",
|
||||
"integrity": "sha512-c6Vh2WS9VFKxKZ2TvJdA7gdy0n6eSy+yunBvv4aqNCEhSWVor1TU43wNRp2YLO9Vng2G+W94aRz+ILDSwAiYog==",
|
||||
"version": "0.19.2",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.2.tgz",
|
||||
"integrity": "sha512-ig2P7GeG//zWlU0AggA3pV1h5gdix0MA3wgB+NsnBXViwiGgY77fuN9Wr5uoCrs2YzaYfogXgsWZbm+HGr09xg==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -675,9 +677,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/linux-ia32": {
|
||||
"version": "0.18.11",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.18.11.tgz",
|
||||
"integrity": "sha512-S3hkIF6KUqRh9n1Q0dSyYcWmcVa9Cg+mSoZEfFuzoYXXsk6196qndrM+ZiHNwpZKi3XOXpShZZ+9dfN5ykqjjw==",
|
||||
"version": "0.19.2",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.2.tgz",
|
||||
"integrity": "sha512-mLfp0ziRPOLSTek0Gd9T5B8AtzKAkoZE70fneiiyPlSnUKKI4lp+mGEnQXcQEHLJAcIYDPSyBvsUbKUG2ri/XQ==",
|
||||
"cpu": [
|
||||
"ia32"
|
||||
],
|
||||
@@ -690,9 +692,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/linux-loong64": {
|
||||
"version": "0.18.11",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.18.11.tgz",
|
||||
"integrity": "sha512-MRESANOoObQINBA+RMZW+Z0TJWpibtE7cPFnahzyQHDCA9X9LOmGh68MVimZlM9J8n5Ia8lU773te6O3ILW8kw==",
|
||||
"version": "0.19.2",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.2.tgz",
|
||||
"integrity": "sha512-hn28+JNDTxxCpnYjdDYVMNTR3SKavyLlCHHkufHV91fkewpIyQchS1d8wSbmXhs1fiYDpNww8KTFlJ1dHsxeSw==",
|
||||
"cpu": [
|
||||
"loong64"
|
||||
],
|
||||
@@ -705,9 +707,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/linux-mips64el": {
|
||||
"version": "0.18.11",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.18.11.tgz",
|
||||
"integrity": "sha512-qVyPIZrXNMOLYegtD1u8EBccCrBVshxMrn5MkuFc3mEVsw7CCQHaqZ4jm9hbn4gWY95XFnb7i4SsT3eflxZsUg==",
|
||||
"version": "0.19.2",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.2.tgz",
|
||||
"integrity": "sha512-KbXaC0Sejt7vD2fEgPoIKb6nxkfYW9OmFUK9XQE4//PvGIxNIfPk1NmlHmMg6f25x57rpmEFrn1OotASYIAaTg==",
|
||||
"cpu": [
|
||||
"mips64el"
|
||||
],
|
||||
@@ -720,9 +722,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/linux-ppc64": {
|
||||
"version": "0.18.11",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.18.11.tgz",
|
||||
"integrity": "sha512-T3yd8vJXfPirZaUOoA9D2ZjxZX4Gr3QuC3GztBJA6PklLotc/7sXTOuuRkhE9W/5JvJP/K9b99ayPNAD+R+4qQ==",
|
||||
"version": "0.19.2",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.2.tgz",
|
||||
"integrity": "sha512-dJ0kE8KTqbiHtA3Fc/zn7lCd7pqVr4JcT0JqOnbj4LLzYnp+7h8Qi4yjfq42ZlHfhOCM42rBh0EwHYLL6LEzcw==",
|
||||
"cpu": [
|
||||
"ppc64"
|
||||
],
|
||||
@@ -735,9 +737,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/linux-riscv64": {
|
||||
"version": "0.18.11",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.18.11.tgz",
|
||||
"integrity": "sha512-evUoRPWiwuFk++snjH9e2cAjF5VVSTj+Dnf+rkO/Q20tRqv+644279TZlPK8nUGunjPAtQRCj1jQkDAvL6rm2w==",
|
||||
"version": "0.19.2",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.2.tgz",
|
||||
"integrity": "sha512-7Z/jKNFufZ/bbu4INqqCN6DDlrmOTmdw6D0gH+6Y7auok2r02Ur661qPuXidPOJ+FSgbEeQnnAGgsVynfLuOEw==",
|
||||
"cpu": [
|
||||
"riscv64"
|
||||
],
|
||||
@@ -750,9 +752,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/linux-s390x": {
|
||||
"version": "0.18.11",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.18.11.tgz",
|
||||
"integrity": "sha512-/SlRJ15XR6i93gRWquRxYCfhTeC5PdqEapKoLbX63PLCmAkXZHY2uQm2l9bN0oPHBsOw2IswRZctMYS0MijFcg==",
|
||||
"version": "0.19.2",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.2.tgz",
|
||||
"integrity": "sha512-U+RinR6aXXABFCcAY4gSlv4CL1oOVvSSCdseQmGO66H+XyuQGZIUdhG56SZaDJQcLmrSfRmx5XZOWyCJPRqS7g==",
|
||||
"cpu": [
|
||||
"s390x"
|
||||
],
|
||||
@@ -765,9 +767,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/linux-x64": {
|
||||
"version": "0.18.11",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.18.11.tgz",
|
||||
"integrity": "sha512-xcncej+wF16WEmIwPtCHi0qmx1FweBqgsRtEL1mSHLFR6/mb3GEZfLQnx+pUDfRDEM4DQF8dpXIW7eDOZl1IbA==",
|
||||
"version": "0.19.2",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.2.tgz",
|
||||
"integrity": "sha512-oxzHTEv6VPm3XXNaHPyUTTte+3wGv7qVQtqaZCrgstI16gCuhNOtBXLEBkBREP57YTd68P0VgDgG73jSD8bwXQ==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -780,9 +782,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/netbsd-x64": {
|
||||
"version": "0.18.11",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.18.11.tgz",
|
||||
"integrity": "sha512-aSjMHj/F7BuS1CptSXNg6S3M4F3bLp5wfFPIJM+Km2NfIVfFKhdmfHF9frhiCLIGVzDziggqWll0B+9AUbud/Q==",
|
||||
"version": "0.19.2",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.2.tgz",
|
||||
"integrity": "sha512-WNa5zZk1XpTTwMDompZmvQLHszDDDN7lYjEHCUmAGB83Bgs20EMs7ICD+oKeT6xt4phV4NDdSi/8OfjPbSbZfQ==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -795,9 +797,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/openbsd-x64": {
|
||||
"version": "0.18.11",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.18.11.tgz",
|
||||
"integrity": "sha512-tNBq+6XIBZtht0xJGv7IBB5XaSyvYPCm1PxJ33zLQONdZoLVM0bgGqUrXnJyiEguD9LU4AHiu+GCXy/Hm9LsdQ==",
|
||||
"version": "0.19.2",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.2.tgz",
|
||||
"integrity": "sha512-S6kI1aT3S++Dedb7vxIuUOb3oAxqxk2Rh5rOXOTYnzN8JzW1VzBd+IqPiSpgitu45042SYD3HCoEyhLKQcDFDw==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -810,9 +812,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/sunos-x64": {
|
||||
"version": "0.18.11",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.18.11.tgz",
|
||||
"integrity": "sha512-kxfbDOrH4dHuAAOhr7D7EqaYf+W45LsAOOhAet99EyuxxQmjbk8M9N4ezHcEiCYPaiW8Dj3K26Z2V17Gt6p3ng==",
|
||||
"version": "0.19.2",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.2.tgz",
|
||||
"integrity": "sha512-VXSSMsmb+Z8LbsQGcBMiM+fYObDNRm8p7tkUDMPG/g4fhFX5DEFmjxIEa3N8Zr96SjsJ1woAhF0DUnS3MF3ARw==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -825,9 +827,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/win32-arm64": {
|
||||
"version": "0.18.11",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.18.11.tgz",
|
||||
"integrity": "sha512-Sh0dDRyk1Xi348idbal7lZyfSkjhJsdFeuC13zqdipsvMetlGiFQNdO+Yfp6f6B4FbyQm7qsk16yaZk25LChzg==",
|
||||
"version": "0.19.2",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.2.tgz",
|
||||
"integrity": "sha512-5NayUlSAyb5PQYFAU9x3bHdsqB88RC3aM9lKDAz4X1mo/EchMIT1Q+pSeBXNgkfNmRecLXA0O8xP+x8V+g/LKg==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -840,9 +842,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/win32-ia32": {
|
||||
"version": "0.18.11",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.18.11.tgz",
|
||||
"integrity": "sha512-o9JUIKF1j0rqJTFbIoF4bXj6rvrTZYOrfRcGyL0Vm5uJ/j5CkBD/51tpdxe9lXEDouhRgdr/BYzUrDOvrWwJpg==",
|
||||
"version": "0.19.2",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.2.tgz",
|
||||
"integrity": "sha512-47gL/ek1v36iN0wL9L4Q2MFdujR0poLZMJwhO2/N3gA89jgHp4MR8DKCmwYtGNksbfJb9JoTtbkoe6sDhg2QTA==",
|
||||
"cpu": [
|
||||
"ia32"
|
||||
],
|
||||
@@ -855,9 +857,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/win32-x64": {
|
||||
"version": "0.18.11",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.18.11.tgz",
|
||||
"integrity": "sha512-rQI4cjLHd2hGsM1LqgDI7oOCYbQ6IBOVsX9ejuRMSze0GqXUG2ekwiKkiBU1pRGSeCqFFHxTrcEydB2Hyoz9CA==",
|
||||
"version": "0.19.2",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.2.tgz",
|
||||
"integrity": "sha512-tcuhV7ncXBqbt/Ybf0IyrMcwVOAPDckMK9rXNHtF17UTK18OKLpg08glminN06pt2WCoALhXdLfSPbVvK/6fxw==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -899,30 +901,30 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@napi-rs/simple-git": {
|
||||
"version": "0.1.8",
|
||||
"resolved": "https://registry.npmjs.org/@napi-rs/simple-git/-/simple-git-0.1.8.tgz",
|
||||
"integrity": "sha512-BvOMdkkofTz6lEE35itJ/laUokPhr/5ToMGlOH25YnhLD2yN1KpRAT4blW9tT8281/1aZjW3xyi73bs//IrDKA==",
|
||||
"version": "0.1.9",
|
||||
"resolved": "https://registry.npmjs.org/@napi-rs/simple-git/-/simple-git-0.1.9.tgz",
|
||||
"integrity": "sha512-qKzDS0+VjMvVyU28px+C6zlD1HKy83NIdYzfMQWa/g/V1iG/Ic8uwrS2ihHfm7mp7X0PPrmINLiTTi6ieUIKfw==",
|
||||
"engines": {
|
||||
"node": ">= 10"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@napi-rs/simple-git-android-arm-eabi": "0.1.8",
|
||||
"@napi-rs/simple-git-android-arm64": "0.1.8",
|
||||
"@napi-rs/simple-git-darwin-arm64": "0.1.8",
|
||||
"@napi-rs/simple-git-darwin-x64": "0.1.8",
|
||||
"@napi-rs/simple-git-linux-arm-gnueabihf": "0.1.8",
|
||||
"@napi-rs/simple-git-linux-arm64-gnu": "0.1.8",
|
||||
"@napi-rs/simple-git-linux-arm64-musl": "0.1.8",
|
||||
"@napi-rs/simple-git-linux-x64-gnu": "0.1.8",
|
||||
"@napi-rs/simple-git-linux-x64-musl": "0.1.8",
|
||||
"@napi-rs/simple-git-win32-arm64-msvc": "0.1.8",
|
||||
"@napi-rs/simple-git-win32-x64-msvc": "0.1.8"
|
||||
"@napi-rs/simple-git-android-arm-eabi": "0.1.9",
|
||||
"@napi-rs/simple-git-android-arm64": "0.1.9",
|
||||
"@napi-rs/simple-git-darwin-arm64": "0.1.9",
|
||||
"@napi-rs/simple-git-darwin-x64": "0.1.9",
|
||||
"@napi-rs/simple-git-linux-arm-gnueabihf": "0.1.9",
|
||||
"@napi-rs/simple-git-linux-arm64-gnu": "0.1.9",
|
||||
"@napi-rs/simple-git-linux-arm64-musl": "0.1.9",
|
||||
"@napi-rs/simple-git-linux-x64-gnu": "0.1.9",
|
||||
"@napi-rs/simple-git-linux-x64-musl": "0.1.9",
|
||||
"@napi-rs/simple-git-win32-arm64-msvc": "0.1.9",
|
||||
"@napi-rs/simple-git-win32-x64-msvc": "0.1.9"
|
||||
}
|
||||
},
|
||||
"node_modules/@napi-rs/simple-git-android-arm-eabi": {
|
||||
"version": "0.1.8",
|
||||
"resolved": "https://registry.npmjs.org/@napi-rs/simple-git-android-arm-eabi/-/simple-git-android-arm-eabi-0.1.8.tgz",
|
||||
"integrity": "sha512-JJCejHBB1G6O8nxjQLT4quWCcvLpC3oRdJJ9G3MFYSCoYS8i1bWCWeU+K7Br+xT+D6s1t9q8kNJAwJv9Ygpi0g==",
|
||||
"version": "0.1.9",
|
||||
"resolved": "https://registry.npmjs.org/@napi-rs/simple-git-android-arm-eabi/-/simple-git-android-arm-eabi-0.1.9.tgz",
|
||||
"integrity": "sha512-9D4JnfePMpgL4pg9aMUX7/TIWEUQ+Tgx8n3Pf8TNCMGjUbImJyYsDSLJzbcv9wH7srgn4GRjSizXFJHAPjzEug==",
|
||||
"cpu": [
|
||||
"arm"
|
||||
],
|
||||
@@ -935,9 +937,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@napi-rs/simple-git-android-arm64": {
|
||||
"version": "0.1.8",
|
||||
"resolved": "https://registry.npmjs.org/@napi-rs/simple-git-android-arm64/-/simple-git-android-arm64-0.1.8.tgz",
|
||||
"integrity": "sha512-mraHzwWBw3tdRetNOS5KnFSjvdAbNBnjFLA8I4PwTCPJj3Q4txrigcPp2d59cJ0TC51xpnPXnZjYdNwwSI9g6g==",
|
||||
"version": "0.1.9",
|
||||
"resolved": "https://registry.npmjs.org/@napi-rs/simple-git-android-arm64/-/simple-git-android-arm64-0.1.9.tgz",
|
||||
"integrity": "sha512-Krilsw0gPrrASZzudNEl9pdLuNbhoTK0j7pUbfB8FRifpPdFB/zouwuEm0aSnsDXN4ftGrmGG82kuiR/2MeoPg==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -950,9 +952,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@napi-rs/simple-git-darwin-arm64": {
|
||||
"version": "0.1.8",
|
||||
"resolved": "https://registry.npmjs.org/@napi-rs/simple-git-darwin-arm64/-/simple-git-darwin-arm64-0.1.8.tgz",
|
||||
"integrity": "sha512-ufy/36eI/j4UskEuvqSH7uXtp3oXeLDmjQCfKJz3u5Vx98KmOMKrqAm2H81AB2WOtCo5mqS6PbBeUXR8BJX8lQ==",
|
||||
"version": "0.1.9",
|
||||
"resolved": "https://registry.npmjs.org/@napi-rs/simple-git-darwin-arm64/-/simple-git-darwin-arm64-0.1.9.tgz",
|
||||
"integrity": "sha512-H/F09nDgYjv4gcFrZBgdTKkZEepqt0KLYcCJuUADuxkKupmjLdecMhypXLk13AzvLW4UQI7NlLTLDXUFLyr2BA==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -965,9 +967,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@napi-rs/simple-git-darwin-x64": {
|
||||
"version": "0.1.8",
|
||||
"resolved": "https://registry.npmjs.org/@napi-rs/simple-git-darwin-x64/-/simple-git-darwin-x64-0.1.8.tgz",
|
||||
"integrity": "sha512-Vb21U+v3tPJNl+8JtIHHT8HGe6WZ8o1Tq3f6p+Jx9Cz71zEbcIiB9FCEMY1knS/jwQEOuhhlI9Qk7d4HY+rprA==",
|
||||
"version": "0.1.9",
|
||||
"resolved": "https://registry.npmjs.org/@napi-rs/simple-git-darwin-x64/-/simple-git-darwin-x64-0.1.9.tgz",
|
||||
"integrity": "sha512-jBR2xS9nVPqmHv0TWz874W0m/d453MGrMeLjB+boK5IPPLhg3AWIZj0aN9jy2Je1BGVAa0w3INIQJtBBeB6kFA==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -980,9 +982,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@napi-rs/simple-git-linux-arm-gnueabihf": {
|
||||
"version": "0.1.8",
|
||||
"resolved": "https://registry.npmjs.org/@napi-rs/simple-git-linux-arm-gnueabihf/-/simple-git-linux-arm-gnueabihf-0.1.8.tgz",
|
||||
"integrity": "sha512-6BPTJ7CzpSm2t54mRLVaUr3S7ORJfVJoCk2rQ8v8oDg0XAMKvmQQxOsAgqKBo9gYNHJnqrOx3AEuEgvB586BuQ==",
|
||||
"version": "0.1.9",
|
||||
"resolved": "https://registry.npmjs.org/@napi-rs/simple-git-linux-arm-gnueabihf/-/simple-git-linux-arm-gnueabihf-0.1.9.tgz",
|
||||
"integrity": "sha512-3n0+VpO4YfZxndZ0sCvsHIvsazd+JmbSjrlTRBCnJeAU1/sfos3skNZtKGZksZhjvd+3o+/GFM8L7Xnv01yggA==",
|
||||
"cpu": [
|
||||
"arm"
|
||||
],
|
||||
@@ -995,13 +997,12 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@napi-rs/simple-git-linux-arm64-gnu": {
|
||||
"version": "0.1.8",
|
||||
"resolved": "https://registry.npmjs.org/@napi-rs/simple-git-linux-arm64-gnu/-/simple-git-linux-arm64-gnu-0.1.8.tgz",
|
||||
"integrity": "sha512-qfESqUCAA/XoQpRXHptSQ8gIFnETCQt1zY9VOkplx6tgYk9PCeaX4B1Xuzrh3eZamSCMJFn+1YB9Ut8NwyGgAA==",
|
||||
"version": "0.1.9",
|
||||
"resolved": "https://registry.npmjs.org/@napi-rs/simple-git-linux-arm64-gnu/-/simple-git-linux-arm64-gnu-0.1.9.tgz",
|
||||
"integrity": "sha512-lIzf0KHU2SKC12vMrWwCtysG2Sdt31VHRPMUiz9lD9t3xwVn8qhFSTn5yDkTeG3rgX6o0p5EKalfQN5BXsJq2w==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"hasInstallScript": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
@@ -1011,13 +1012,12 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@napi-rs/simple-git-linux-arm64-musl": {
|
||||
"version": "0.1.8",
|
||||
"resolved": "https://registry.npmjs.org/@napi-rs/simple-git-linux-arm64-musl/-/simple-git-linux-arm64-musl-0.1.8.tgz",
|
||||
"integrity": "sha512-G80BQPpaRmQpn8dJGHp4I2/YVhWDUNJwcCrJAtAdbKFDCMyCHJBln2ERL/+IEUlIAT05zK/c1Z5WEprvXEdXow==",
|
||||
"version": "0.1.9",
|
||||
"resolved": "https://registry.npmjs.org/@napi-rs/simple-git-linux-arm64-musl/-/simple-git-linux-arm64-musl-0.1.9.tgz",
|
||||
"integrity": "sha512-KQozUoNXrxrB8k741ncWXSiMbjl1AGBGfZV21PANzUM8wH4Yem2bg3kfglYS/QIx3udspsT35I9abu49n7D1/w==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"hasInstallScript": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
@@ -1027,13 +1027,12 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@napi-rs/simple-git-linux-x64-gnu": {
|
||||
"version": "0.1.8",
|
||||
"resolved": "https://registry.npmjs.org/@napi-rs/simple-git-linux-x64-gnu/-/simple-git-linux-x64-gnu-0.1.8.tgz",
|
||||
"integrity": "sha512-NI6o1sZYEf6vPtNWJAm9w8BxJt+LlSFW0liSjYe3lc3e4dhMfV240f0ALeqlwdIldRPaDFwZSJX5/QbS7nMzhw==",
|
||||
"version": "0.1.9",
|
||||
"resolved": "https://registry.npmjs.org/@napi-rs/simple-git-linux-x64-gnu/-/simple-git-linux-x64-gnu-0.1.9.tgz",
|
||||
"integrity": "sha512-O/Niui5mnHPcK3iYC3ui8wgERtJWsQ3Y74W/09t0bL/3dgzGMl4oQt0qTj9dWCsnoGsIEYHPzwCBp/2vqYp/pw==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"hasInstallScript": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
@@ -1043,13 +1042,12 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@napi-rs/simple-git-linux-x64-musl": {
|
||||
"version": "0.1.8",
|
||||
"resolved": "https://registry.npmjs.org/@napi-rs/simple-git-linux-x64-musl/-/simple-git-linux-x64-musl-0.1.8.tgz",
|
||||
"integrity": "sha512-wljGAEOW41er45VTiU8kXJmO480pQKzsgRCvPlJJSCaEVBbmo6XXbFIXnZy1a2J3Zyy2IOsRB4PVkUZaNuPkZQ==",
|
||||
"version": "0.1.9",
|
||||
"resolved": "https://registry.npmjs.org/@napi-rs/simple-git-linux-x64-musl/-/simple-git-linux-x64-musl-0.1.9.tgz",
|
||||
"integrity": "sha512-L9n+e8Wn3hKr3RsIdY8GaB+ry4xZ4BaGwyKExgoB8nDGQuRUY9oP6p0WA4hWfJvJnU1H6hvo36a5UFPReyBO7A==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"hasInstallScript": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
@@ -1059,9 +1057,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@napi-rs/simple-git-win32-arm64-msvc": {
|
||||
"version": "0.1.8",
|
||||
"resolved": "https://registry.npmjs.org/@napi-rs/simple-git-win32-arm64-msvc/-/simple-git-win32-arm64-msvc-0.1.8.tgz",
|
||||
"integrity": "sha512-QuV4QILyKPfbWHoQKrhXqjiCClx0SxbCTVogkR89BwivekqJMd9UlMxZdoCmwLWutRx4z9KmzQqokvYI5QeepA==",
|
||||
"version": "0.1.9",
|
||||
"resolved": "https://registry.npmjs.org/@napi-rs/simple-git-win32-arm64-msvc/-/simple-git-win32-arm64-msvc-0.1.9.tgz",
|
||||
"integrity": "sha512-Z6Ja/SZK+lMvRWaxj7wjnvSbAsGrH006sqZo8P8nxKUdZfkVvoCaAWr1r0cfkk2Z3aijLLtD+vKeXGlUPH6gGQ==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -1074,9 +1072,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@napi-rs/simple-git-win32-x64-msvc": {
|
||||
"version": "0.1.8",
|
||||
"resolved": "https://registry.npmjs.org/@napi-rs/simple-git-win32-x64-msvc/-/simple-git-win32-x64-msvc-0.1.8.tgz",
|
||||
"integrity": "sha512-UzNS4JtjhZhZ5hRLq7BIUq+4JOwt1ThIKv11CsF1ag2l99f0123XvfEpjczKTaa94nHtjXYc2Mv9TjccBqYOew==",
|
||||
"version": "0.1.9",
|
||||
"resolved": "https://registry.npmjs.org/@napi-rs/simple-git-win32-x64-msvc/-/simple-git-win32-x64-msvc-0.1.9.tgz",
|
||||
"integrity": "sha512-VAZj1UvC+R2MjKOD3I/Y7dmQlHWAYy4omhReQJRpbCf+oGCBi9CWiIduGqeYEq723nLIKdxP7XjaO0wl1NnUww==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -2441,9 +2439,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/esbuild": {
|
||||
"version": "0.18.11",
|
||||
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.18.11.tgz",
|
||||
"integrity": "sha512-i8u6mQF0JKJUlGR3OdFLKldJQMMs8OqM9Cc3UCi9XXziJ9WERM5bfkHaEAy0YAvPRMgqSW55W7xYn84XtEFTtA==",
|
||||
"version": "0.19.2",
|
||||
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.2.tgz",
|
||||
"integrity": "sha512-G6hPax8UbFakEj3hWO0Vs52LQ8k3lnBhxZWomUJDxfz3rZTLqF5k/FCzuNdLx2RbpBiQQF9H9onlDDH1lZsnjg==",
|
||||
"hasInstallScript": true,
|
||||
"bin": {
|
||||
"esbuild": "bin/esbuild"
|
||||
@@ -2452,40 +2450,40 @@
|
||||
"node": ">=12"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@esbuild/android-arm": "0.18.11",
|
||||
"@esbuild/android-arm64": "0.18.11",
|
||||
"@esbuild/android-x64": "0.18.11",
|
||||
"@esbuild/darwin-arm64": "0.18.11",
|
||||
"@esbuild/darwin-x64": "0.18.11",
|
||||
"@esbuild/freebsd-arm64": "0.18.11",
|
||||
"@esbuild/freebsd-x64": "0.18.11",
|
||||
"@esbuild/linux-arm": "0.18.11",
|
||||
"@esbuild/linux-arm64": "0.18.11",
|
||||
"@esbuild/linux-ia32": "0.18.11",
|
||||
"@esbuild/linux-loong64": "0.18.11",
|
||||
"@esbuild/linux-mips64el": "0.18.11",
|
||||
"@esbuild/linux-ppc64": "0.18.11",
|
||||
"@esbuild/linux-riscv64": "0.18.11",
|
||||
"@esbuild/linux-s390x": "0.18.11",
|
||||
"@esbuild/linux-x64": "0.18.11",
|
||||
"@esbuild/netbsd-x64": "0.18.11",
|
||||
"@esbuild/openbsd-x64": "0.18.11",
|
||||
"@esbuild/sunos-x64": "0.18.11",
|
||||
"@esbuild/win32-arm64": "0.18.11",
|
||||
"@esbuild/win32-ia32": "0.18.11",
|
||||
"@esbuild/win32-x64": "0.18.11"
|
||||
"@esbuild/android-arm": "0.19.2",
|
||||
"@esbuild/android-arm64": "0.19.2",
|
||||
"@esbuild/android-x64": "0.19.2",
|
||||
"@esbuild/darwin-arm64": "0.19.2",
|
||||
"@esbuild/darwin-x64": "0.19.2",
|
||||
"@esbuild/freebsd-arm64": "0.19.2",
|
||||
"@esbuild/freebsd-x64": "0.19.2",
|
||||
"@esbuild/linux-arm": "0.19.2",
|
||||
"@esbuild/linux-arm64": "0.19.2",
|
||||
"@esbuild/linux-ia32": "0.19.2",
|
||||
"@esbuild/linux-loong64": "0.19.2",
|
||||
"@esbuild/linux-mips64el": "0.19.2",
|
||||
"@esbuild/linux-ppc64": "0.19.2",
|
||||
"@esbuild/linux-riscv64": "0.19.2",
|
||||
"@esbuild/linux-s390x": "0.19.2",
|
||||
"@esbuild/linux-x64": "0.19.2",
|
||||
"@esbuild/netbsd-x64": "0.19.2",
|
||||
"@esbuild/openbsd-x64": "0.19.2",
|
||||
"@esbuild/sunos-x64": "0.19.2",
|
||||
"@esbuild/win32-arm64": "0.19.2",
|
||||
"@esbuild/win32-ia32": "0.19.2",
|
||||
"@esbuild/win32-x64": "0.19.2"
|
||||
}
|
||||
},
|
||||
"node_modules/esbuild-sass-plugin": {
|
||||
"version": "2.10.0",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-sass-plugin/-/esbuild-sass-plugin-2.10.0.tgz",
|
||||
"integrity": "sha512-STv849QGT8g77RRFmroSt4VBVKjv+dypKcO4aWz8IP4G5JbRH0KC0+B8ODuzlUNu9R5MbkGcev/62RDP/JcZ2Q==",
|
||||
"version": "2.12.0",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-sass-plugin/-/esbuild-sass-plugin-2.12.0.tgz",
|
||||
"integrity": "sha512-+k/5WM/Yf/Ur7ahn6XXxEPwa/lmuacLO7vrCIAJuvQapX1CiIHtlX/nc2eiMoJ6P6RvqZhKpQvIiwgYJonzHtw==",
|
||||
"dependencies": {
|
||||
"resolve": "^1.22.2",
|
||||
"sass": "^1.63.0"
|
||||
"sass": "^1.65.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"esbuild": "^0.18.0"
|
||||
"esbuild": "^0.19.1"
|
||||
}
|
||||
},
|
||||
"node_modules/escalade": {
|
||||
@@ -3147,9 +3145,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/immutable": {
|
||||
"version": "4.3.0",
|
||||
"resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.0.tgz",
|
||||
"integrity": "sha512-0AOCmOip+xgJwEVTQj1EfiDDOkPmuyllDuTuEX+DDXUgapLAsBIfkg3sxCYyCEA8mQqZrrxPUGjcOQ2JS3WLkg=="
|
||||
"version": "4.3.3",
|
||||
"resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.3.tgz",
|
||||
"integrity": "sha512-808ZFYMsIRAjLAu5xkKo0TsbY9LBy9H5MazTKIEHerNkg0ymgilGfBPMR/3G7d/ihGmuK2Hw8S1izY2d3kd3wA=="
|
||||
},
|
||||
"node_modules/inline-style-parser": {
|
||||
"version": "0.1.1",
|
||||
@@ -3412,9 +3410,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/lightningcss": {
|
||||
"version": "1.21.5",
|
||||
"resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.21.5.tgz",
|
||||
"integrity": "sha512-/pEUPeih2EwIx9n4T82aOG6CInN83tl/mWlw6B5gWLf36UplQi1L+5p3FUHsdt4fXVfOkkh9KIaM3owoq7ss8A==",
|
||||
"version": "1.21.7",
|
||||
"resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.21.7.tgz",
|
||||
"integrity": "sha512-xITZyh5sLFwRPYUSw15T00Rm7gcQ1qOPuQwNOcvHsTm6nLWTQ723w7zl42wrC5t+xtdg6FPmnXHml1nZxxvp1w==",
|
||||
"dependencies": {
|
||||
"detect-libc": "^1.0.3"
|
||||
},
|
||||
@@ -3426,20 +3424,21 @@
|
||||
"url": "https://opencollective.com/parcel"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"lightningcss-darwin-arm64": "1.21.5",
|
||||
"lightningcss-darwin-x64": "1.21.5",
|
||||
"lightningcss-linux-arm-gnueabihf": "1.21.5",
|
||||
"lightningcss-linux-arm64-gnu": "1.21.5",
|
||||
"lightningcss-linux-arm64-musl": "1.21.5",
|
||||
"lightningcss-linux-x64-gnu": "1.21.5",
|
||||
"lightningcss-linux-x64-musl": "1.21.5",
|
||||
"lightningcss-win32-x64-msvc": "1.21.5"
|
||||
"lightningcss-darwin-arm64": "1.21.7",
|
||||
"lightningcss-darwin-x64": "1.21.7",
|
||||
"lightningcss-freebsd-x64": "1.21.7",
|
||||
"lightningcss-linux-arm-gnueabihf": "1.21.7",
|
||||
"lightningcss-linux-arm64-gnu": "1.21.7",
|
||||
"lightningcss-linux-arm64-musl": "1.21.7",
|
||||
"lightningcss-linux-x64-gnu": "1.21.7",
|
||||
"lightningcss-linux-x64-musl": "1.21.7",
|
||||
"lightningcss-win32-x64-msvc": "1.21.7"
|
||||
}
|
||||
},
|
||||
"node_modules/lightningcss-darwin-arm64": {
|
||||
"version": "1.21.5",
|
||||
"resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.21.5.tgz",
|
||||
"integrity": "sha512-z05hyLX85WY0UfhkFUOrWEFqD69lpVAmgl3aDzMKlIZJGygbhbegqb4PV8qfUrKKNBauut/qVNPKZglhTaDDxA==",
|
||||
"version": "1.21.7",
|
||||
"resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.21.7.tgz",
|
||||
"integrity": "sha512-tt7hIsFio9jZofTVHtCACz6rB6c9RyABMXfA9A/VcKOjS3sq+koX/QkRJWY06utwOImbJIXBC5hbg9t3RkPUAQ==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -3456,9 +3455,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/lightningcss-darwin-x64": {
|
||||
"version": "1.21.5",
|
||||
"resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.21.5.tgz",
|
||||
"integrity": "sha512-MSJhmej/U9MrdPxDk7+FWhO8+UqVoZUHG4VvKT5RQ4RJtqtANTiWiI97LvoVNMtdMnHaKs1Pkji6wHUFxjJsHQ==",
|
||||
"version": "1.21.7",
|
||||
"resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.21.7.tgz",
|
||||
"integrity": "sha512-F4gS4bf7eWekfPT+TxJNm/pF+QRgZiTrTkQH6cw4/UWfdeZISfuhD5El2dm16giFnY0K5ylIwO+ZusgYNkGSXA==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -3474,10 +3473,29 @@
|
||||
"url": "https://opencollective.com/parcel"
|
||||
}
|
||||
},
|
||||
"node_modules/lightningcss-freebsd-x64": {
|
||||
"version": "1.21.7",
|
||||
"resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.21.7.tgz",
|
||||
"integrity": "sha512-RMfNzJWXCSfPnL55fcLWEAadcY6QUFT0S8NceNKYzp1KiCZtkJIy6RQ5SaVxPzRqd3iMsahUf5sfnG8N1UQSNQ==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"optional": true,
|
||||
"os": [
|
||||
"freebsd"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">= 12.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/parcel"
|
||||
}
|
||||
},
|
||||
"node_modules/lightningcss-linux-arm-gnueabihf": {
|
||||
"version": "1.21.5",
|
||||
"resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.21.5.tgz",
|
||||
"integrity": "sha512-xN6+5/JsMrbZHL1lPl+MiNJ3Xza12ueBKPepiyDCFQzlhFRTj7D0LG+cfNTzPBTO8KcYQynLpl1iBB8LGp3Xtw==",
|
||||
"version": "1.21.7",
|
||||
"resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.21.7.tgz",
|
||||
"integrity": "sha512-biSRUDZNx7vubWP1jArw/qqfZKPGpkV/qzunasZzxmqijbZ43sW9faDQYxWNcxPWljJJdF/qs6qcurYFovWtrQ==",
|
||||
"cpu": [
|
||||
"arm"
|
||||
],
|
||||
@@ -3494,9 +3512,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/lightningcss-linux-arm64-gnu": {
|
||||
"version": "1.21.5",
|
||||
"resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.21.5.tgz",
|
||||
"integrity": "sha512-KfzFNhC4XTbmG3ma/xcTs/IhCwieW89XALIusKmnV0N618ZDXEB0XjWOYQRCXeK9mfqPdbTBpurEHV/XZtkniQ==",
|
||||
"version": "1.21.7",
|
||||
"resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.21.7.tgz",
|
||||
"integrity": "sha512-PENY8QekqL9TG3AY/A7rkUBb5ymefGxea7Oe7+x7Hbw4Bz4Hpj5cec5OoMypMqFbURPmpi0fTWx4vSWUPzpDcA==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -3513,9 +3531,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/lightningcss-linux-arm64-musl": {
|
||||
"version": "1.21.5",
|
||||
"resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.21.5.tgz",
|
||||
"integrity": "sha512-bc0GytQO5Mn9QM6szaZ+31fQHNdidgpM1sSCwzPItz8hg3wOvKl8039rU0veMJV3ZgC9z0ypNRceLrSHeRHmXw==",
|
||||
"version": "1.21.7",
|
||||
"resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.21.7.tgz",
|
||||
"integrity": "sha512-pfOipKvA/0X1OjRaZt3870vnV9UGBSjayIqHh0fGx/+aRz3O0MVFHE/60P2UWXpM3YGJEw/hMWtNkrFwqOge8A==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -3532,9 +3550,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/lightningcss-linux-x64-gnu": {
|
||||
"version": "1.21.5",
|
||||
"resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.21.5.tgz",
|
||||
"integrity": "sha512-JwMbgypPQgc2kW2av3OwzZ8cbrEuIiDiXPJdXRE6aVxu67yHauJawQLqJKTGUhiAhy6iLDG8Wg0a3/ziL+m+Kw==",
|
||||
"version": "1.21.7",
|
||||
"resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.21.7.tgz",
|
||||
"integrity": "sha512-dgcsis4TAA7s0ia4f31QHX+G4PWPwxk+wJaEQLaV0NdJs09O5hHoA8DpLEr8nrvc/tsRTyVNBP1rDtgzySjpXg==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -3551,9 +3569,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/lightningcss-linux-x64-musl": {
|
||||
"version": "1.21.5",
|
||||
"resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.21.5.tgz",
|
||||
"integrity": "sha512-Ib8b6IQ/OR/VrPU6YBgy4T3QnuHY7DUa95O+nz+cwrTkMSN6fuHcTcIaz4t8TJ6HI5pl3uxUOZjmtls2pyQWow==",
|
||||
"version": "1.21.7",
|
||||
"resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.21.7.tgz",
|
||||
"integrity": "sha512-A+9dXpxld3p4Cd6fxev2eqEvaauYtrgNpXV3t7ioCJy30Oj9nYiNGwiGusM+4MJVcEpUPGUGiuAqY4sWilRDwA==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -3570,9 +3588,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/lightningcss-win32-x64-msvc": {
|
||||
"version": "1.21.5",
|
||||
"resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.21.5.tgz",
|
||||
"integrity": "sha512-A8cSi8lUpBeVmoF+DqqW7cd0FemDbCuKr490IXdjyeI+KL8adpSKUs8tcqO0OXPh1EoDqK7JNkD/dELmd4Iz5g==",
|
||||
"version": "1.21.7",
|
||||
"resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.21.7.tgz",
|
||||
"integrity": "sha512-07/8vogEq+C/mF99pdMhh/f19/xreq8N9Ca6AWeVHZIdODyF/pt6KdKSCWDZWIn+3CUxI8gCJWuUWyOc3xymvw==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -3793,6 +3811,19 @@
|
||||
"url": "https://opencollective.com/unified"
|
||||
}
|
||||
},
|
||||
"node_modules/mdast-util-newline-to-break": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/mdast-util-newline-to-break/-/mdast-util-newline-to-break-1.0.0.tgz",
|
||||
"integrity": "sha512-491LcYv3gbGhhCrLoeALncQmega2xPh+m3gbsIhVsOX4sw85+ShLFPvPyibxc1Swx/6GtzxgVodq+cGa/47ULg==",
|
||||
"dependencies": {
|
||||
"@types/mdast": "^3.0.0",
|
||||
"mdast-util-find-and-replace": "^2.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/unified"
|
||||
}
|
||||
},
|
||||
"node_modules/mdast-util-phrasing": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/mdast-util-phrasing/-/mdast-util-phrasing-3.0.1.tgz",
|
||||
@@ -4886,6 +4917,20 @@
|
||||
"url": "https://opencollective.com/unified"
|
||||
}
|
||||
},
|
||||
"node_modules/remark-breaks": {
|
||||
"version": "3.0.3",
|
||||
"resolved": "https://registry.npmjs.org/remark-breaks/-/remark-breaks-3.0.3.tgz",
|
||||
"integrity": "sha512-C7VkvcUp1TPUc2eAYzsPdaUh8Xj4FSbQnYA5A9f80diApLZscTDeG7efiWP65W8hV2sEy3JuGVU0i6qr5D8Hug==",
|
||||
"dependencies": {
|
||||
"@types/mdast": "^3.0.0",
|
||||
"mdast-util-newline-to-break": "^1.0.0",
|
||||
"unified": "^10.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/unified"
|
||||
}
|
||||
},
|
||||
"node_modules/remark-frontmatter": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/remark-frontmatter/-/remark-frontmatter-4.0.1.tgz",
|
||||
@@ -5159,9 +5204,9 @@
|
||||
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
|
||||
},
|
||||
"node_modules/sass": {
|
||||
"version": "1.63.6",
|
||||
"resolved": "https://registry.npmjs.org/sass/-/sass-1.63.6.tgz",
|
||||
"integrity": "sha512-MJuxGMHzaOW7ipp+1KdELtqKbfAWbH7OLIdoSMnVe3EXPMTmxTmlaZDCTsgIpPCs3w99lLo9/zDKkOrJuT5byw==",
|
||||
"version": "1.66.1",
|
||||
"resolved": "https://registry.npmjs.org/sass/-/sass-1.66.1.tgz",
|
||||
"integrity": "sha512-50c+zTsZOJVgFfTgwwEzkjA3/QACgdNsKueWPyAR0mRINIvLAStVQBbPg14iuqEQ74NPDbXzJARJ/O4SI1zftA==",
|
||||
"dependencies": {
|
||||
"chokidar": ">=3.0.0 <4.0.0",
|
||||
"immutable": "^4.0.0",
|
||||
@@ -5532,6 +5577,11 @@
|
||||
"url": "https://opencollective.com/unified"
|
||||
}
|
||||
},
|
||||
"node_modules/toml": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/toml/-/toml-3.0.0.tgz",
|
||||
"integrity": "sha512-y/mWCZinnvxjTKYhJ+pYxwD0mRLVvOtdS2Awbgxln6iEnt4rk0yBxeSBHkGJcPucRiG0e55mwWp+g/05rsrd6w=="
|
||||
},
|
||||
"node_modules/tough-cookie": {
|
||||
"version": "4.1.3",
|
||||
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz",
|
||||
|
||||
13
package.json
13
package.json
@@ -2,7 +2,7 @@
|
||||
"name": "@jackyzha0/quartz",
|
||||
"description": "🌱 publish your digital garden and notes as a website",
|
||||
"private": true,
|
||||
"version": "4.0.8",
|
||||
"version": "4.1.0",
|
||||
"type": "module",
|
||||
"author": "jackyzha0 <j.zhao2k19@gmail.com>",
|
||||
"license": "MIT",
|
||||
@@ -12,6 +12,7 @@
|
||||
"url": "https://github.com/jackyzha0/quartz.git"
|
||||
},
|
||||
"scripts": {
|
||||
"docs": "npx quartz build --serve -d docs",
|
||||
"check": "tsc --noEmit && npx prettier . --check",
|
||||
"format": "npx prettier . --write",
|
||||
"test": "tsx ./quartz/util/path.test.ts",
|
||||
@@ -34,13 +35,13 @@
|
||||
"dependencies": {
|
||||
"@clack/prompts": "^0.6.3",
|
||||
"@floating-ui/dom": "^1.4.0",
|
||||
"@napi-rs/simple-git": "^0.1.8",
|
||||
"@napi-rs/simple-git": "0.1.9",
|
||||
"async-mutex": "^0.4.0",
|
||||
"chalk": "^4.1.2",
|
||||
"chokidar": "^3.5.3",
|
||||
"cli-spinner": "^0.2.10",
|
||||
"d3": "^7.8.5",
|
||||
"esbuild-sass-plugin": "^2.9.0",
|
||||
"esbuild-sass-plugin": "^2.12.0",
|
||||
"flexsearch": "0.7.21",
|
||||
"github-slugger": "^2.0.0",
|
||||
"globby": "^13.1.4",
|
||||
@@ -50,7 +51,7 @@
|
||||
"hast-util-to-string": "^2.0.0",
|
||||
"is-absolute-url": "^4.0.1",
|
||||
"js-yaml": "^4.1.0",
|
||||
"lightningcss": "^1.21.5",
|
||||
"lightningcss": "1.21.7",
|
||||
"mdast-util-find-and-replace": "^2.2.2",
|
||||
"mdast-util-to-hast": "^12.3.0",
|
||||
"mdast-util-to-string": "^3.2.0",
|
||||
@@ -68,6 +69,7 @@
|
||||
"rehype-raw": "^6.1.1",
|
||||
"rehype-slug": "^5.1.0",
|
||||
"remark": "^14.0.2",
|
||||
"remark-breaks": "^3.0.3",
|
||||
"remark-frontmatter": "^4.0.1",
|
||||
"remark-gfm": "^3.0.1",
|
||||
"remark-math": "^5.1.1",
|
||||
@@ -78,6 +80,7 @@
|
||||
"serve-handler": "^6.1.5",
|
||||
"source-map-support": "^0.5.21",
|
||||
"to-vfile": "^7.2.4",
|
||||
"toml": "^3.0.0",
|
||||
"unified": "^10.1.2",
|
||||
"unist-util-visit": "^4.1.2",
|
||||
"vfile": "^5.3.7",
|
||||
@@ -97,7 +100,7 @@
|
||||
"@types/workerpool": "^6.4.0",
|
||||
"@types/ws": "^8.5.5",
|
||||
"@types/yargs": "^17.0.24",
|
||||
"esbuild": "^0.18.11",
|
||||
"esbuild": "0.19.2",
|
||||
"prettier": "^3.0.0",
|
||||
"tsx": "^3.12.7",
|
||||
"typescript": "^5.0.4"
|
||||
|
||||
@@ -6,11 +6,13 @@ const config: QuartzConfig = {
|
||||
pageTitle: "Logos Collective Project Roadmaps",
|
||||
enableSPA: true,
|
||||
enablePopovers: true,
|
||||
defaultDateType: "modified",
|
||||
analytics: {
|
||||
provider: "plausible",
|
||||
},
|
||||
baseUrl: "roadmap.logos.co",
|
||||
ignorePatterns: ["private", "templates"],
|
||||
defaultDateType: "created",
|
||||
theme: {
|
||||
typography: {
|
||||
header: "sans-serif",
|
||||
@@ -68,6 +70,7 @@ const config: QuartzConfig = {
|
||||
}),
|
||||
Plugin.Assets(),
|
||||
Plugin.Static(),
|
||||
Plugin.NotFoundPage(),
|
||||
],
|
||||
},
|
||||
}
|
||||
|
||||
@@ -21,9 +21,13 @@ export const defaultContentPageLayout: PageLayout = {
|
||||
Component.MobileOnly(Component.Spacer()),
|
||||
Component.Search(),
|
||||
Component.Darkmode(),
|
||||
Component.DesktopOnly(Component.TableOfContents()),
|
||||
Component.DesktopOnly(Component.Explorer()),
|
||||
],
|
||||
right: [
|
||||
Component.Graph(),
|
||||
Component.DesktopOnly(Component.TableOfContents()),
|
||||
Component.Backlinks(),
|
||||
],
|
||||
right: [Component.Graph(), Component.Backlinks()],
|
||||
}
|
||||
|
||||
// components for pages that display lists of pages (e.g. tags or folders)
|
||||
|
||||
@@ -1,538 +1,39 @@
|
||||
#!/usr/bin/env node
|
||||
import { promises, readFileSync } from "fs"
|
||||
import yargs from "yargs"
|
||||
import path from "path"
|
||||
import { hideBin } from "yargs/helpers"
|
||||
import esbuild from "esbuild"
|
||||
import chalk from "chalk"
|
||||
import { sassPlugin } from "esbuild-sass-plugin"
|
||||
import fs from "fs"
|
||||
import { intro, isCancel, outro, select, text } from "@clack/prompts"
|
||||
import { rimraf } from "rimraf"
|
||||
import chokidar from "chokidar"
|
||||
import prettyBytes from "pretty-bytes"
|
||||
import { execSync, spawnSync } from "child_process"
|
||||
import http from "http"
|
||||
import serveHandler from "serve-handler"
|
||||
import { WebSocketServer } from "ws"
|
||||
import { randomUUID } from "crypto"
|
||||
import { Mutex } from "async-mutex"
|
||||
|
||||
const ORIGIN_NAME = "origin"
|
||||
const UPSTREAM_NAME = "upstream"
|
||||
const QUARTZ_SOURCE_BRANCH = "v4"
|
||||
const cwd = process.cwd()
|
||||
const cacheDir = path.join(cwd, ".quartz-cache")
|
||||
const cacheFile = "./.quartz-cache/transpiled-build.mjs"
|
||||
const fp = "./quartz/build.ts"
|
||||
const { version } = JSON.parse(readFileSync("./package.json").toString())
|
||||
const contentCacheFolder = path.join(cacheDir, "content-cache")
|
||||
|
||||
const CommonArgv = {
|
||||
directory: {
|
||||
string: true,
|
||||
alias: ["d"],
|
||||
default: "content",
|
||||
describe: "directory to look for content files",
|
||||
},
|
||||
verbose: {
|
||||
boolean: true,
|
||||
alias: ["v"],
|
||||
default: false,
|
||||
describe: "print out extra logging information",
|
||||
},
|
||||
}
|
||||
|
||||
const SyncArgv = {
|
||||
...CommonArgv,
|
||||
commit: {
|
||||
boolean: true,
|
||||
default: true,
|
||||
describe: "create a git commit for your unsaved changes",
|
||||
},
|
||||
push: {
|
||||
boolean: true,
|
||||
default: true,
|
||||
describe: "push updates to your Quartz fork",
|
||||
},
|
||||
pull: {
|
||||
boolean: true,
|
||||
default: true,
|
||||
describe: "pull updates from your Quartz fork",
|
||||
},
|
||||
}
|
||||
|
||||
const BuildArgv = {
|
||||
...CommonArgv,
|
||||
output: {
|
||||
string: true,
|
||||
alias: ["o"],
|
||||
default: "public",
|
||||
describe: "output folder for files",
|
||||
},
|
||||
serve: {
|
||||
boolean: true,
|
||||
default: false,
|
||||
describe: "run a local server to live-preview your Quartz",
|
||||
},
|
||||
baseDir: {
|
||||
string: true,
|
||||
default: "",
|
||||
describe: "base path to serve your local server on",
|
||||
},
|
||||
port: {
|
||||
number: true,
|
||||
default: 8080,
|
||||
describe: "port to serve Quartz on",
|
||||
},
|
||||
bundleInfo: {
|
||||
boolean: true,
|
||||
default: false,
|
||||
describe: "show detailed bundle information",
|
||||
},
|
||||
concurrency: {
|
||||
number: true,
|
||||
describe: "how many threads to use to parse notes",
|
||||
},
|
||||
}
|
||||
|
||||
function escapePath(fp) {
|
||||
return fp
|
||||
.replace(/\\ /g, " ") // unescape spaces
|
||||
.replace(/^".*"$/, "$1")
|
||||
.replace(/^'.*"$/, "$1")
|
||||
.trim()
|
||||
}
|
||||
|
||||
function exitIfCancel(val) {
|
||||
if (isCancel(val)) {
|
||||
outro(chalk.red("Exiting"))
|
||||
process.exit(0)
|
||||
} else {
|
||||
return val
|
||||
}
|
||||
}
|
||||
|
||||
async function stashContentFolder(contentFolder) {
|
||||
await fs.promises.rm(contentCacheFolder, { force: true, recursive: true })
|
||||
await fs.promises.cp(contentFolder, contentCacheFolder, {
|
||||
force: true,
|
||||
recursive: true,
|
||||
verbatimSymlinks: true,
|
||||
preserveTimestamps: true,
|
||||
})
|
||||
await fs.promises.rm(contentFolder, { force: true, recursive: true })
|
||||
}
|
||||
|
||||
async function popContentFolder(contentFolder) {
|
||||
await fs.promises.rm(contentFolder, { force: true, recursive: true })
|
||||
await fs.promises.cp(contentCacheFolder, contentFolder, {
|
||||
force: true,
|
||||
recursive: true,
|
||||
verbatimSymlinks: true,
|
||||
preserveTimestamps: true,
|
||||
})
|
||||
await fs.promises.rm(contentCacheFolder, { force: true, recursive: true })
|
||||
}
|
||||
|
||||
function gitPull(origin, branch) {
|
||||
const flags = ["--no-rebase", "--autostash", "-s", "recursive", "-X", "ours", "--no-edit"]
|
||||
const out = spawnSync("git", ["pull", ...flags, origin, branch], { stdio: "inherit" })
|
||||
if (out.stderr) {
|
||||
throw new Error(`Error while pulling updates: ${out.stderr}`)
|
||||
}
|
||||
}
|
||||
import {
|
||||
handleBuild,
|
||||
handleCreate,
|
||||
handleUpdate,
|
||||
handleRestore,
|
||||
handleSync,
|
||||
} from "./cli/handlers.js"
|
||||
import { CommonArgv, BuildArgv, CreateArgv, SyncArgv } from "./cli/args.js"
|
||||
import { version } from "./cli/constants.js"
|
||||
|
||||
yargs(hideBin(process.argv))
|
||||
.scriptName("quartz")
|
||||
.version(version)
|
||||
.usage("$0 <cmd> [args]")
|
||||
.command("create", "Initialize Quartz", CommonArgv, async (argv) => {
|
||||
console.log()
|
||||
intro(chalk.bgGreen.black(` Quartz v${version} `))
|
||||
const contentFolder = path.join(cwd, argv.directory)
|
||||
const setupStrategy = exitIfCancel(
|
||||
await select({
|
||||
message: `Choose how to initialize the content in \`${contentFolder}\``,
|
||||
options: [
|
||||
{ value: "new", label: "Empty Quartz" },
|
||||
{ value: "copy", label: "Copy an existing folder", hint: "overwrites `content`" },
|
||||
{
|
||||
value: "symlink",
|
||||
label: "Symlink an existing folder",
|
||||
hint: "don't select this unless you know what you are doing!",
|
||||
},
|
||||
{ value: "keep", label: "Keep the existing files" },
|
||||
],
|
||||
}),
|
||||
)
|
||||
|
||||
async function rmContentFolder() {
|
||||
const contentStat = await fs.promises.lstat(contentFolder)
|
||||
if (contentStat.isSymbolicLink()) {
|
||||
await fs.promises.unlink(contentFolder)
|
||||
} else {
|
||||
await rimraf(contentFolder)
|
||||
}
|
||||
}
|
||||
|
||||
if (setupStrategy === "copy" || setupStrategy === "symlink") {
|
||||
const originalFolder = escapePath(
|
||||
exitIfCancel(
|
||||
await text({
|
||||
message: "Enter the full path to existing content folder",
|
||||
placeholder:
|
||||
"On most terminal emulators, you can drag and drop a folder into the window and it will paste the full path",
|
||||
validate(fp) {
|
||||
const fullPath = escapePath(fp)
|
||||
if (!fs.existsSync(fullPath)) {
|
||||
return "The given path doesn't exist"
|
||||
} else if (!fs.lstatSync(fullPath).isDirectory()) {
|
||||
return "The given path is not a folder"
|
||||
}
|
||||
},
|
||||
}),
|
||||
),
|
||||
)
|
||||
|
||||
await rmContentFolder()
|
||||
if (setupStrategy === "copy") {
|
||||
await fs.promises.cp(originalFolder, contentFolder, {
|
||||
recursive: true,
|
||||
preserveTimestamps: true,
|
||||
})
|
||||
} else if (setupStrategy === "symlink") {
|
||||
await fs.promises.symlink(originalFolder, contentFolder, "dir")
|
||||
}
|
||||
} else if (setupStrategy === "new") {
|
||||
await rmContentFolder()
|
||||
await fs.promises.mkdir(contentFolder)
|
||||
await fs.promises.writeFile(
|
||||
path.join(contentFolder, "index.md"),
|
||||
`---
|
||||
title: Welcome to Quartz
|
||||
---
|
||||
|
||||
This is a blank Quartz installation.
|
||||
See the [documentation](https://quartz.jzhao.xyz) for how to get started.
|
||||
`,
|
||||
)
|
||||
}
|
||||
|
||||
// get a prefered link resolution strategy
|
||||
const linkResolutionStrategy = exitIfCancel(
|
||||
await select({
|
||||
message: `Choose how Quartz should resolve links in your content. You can change this later in \`quartz.config.ts\`.`,
|
||||
options: [
|
||||
{
|
||||
value: "absolute",
|
||||
label: "Treat links as absolute path",
|
||||
hint: "for content made for Quartz 3 and Hugo",
|
||||
},
|
||||
{
|
||||
value: "shortest",
|
||||
label: "Treat links as shortest path",
|
||||
hint: "for most Obsidian vaults",
|
||||
},
|
||||
{
|
||||
value: "relative",
|
||||
label: "Treat links as relative paths",
|
||||
hint: "for just normal Markdown files",
|
||||
},
|
||||
],
|
||||
}),
|
||||
)
|
||||
|
||||
// now, do config changes
|
||||
const configFilePath = path.join(cwd, "quartz.config.ts")
|
||||
let configContent = await fs.promises.readFile(configFilePath, { encoding: "utf-8" })
|
||||
configContent = configContent.replace(
|
||||
/markdownLinkResolution: '(.+)'/,
|
||||
`markdownLinkResolution: '${linkResolutionStrategy}'`,
|
||||
)
|
||||
await fs.promises.writeFile(configFilePath, configContent)
|
||||
|
||||
outro(`You're all set! Not sure what to do next? Try:
|
||||
• Customizing Quartz a bit more by editing \`quartz.config.ts\`
|
||||
• Running \`npx quartz build --serve\` to preview your Quartz locally
|
||||
• Hosting your Quartz online (see: https://quartz.jzhao.xyz/hosting)
|
||||
`)
|
||||
.command("create", "Initialize Quartz", CreateArgv, async (argv) => {
|
||||
await handleCreate(argv)
|
||||
})
|
||||
.command("update", "Get the latest Quartz updates", CommonArgv, async (argv) => {
|
||||
const contentFolder = path.join(cwd, argv.directory)
|
||||
console.log(chalk.bgGreen.black(`\n Quartz v${version} \n`))
|
||||
console.log("Backing up your content")
|
||||
execSync(
|
||||
`git remote show upstream || git remote add upstream https://github.com/jackyzha0/quartz.git`,
|
||||
)
|
||||
await stashContentFolder(contentFolder)
|
||||
console.log(
|
||||
"Pulling updates... you may need to resolve some `git` conflicts if you've made changes to components or plugins.",
|
||||
)
|
||||
gitPull(UPSTREAM_NAME, QUARTZ_SOURCE_BRANCH)
|
||||
await popContentFolder(contentFolder)
|
||||
console.log("Ensuring dependencies are up to date")
|
||||
spawnSync("npm", ["i"], { stdio: "inherit" })
|
||||
console.log(chalk.green("Done!"))
|
||||
await handleUpdate(argv)
|
||||
})
|
||||
.command(
|
||||
"restore",
|
||||
"Try to restore your content folder from the cache",
|
||||
CommonArgv,
|
||||
async (argv) => {
|
||||
const contentFolder = path.join(cwd, argv.directory)
|
||||
await popContentFolder(contentFolder)
|
||||
await handleRestore(argv)
|
||||
},
|
||||
)
|
||||
.command("sync", "Sync your Quartz to and from GitHub.", SyncArgv, async (argv) => {
|
||||
const contentFolder = path.join(cwd, argv.directory)
|
||||
console.log(chalk.bgGreen.black(`\n Quartz v${version} \n`))
|
||||
console.log("Backing up your content")
|
||||
|
||||
if (argv.commit) {
|
||||
const contentStat = await fs.promises.lstat(contentFolder)
|
||||
if (contentStat.isSymbolicLink()) {
|
||||
const linkTarg = await fs.promises.readlink(contentFolder)
|
||||
console.log(chalk.yellow("Detected symlink, trying to dereference before committing"))
|
||||
|
||||
// stash symlink file
|
||||
await stashContentFolder(contentFolder)
|
||||
|
||||
// follow symlink and copy content
|
||||
await fs.promises.cp(linkTarg, contentFolder, {
|
||||
recursive: true,
|
||||
preserveTimestamps: true,
|
||||
})
|
||||
}
|
||||
|
||||
const currentTimestamp = new Date().toLocaleString("en-US", {
|
||||
dateStyle: "medium",
|
||||
timeStyle: "short",
|
||||
})
|
||||
spawnSync("git", ["add", "."], { stdio: "inherit" })
|
||||
spawnSync("git", ["commit", "-m", `Quartz sync: ${currentTimestamp}`], { stdio: "inherit" })
|
||||
|
||||
if (contentStat.isSymbolicLink()) {
|
||||
// put symlink back
|
||||
await popContentFolder(contentFolder)
|
||||
}
|
||||
}
|
||||
|
||||
await stashContentFolder(contentFolder)
|
||||
|
||||
if (argv.pull) {
|
||||
console.log(
|
||||
"Pulling updates from your repository. You may need to resolve some `git` conflicts if you've made changes to components or plugins.",
|
||||
)
|
||||
gitPull(ORIGIN_NAME, QUARTZ_SOURCE_BRANCH)
|
||||
}
|
||||
|
||||
await popContentFolder(contentFolder)
|
||||
if (argv.push) {
|
||||
console.log("Pushing your changes")
|
||||
spawnSync("git", ["push", "-f", ORIGIN_NAME, QUARTZ_SOURCE_BRANCH], { stdio: "inherit" })
|
||||
}
|
||||
|
||||
console.log(chalk.green("Done!"))
|
||||
await handleSync(argv)
|
||||
})
|
||||
.command("build", "Build Quartz into a bundle of static HTML files", BuildArgv, async (argv) => {
|
||||
console.log(chalk.bgGreen.black(`\n Quartz v${version} \n`))
|
||||
const ctx = await esbuild.context({
|
||||
entryPoints: [fp],
|
||||
outfile: path.join("quartz", cacheFile),
|
||||
bundle: true,
|
||||
keepNames: true,
|
||||
minifyWhitespace: true,
|
||||
minifySyntax: true,
|
||||
platform: "node",
|
||||
format: "esm",
|
||||
jsx: "automatic",
|
||||
jsxImportSource: "preact",
|
||||
packages: "external",
|
||||
metafile: true,
|
||||
sourcemap: true,
|
||||
sourcesContent: false,
|
||||
plugins: [
|
||||
sassPlugin({
|
||||
type: "css-text",
|
||||
cssImports: true,
|
||||
}),
|
||||
{
|
||||
name: "inline-script-loader",
|
||||
setup(build) {
|
||||
build.onLoad({ filter: /\.inline\.(ts|js)$/ }, async (args) => {
|
||||
let text = await promises.readFile(args.path, "utf8")
|
||||
|
||||
// remove default exports that we manually inserted
|
||||
text = text.replace("export default", "")
|
||||
text = text.replace("export", "")
|
||||
|
||||
const sourcefile = path.relative(path.resolve("."), args.path)
|
||||
const resolveDir = path.dirname(sourcefile)
|
||||
const transpiled = await esbuild.build({
|
||||
stdin: {
|
||||
contents: text,
|
||||
loader: "ts",
|
||||
resolveDir,
|
||||
sourcefile,
|
||||
},
|
||||
write: false,
|
||||
bundle: true,
|
||||
platform: "browser",
|
||||
format: "esm",
|
||||
})
|
||||
const rawMod = transpiled.outputFiles[0].text
|
||||
return {
|
||||
contents: rawMod,
|
||||
loader: "text",
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
],
|
||||
})
|
||||
|
||||
const buildMutex = new Mutex()
|
||||
const timeoutIds = new Set()
|
||||
const build = async (clientRefresh) => {
|
||||
await buildMutex.acquire()
|
||||
const result = await ctx.rebuild().catch((err) => {
|
||||
console.error(`${chalk.red("Couldn't parse Quartz configuration:")} ${fp}`)
|
||||
console.log(`Reason: ${chalk.grey(err)}`)
|
||||
process.exit(1)
|
||||
})
|
||||
|
||||
if (argv.bundleInfo) {
|
||||
const outputFileName = "quartz/.quartz-cache/transpiled-build.mjs"
|
||||
const meta = result.metafile.outputs[outputFileName]
|
||||
console.log(
|
||||
`Successfully transpiled ${Object.keys(meta.inputs).length} files (${prettyBytes(
|
||||
meta.bytes,
|
||||
)})`,
|
||||
)
|
||||
console.log(await esbuild.analyzeMetafile(result.metafile, { color: true }))
|
||||
}
|
||||
|
||||
// bypass module cache
|
||||
// https://github.com/nodejs/modules/issues/307
|
||||
const { default: buildQuartz } = await import(cacheFile + `?update=${randomUUID()}`)
|
||||
await buildQuartz(argv, clientRefresh)
|
||||
clientRefresh()
|
||||
buildMutex.release()
|
||||
}
|
||||
|
||||
const rebuild = (clientRefresh) => {
|
||||
timeoutIds.forEach((id) => clearTimeout(id))
|
||||
timeoutIds.clear()
|
||||
timeoutIds.add(setTimeout(() => build(clientRefresh), 250))
|
||||
}
|
||||
|
||||
if (argv.serve) {
|
||||
const connections = []
|
||||
const clientRefresh = () => connections.forEach((conn) => conn.send("rebuild"))
|
||||
|
||||
if (argv.baseDir !== "" && !argv.baseDir.startsWith("/")) {
|
||||
argv.baseDir = "/" + argv.baseDir
|
||||
}
|
||||
|
||||
await build(clientRefresh)
|
||||
const server = http.createServer(async (req, res) => {
|
||||
if (argv.baseDir && !req.url?.startsWith(argv.baseDir)) {
|
||||
console.log(
|
||||
chalk.red(
|
||||
`[404] ${req.url} (warning: link outside of site, this is likely a Quartz bug)`,
|
||||
),
|
||||
)
|
||||
res.writeHead(404)
|
||||
res.end()
|
||||
return
|
||||
}
|
||||
|
||||
// strip baseDir prefix
|
||||
req.url = req.url?.slice(argv.baseDir.length)
|
||||
|
||||
const serve = async () => {
|
||||
await serveHandler(req, res, {
|
||||
public: argv.output,
|
||||
directoryListing: false,
|
||||
})
|
||||
const status = res.statusCode
|
||||
const statusString =
|
||||
status >= 200 && status < 300 ? chalk.green(`[${status}]`) : chalk.red(`[${status}]`)
|
||||
console.log(statusString + chalk.grey(` ${argv.baseDir}${req.url}`))
|
||||
}
|
||||
|
||||
const redirect = (newFp) => {
|
||||
newFp = argv.baseDir + newFp
|
||||
res.writeHead(302, {
|
||||
Location: newFp,
|
||||
})
|
||||
console.log(chalk.yellow("[302]") + chalk.grey(` ${argv.baseDir}${req.url} -> ${newFp}`))
|
||||
res.end()
|
||||
}
|
||||
|
||||
let fp = req.url?.split("?")[0] ?? "/"
|
||||
|
||||
// handle redirects
|
||||
if (fp.endsWith("/")) {
|
||||
// /trailing/
|
||||
// does /trailing/index.html exist? if so, serve it
|
||||
const indexFp = path.posix.join(fp, "index.html")
|
||||
if (fs.existsSync(path.posix.join(argv.output, indexFp))) {
|
||||
req.url = fp
|
||||
return serve()
|
||||
}
|
||||
|
||||
// does /trailing.html exist? if so, redirect to /trailing
|
||||
let base = fp.slice(0, -1)
|
||||
if (path.extname(base) === "") {
|
||||
base += ".html"
|
||||
}
|
||||
if (fs.existsSync(path.posix.join(argv.output, base))) {
|
||||
return redirect(fp.slice(0, -1))
|
||||
}
|
||||
} else {
|
||||
// /regular
|
||||
// does /regular.html exist? if so, serve it
|
||||
let base = fp
|
||||
if (path.extname(base) === "") {
|
||||
base += ".html"
|
||||
}
|
||||
if (fs.existsSync(path.posix.join(argv.output, base))) {
|
||||
req.url = fp
|
||||
return serve()
|
||||
}
|
||||
|
||||
// does /regular/index.html exist? if so, redirect to /regular/
|
||||
let indexFp = path.posix.join(fp, "index.html")
|
||||
if (fs.existsSync(path.posix.join(argv.output, indexFp))) {
|
||||
return redirect(fp + "/")
|
||||
}
|
||||
}
|
||||
|
||||
return serve()
|
||||
})
|
||||
server.listen(argv.port)
|
||||
const wss = new WebSocketServer({ port: 3001 })
|
||||
wss.on("connection", (ws) => connections.push(ws))
|
||||
console.log(
|
||||
chalk.cyan(
|
||||
`Started a Quartz server listening at http://localhost:${argv.port}${argv.baseDir}`,
|
||||
),
|
||||
)
|
||||
console.log("hint: exit with ctrl+c")
|
||||
chokidar
|
||||
.watch(["**/*.ts", "**/*.tsx", "**/*.scss", "package.json"], {
|
||||
ignoreInitial: true,
|
||||
})
|
||||
.on("all", async () => {
|
||||
console.log(chalk.yellow("Detected a source code change, doing a hard rebuild..."))
|
||||
rebuild(clientRefresh)
|
||||
})
|
||||
} else {
|
||||
await build(() => {})
|
||||
ctx.dispose()
|
||||
}
|
||||
await handleBuild(argv)
|
||||
})
|
||||
.showHelpOnFail(false)
|
||||
.help()
|
||||
|
||||
@@ -18,7 +18,7 @@ import { trace } from "./util/trace"
|
||||
import { options } from "./util/sourcemap"
|
||||
import { Mutex } from "async-mutex"
|
||||
|
||||
async function buildQuartz(argv: Argv, clientRefresh: () => void) {
|
||||
async function buildQuartz(argv: Argv, mut: Mutex, clientRefresh: () => void) {
|
||||
const ctx: BuildCtx = {
|
||||
argv,
|
||||
cfg,
|
||||
@@ -38,13 +38,14 @@ async function buildQuartz(argv: Argv, clientRefresh: () => void) {
|
||||
console.log(` Emitters: ${pluginNames("emitters").join(", ")}`)
|
||||
}
|
||||
|
||||
const release = await mut.acquire()
|
||||
perf.addEvent("clean")
|
||||
await rimraf(output)
|
||||
console.log(`Cleaned output directory \`${output}\` in ${perf.timeSince("clean")}`)
|
||||
|
||||
perf.addEvent("glob")
|
||||
const allFiles = await glob("**/*.*", argv.directory, cfg.configuration.ignorePatterns)
|
||||
const fps = allFiles.filter((fp) => fp.endsWith(".md"))
|
||||
const fps = allFiles.filter((fp) => fp.endsWith(".md")).sort()
|
||||
console.log(
|
||||
`Found ${fps.length} input files from \`${argv.directory}\` in ${perf.timeSince("glob")}`,
|
||||
)
|
||||
@@ -56,15 +57,17 @@ async function buildQuartz(argv: Argv, clientRefresh: () => void) {
|
||||
const filteredContent = filterContent(ctx, parsedFiles)
|
||||
await emitContent(ctx, filteredContent)
|
||||
console.log(chalk.green(`Done processing ${fps.length} files in ${perf.timeSince()}`))
|
||||
release()
|
||||
|
||||
if (argv.serve) {
|
||||
return startServing(ctx, parsedFiles, clientRefresh)
|
||||
return startServing(ctx, mut, parsedFiles, clientRefresh)
|
||||
}
|
||||
}
|
||||
|
||||
// setup watcher for rebuilds
|
||||
async function startServing(
|
||||
ctx: BuildCtx,
|
||||
mut: Mutex,
|
||||
initialContent: ProcessedContent[],
|
||||
clientRefresh: () => void,
|
||||
) {
|
||||
@@ -78,8 +81,7 @@ async function startServing(
|
||||
}
|
||||
|
||||
const initialSlugs = ctx.allSlugs
|
||||
const buildMutex = new Mutex()
|
||||
const timeoutIds: Set<ReturnType<typeof setTimeout>> = new Set()
|
||||
let lastBuildMs = 0
|
||||
const toRebuild: Set<FilePath> = new Set()
|
||||
const toRemove: Set<FilePath> = new Set()
|
||||
const trackedAssets: Set<FilePath> = new Set()
|
||||
@@ -108,47 +110,52 @@ async function startServing(
|
||||
toRemove.add(filePath)
|
||||
}
|
||||
|
||||
timeoutIds.forEach((id) => clearTimeout(id))
|
||||
|
||||
// debounce rebuilds every 250ms
|
||||
timeoutIds.add(
|
||||
setTimeout(async () => {
|
||||
await buildMutex.acquire()
|
||||
const perf = new PerfTimer()
|
||||
console.log(chalk.yellow("Detected change, rebuilding..."))
|
||||
try {
|
||||
const filesToRebuild = [...toRebuild].filter((fp) => !toRemove.has(fp))
|
||||
|
||||
const trackedSlugs = [...new Set([...contentMap.keys(), ...toRebuild, ...trackedAssets])]
|
||||
.filter((fp) => !toRemove.has(fp))
|
||||
.map((fp) => slugifyFilePath(path.posix.relative(argv.directory, fp) as FilePath))
|
||||
const buildStart = new Date().getTime()
|
||||
lastBuildMs = buildStart
|
||||
const release = await mut.acquire()
|
||||
if (lastBuildMs > buildStart) {
|
||||
release()
|
||||
return
|
||||
}
|
||||
|
||||
ctx.allSlugs = [...new Set([...initialSlugs, ...trackedSlugs])]
|
||||
const parsedContent = await parseMarkdown(ctx, filesToRebuild)
|
||||
for (const content of parsedContent) {
|
||||
const [_tree, vfile] = content
|
||||
contentMap.set(vfile.data.filePath!, content)
|
||||
}
|
||||
const perf = new PerfTimer()
|
||||
console.log(chalk.yellow("Detected change, rebuilding..."))
|
||||
try {
|
||||
const filesToRebuild = [...toRebuild].filter((fp) => !toRemove.has(fp))
|
||||
|
||||
for (const fp of toRemove) {
|
||||
contentMap.delete(fp)
|
||||
}
|
||||
const trackedSlugs = [...new Set([...contentMap.keys(), ...toRebuild, ...trackedAssets])]
|
||||
.filter((fp) => !toRemove.has(fp))
|
||||
.map((fp) => slugifyFilePath(path.posix.relative(argv.directory, fp) as FilePath))
|
||||
|
||||
await rimraf(argv.output)
|
||||
const parsedFiles = [...contentMap.values()]
|
||||
const filteredContent = filterContent(ctx, parsedFiles)
|
||||
await emitContent(ctx, filteredContent)
|
||||
console.log(chalk.green(`Done rebuilding in ${perf.timeSince()}`))
|
||||
} catch {
|
||||
console.log(chalk.yellow(`Rebuild failed. Waiting on a change to fix the error...`))
|
||||
}
|
||||
ctx.allSlugs = [...new Set([...initialSlugs, ...trackedSlugs])]
|
||||
const parsedContent = await parseMarkdown(ctx, filesToRebuild)
|
||||
for (const content of parsedContent) {
|
||||
const [_tree, vfile] = content
|
||||
contentMap.set(vfile.data.filePath!, content)
|
||||
}
|
||||
|
||||
clientRefresh()
|
||||
toRebuild.clear()
|
||||
toRemove.clear()
|
||||
buildMutex.release()
|
||||
}, 250),
|
||||
)
|
||||
for (const fp of toRemove) {
|
||||
contentMap.delete(fp)
|
||||
}
|
||||
|
||||
const parsedFiles = [...contentMap.values()]
|
||||
const filteredContent = filterContent(ctx, parsedFiles)
|
||||
|
||||
// TODO: we can probably traverse the link graph to figure out what's safe to delete here
|
||||
// instead of just deleting everything
|
||||
await rimraf(argv.output)
|
||||
await emitContent(ctx, filteredContent)
|
||||
console.log(chalk.green(`Done rebuilding in ${perf.timeSince()}`))
|
||||
} catch {
|
||||
console.log(chalk.yellow(`Rebuild failed. Waiting on a change to fix the error...`))
|
||||
}
|
||||
|
||||
clientRefresh()
|
||||
toRebuild.clear()
|
||||
toRemove.clear()
|
||||
release()
|
||||
}
|
||||
|
||||
const watcher = chokidar.watch(".", {
|
||||
@@ -161,11 +168,15 @@ async function startServing(
|
||||
.on("add", (fp) => rebuild(fp, "add"))
|
||||
.on("change", (fp) => rebuild(fp, "change"))
|
||||
.on("unlink", (fp) => rebuild(fp, "delete"))
|
||||
|
||||
return async () => {
|
||||
await watcher.close()
|
||||
}
|
||||
}
|
||||
|
||||
export default async (argv: Argv, clientRefresh: () => void) => {
|
||||
export default async (argv: Argv, mut: Mutex, clientRefresh: () => void) => {
|
||||
try {
|
||||
return await buildQuartz(argv, clientRefresh)
|
||||
return await buildQuartz(argv, mut, clientRefresh)
|
||||
} catch (err) {
|
||||
trace("\nExiting Quartz due to a fatal error", err as Error)
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { ValidDateType } from "./components/Date"
|
||||
import { QuartzComponent } from "./components/types"
|
||||
import { PluginTypes } from "./plugins/types"
|
||||
import { Theme } from "./util/theme"
|
||||
@@ -11,6 +12,10 @@ export type Analytics =
|
||||
provider: "google"
|
||||
tagId: string
|
||||
}
|
||||
| {
|
||||
provider: "umami"
|
||||
websiteId: string
|
||||
}
|
||||
|
||||
export interface GlobalConfiguration {
|
||||
pageTitle: string
|
||||
@@ -22,6 +27,8 @@ export interface GlobalConfiguration {
|
||||
analytics: Analytics
|
||||
/** Glob patterns to not search */
|
||||
ignorePatterns: string[]
|
||||
/** Whether to use created, modified, or published as the default type of date */
|
||||
defaultDateType: ValidDateType
|
||||
/** Base URL to use for CNAME files, sitemaps, and RSS feeds that require an absolute URL.
|
||||
* Quartz will avoid using this as much as possible and use relative URLs most of the time
|
||||
*/
|
||||
|
||||
98
quartz/cli/args.js
Normal file
98
quartz/cli/args.js
Normal file
@@ -0,0 +1,98 @@
|
||||
export const CommonArgv = {
|
||||
directory: {
|
||||
string: true,
|
||||
alias: ["d"],
|
||||
default: "content",
|
||||
describe: "directory to look for content files",
|
||||
},
|
||||
verbose: {
|
||||
boolean: true,
|
||||
alias: ["v"],
|
||||
default: false,
|
||||
describe: "print out extra logging information",
|
||||
},
|
||||
}
|
||||
|
||||
export const CreateArgv = {
|
||||
...CommonArgv,
|
||||
source: {
|
||||
string: true,
|
||||
alias: ["s"],
|
||||
describe: "source directory to copy/create symlink from",
|
||||
},
|
||||
strategy: {
|
||||
string: true,
|
||||
alias: ["X"],
|
||||
choices: ["new", "copy", "symlink"],
|
||||
describe: "strategy for content folder setup",
|
||||
},
|
||||
links: {
|
||||
string: true,
|
||||
alias: ["l"],
|
||||
choices: ["absolute", "shortest", "relative"],
|
||||
describe: "strategy to resolve links",
|
||||
},
|
||||
}
|
||||
|
||||
export const SyncArgv = {
|
||||
...CommonArgv,
|
||||
commit: {
|
||||
boolean: true,
|
||||
default: true,
|
||||
describe: "create a git commit for your unsaved changes",
|
||||
},
|
||||
push: {
|
||||
boolean: true,
|
||||
default: true,
|
||||
describe: "push updates to your Quartz fork",
|
||||
},
|
||||
pull: {
|
||||
boolean: true,
|
||||
default: true,
|
||||
describe: "pull updates from your Quartz fork",
|
||||
},
|
||||
}
|
||||
|
||||
export const BuildArgv = {
|
||||
...CommonArgv,
|
||||
output: {
|
||||
string: true,
|
||||
alias: ["o"],
|
||||
default: "public",
|
||||
describe: "output folder for files",
|
||||
},
|
||||
serve: {
|
||||
boolean: true,
|
||||
default: false,
|
||||
describe: "run a local server to live-preview your Quartz",
|
||||
},
|
||||
baseDir: {
|
||||
string: true,
|
||||
default: "",
|
||||
describe: "base path to serve your local server on",
|
||||
},
|
||||
port: {
|
||||
number: true,
|
||||
default: 8080,
|
||||
describe: "port to serve Quartz on",
|
||||
},
|
||||
wsPort: {
|
||||
number: true,
|
||||
default: 3001,
|
||||
describe: "port to use for WebSocket-based hot-reload notifications",
|
||||
},
|
||||
remoteDevHost: {
|
||||
string: true,
|
||||
default: "",
|
||||
describe: "A URL override for the websocket connection if you are not developing on localhost",
|
||||
},
|
||||
bundleInfo: {
|
||||
boolean: true,
|
||||
default: false,
|
||||
describe: "show detailed bundle information",
|
||||
},
|
||||
concurrency: {
|
||||
number: true,
|
||||
describe: "how many threads to use to parse notes",
|
||||
},
|
||||
}
|
||||
15
quartz/cli/constants.js
Normal file
15
quartz/cli/constants.js
Normal file
@@ -0,0 +1,15 @@
|
||||
import path from "path"
|
||||
import { readFileSync } from "fs"
|
||||
|
||||
/**
|
||||
* All constants relating to helpers or handlers
|
||||
*/
|
||||
export const ORIGIN_NAME = "origin"
|
||||
export const UPSTREAM_NAME = "upstream"
|
||||
export const QUARTZ_SOURCE_BRANCH = "v4"
|
||||
export const cwd = process.cwd()
|
||||
export const cacheDir = path.join(cwd, ".quartz-cache")
|
||||
export const cacheFile = "./quartz/.quartz-cache/transpiled-build.mjs"
|
||||
export const fp = "./quartz/build.ts"
|
||||
export const { version } = JSON.parse(readFileSync("./package.json").toString())
|
||||
export const contentCacheFolder = path.join(cacheDir, "content-cache")
|
||||
511
quartz/cli/handlers.js
Normal file
511
quartz/cli/handlers.js
Normal file
@@ -0,0 +1,511 @@
|
||||
import { promises, readFileSync } from "fs"
|
||||
import path from "path"
|
||||
import esbuild from "esbuild"
|
||||
import chalk from "chalk"
|
||||
import { sassPlugin } from "esbuild-sass-plugin"
|
||||
import fs from "fs"
|
||||
import { intro, outro, select, text } from "@clack/prompts"
|
||||
import { rimraf } from "rimraf"
|
||||
import chokidar from "chokidar"
|
||||
import prettyBytes from "pretty-bytes"
|
||||
import { execSync, spawnSync } from "child_process"
|
||||
import http from "http"
|
||||
import serveHandler from "serve-handler"
|
||||
import { WebSocketServer } from "ws"
|
||||
import { randomUUID } from "crypto"
|
||||
import { Mutex } from "async-mutex"
|
||||
import { CreateArgv } from "./args.js"
|
||||
import {
|
||||
exitIfCancel,
|
||||
escapePath,
|
||||
gitPull,
|
||||
popContentFolder,
|
||||
stashContentFolder,
|
||||
} from "./helpers.js"
|
||||
import {
|
||||
UPSTREAM_NAME,
|
||||
QUARTZ_SOURCE_BRANCH,
|
||||
ORIGIN_NAME,
|
||||
version,
|
||||
fp,
|
||||
cacheFile,
|
||||
cwd,
|
||||
} from "./constants.js"
|
||||
|
||||
/**
|
||||
* Handles `npx quartz create`
|
||||
* @param {*} argv arguments for `create`
|
||||
*/
|
||||
export async function handleCreate(argv) {
|
||||
console.log()
|
||||
intro(chalk.bgGreen.black(` Quartz v${version} `))
|
||||
const contentFolder = path.join(cwd, argv.directory)
|
||||
let setupStrategy = argv.strategy?.toLowerCase()
|
||||
let linkResolutionStrategy = argv.links?.toLowerCase()
|
||||
const sourceDirectory = argv.source
|
||||
|
||||
// If all cmd arguments were provided, check if theyre valid
|
||||
if (setupStrategy && linkResolutionStrategy) {
|
||||
// If setup isn't, "new", source argument is required
|
||||
if (setupStrategy !== "new") {
|
||||
// Error handling
|
||||
if (!sourceDirectory) {
|
||||
outro(
|
||||
chalk.red(
|
||||
`Setup strategies (arg '${chalk.yellow(
|
||||
`-${CreateArgv.strategy.alias[0]}`,
|
||||
)}') other than '${chalk.yellow(
|
||||
"new",
|
||||
)}' require content folder argument ('${chalk.yellow(
|
||||
`-${CreateArgv.source.alias[0]}`,
|
||||
)}') to be set`,
|
||||
),
|
||||
)
|
||||
process.exit(1)
|
||||
} else {
|
||||
if (!fs.existsSync(sourceDirectory)) {
|
||||
outro(
|
||||
chalk.red(
|
||||
`Input directory to copy/symlink 'content' from not found ('${chalk.yellow(
|
||||
sourceDirectory,
|
||||
)}', invalid argument "${chalk.yellow(`-${CreateArgv.source.alias[0]}`)})`,
|
||||
),
|
||||
)
|
||||
process.exit(1)
|
||||
} else if (!fs.lstatSync(sourceDirectory).isDirectory()) {
|
||||
outro(
|
||||
chalk.red(
|
||||
`Source directory to copy/symlink 'content' from is not a directory (found file at '${chalk.yellow(
|
||||
sourceDirectory,
|
||||
)}', invalid argument ${chalk.yellow(`-${CreateArgv.source.alias[0]}`)}")`,
|
||||
),
|
||||
)
|
||||
process.exit(1)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Use cli process if cmd args werent provided
|
||||
if (!setupStrategy) {
|
||||
setupStrategy = exitIfCancel(
|
||||
await select({
|
||||
message: `Choose how to initialize the content in \`${contentFolder}\``,
|
||||
options: [
|
||||
{ value: "new", label: "Empty Quartz" },
|
||||
{ value: "copy", label: "Copy an existing folder", hint: "overwrites `content`" },
|
||||
{
|
||||
value: "symlink",
|
||||
label: "Symlink an existing folder",
|
||||
hint: "don't select this unless you know what you are doing!",
|
||||
},
|
||||
],
|
||||
}),
|
||||
)
|
||||
}
|
||||
|
||||
async function rmContentFolder() {
|
||||
const contentStat = await fs.promises.lstat(contentFolder)
|
||||
if (contentStat.isSymbolicLink()) {
|
||||
await fs.promises.unlink(contentFolder)
|
||||
} else {
|
||||
await rimraf(contentFolder)
|
||||
}
|
||||
}
|
||||
|
||||
await fs.promises.unlink(path.join(contentFolder, ".gitkeep"))
|
||||
if (setupStrategy === "copy" || setupStrategy === "symlink") {
|
||||
let originalFolder = sourceDirectory
|
||||
|
||||
// If input directory was not passed, use cli
|
||||
if (!sourceDirectory) {
|
||||
originalFolder = escapePath(
|
||||
exitIfCancel(
|
||||
await text({
|
||||
message: "Enter the full path to existing content folder",
|
||||
placeholder:
|
||||
"On most terminal emulators, you can drag and drop a folder into the window and it will paste the full path",
|
||||
validate(fp) {
|
||||
const fullPath = escapePath(fp)
|
||||
if (!fs.existsSync(fullPath)) {
|
||||
return "The given path doesn't exist"
|
||||
} else if (!fs.lstatSync(fullPath).isDirectory()) {
|
||||
return "The given path is not a folder"
|
||||
}
|
||||
},
|
||||
}),
|
||||
),
|
||||
)
|
||||
}
|
||||
|
||||
await rmContentFolder()
|
||||
if (setupStrategy === "copy") {
|
||||
await fs.promises.cp(originalFolder, contentFolder, {
|
||||
recursive: true,
|
||||
preserveTimestamps: true,
|
||||
})
|
||||
} else if (setupStrategy === "symlink") {
|
||||
await fs.promises.symlink(originalFolder, contentFolder, "dir")
|
||||
}
|
||||
} else if (setupStrategy === "new") {
|
||||
await fs.promises.writeFile(
|
||||
path.join(contentFolder, "index.md"),
|
||||
`---
|
||||
title: Welcome to Quartz
|
||||
---
|
||||
|
||||
This is a blank Quartz installation.
|
||||
See the [documentation](https://quartz.jzhao.xyz) for how to get started.
|
||||
`,
|
||||
)
|
||||
}
|
||||
|
||||
// Use cli process if cmd args werent provided
|
||||
if (!linkResolutionStrategy) {
|
||||
// get a preferred link resolution strategy
|
||||
linkResolutionStrategy = exitIfCancel(
|
||||
await select({
|
||||
message: `Choose how Quartz should resolve links in your content. You can change this later in \`quartz.config.ts\`.`,
|
||||
options: [
|
||||
{
|
||||
value: "absolute",
|
||||
label: "Treat links as absolute path",
|
||||
hint: "for content made for Quartz 3 and Hugo",
|
||||
},
|
||||
{
|
||||
value: "shortest",
|
||||
label: "Treat links as shortest path",
|
||||
hint: "for most Obsidian vaults",
|
||||
},
|
||||
{
|
||||
value: "relative",
|
||||
label: "Treat links as relative paths",
|
||||
hint: "for just normal Markdown files",
|
||||
},
|
||||
],
|
||||
}),
|
||||
)
|
||||
}
|
||||
|
||||
// now, do config changes
|
||||
const configFilePath = path.join(cwd, "quartz.config.ts")
|
||||
let configContent = await fs.promises.readFile(configFilePath, { encoding: "utf-8" })
|
||||
configContent = configContent.replace(
|
||||
/markdownLinkResolution: '(.+)'/,
|
||||
`markdownLinkResolution: '${linkResolutionStrategy}'`,
|
||||
)
|
||||
await fs.promises.writeFile(configFilePath, configContent)
|
||||
|
||||
outro(`You're all set! Not sure what to do next? Try:
|
||||
• Customizing Quartz a bit more by editing \`quartz.config.ts\`
|
||||
• Running \`npx quartz build --serve\` to preview your Quartz locally
|
||||
• Hosting your Quartz online (see: https://quartz.jzhao.xyz/hosting)
|
||||
`)
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles `npx quartz build`
|
||||
* @param {*} argv arguments for `build`
|
||||
*/
|
||||
export async function handleBuild(argv) {
|
||||
console.log(chalk.bgGreen.black(`\n Quartz v${version} \n`))
|
||||
const ctx = await esbuild.context({
|
||||
entryPoints: [fp],
|
||||
outfile: cacheFile,
|
||||
bundle: true,
|
||||
keepNames: true,
|
||||
minifyWhitespace: true,
|
||||
minifySyntax: true,
|
||||
platform: "node",
|
||||
format: "esm",
|
||||
jsx: "automatic",
|
||||
jsxImportSource: "preact",
|
||||
packages: "external",
|
||||
metafile: true,
|
||||
sourcemap: true,
|
||||
sourcesContent: false,
|
||||
plugins: [
|
||||
sassPlugin({
|
||||
type: "css-text",
|
||||
cssImports: true,
|
||||
}),
|
||||
{
|
||||
name: "inline-script-loader",
|
||||
setup(build) {
|
||||
build.onLoad({ filter: /\.inline\.(ts|js)$/ }, async (args) => {
|
||||
let text = await promises.readFile(args.path, "utf8")
|
||||
|
||||
// remove default exports that we manually inserted
|
||||
text = text.replace("export default", "")
|
||||
text = text.replace("export", "")
|
||||
|
||||
const sourcefile = path.relative(path.resolve("."), args.path)
|
||||
const resolveDir = path.dirname(sourcefile)
|
||||
const transpiled = await esbuild.build({
|
||||
stdin: {
|
||||
contents: text,
|
||||
loader: "ts",
|
||||
resolveDir,
|
||||
sourcefile,
|
||||
},
|
||||
write: false,
|
||||
bundle: true,
|
||||
platform: "browser",
|
||||
format: "esm",
|
||||
})
|
||||
const rawMod = transpiled.outputFiles[0].text
|
||||
return {
|
||||
contents: rawMod,
|
||||
loader: "text",
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
],
|
||||
})
|
||||
|
||||
const buildMutex = new Mutex()
|
||||
let lastBuildMs = 0
|
||||
let cleanupBuild = null
|
||||
const build = async (clientRefresh) => {
|
||||
const buildStart = new Date().getTime()
|
||||
lastBuildMs = buildStart
|
||||
const release = await buildMutex.acquire()
|
||||
if (lastBuildMs > buildStart) {
|
||||
release()
|
||||
return
|
||||
}
|
||||
|
||||
if (cleanupBuild) {
|
||||
await cleanupBuild()
|
||||
console.log(chalk.yellow("Detected a source code change, doing a hard rebuild..."))
|
||||
}
|
||||
|
||||
const result = await ctx.rebuild().catch((err) => {
|
||||
console.error(`${chalk.red("Couldn't parse Quartz configuration:")} ${fp}`)
|
||||
console.log(`Reason: ${chalk.grey(err)}`)
|
||||
process.exit(1)
|
||||
})
|
||||
release()
|
||||
|
||||
if (argv.bundleInfo) {
|
||||
const outputFileName = "quartz/.quartz-cache/transpiled-build.mjs"
|
||||
const meta = result.metafile.outputs[outputFileName]
|
||||
console.log(
|
||||
`Successfully transpiled ${Object.keys(meta.inputs).length} files (${prettyBytes(
|
||||
meta.bytes,
|
||||
)})`,
|
||||
)
|
||||
console.log(await esbuild.analyzeMetafile(result.metafile, { color: true }))
|
||||
}
|
||||
|
||||
// bypass module cache
|
||||
// https://github.com/nodejs/modules/issues/307
|
||||
const { default: buildQuartz } = await import(`../../${cacheFile}?update=${randomUUID()}`)
|
||||
// ^ this import is relative, so base "cacheFile" path can't be used
|
||||
|
||||
cleanupBuild = await buildQuartz(argv, buildMutex, clientRefresh)
|
||||
clientRefresh()
|
||||
}
|
||||
|
||||
if (argv.serve) {
|
||||
const connections = []
|
||||
const clientRefresh = () => connections.forEach((conn) => conn.send("rebuild"))
|
||||
|
||||
if (argv.baseDir !== "" && !argv.baseDir.startsWith("/")) {
|
||||
argv.baseDir = "/" + argv.baseDir
|
||||
}
|
||||
|
||||
await build(clientRefresh)
|
||||
const server = http.createServer(async (req, res) => {
|
||||
if (argv.baseDir && !req.url?.startsWith(argv.baseDir)) {
|
||||
console.log(
|
||||
chalk.red(
|
||||
`[404] ${req.url} (warning: link outside of site, this is likely a Quartz bug)`,
|
||||
),
|
||||
)
|
||||
res.writeHead(404)
|
||||
res.end()
|
||||
return
|
||||
}
|
||||
|
||||
// strip baseDir prefix
|
||||
req.url = req.url?.slice(argv.baseDir.length)
|
||||
|
||||
const serve = async () => {
|
||||
const release = await buildMutex.acquire()
|
||||
await serveHandler(req, res, {
|
||||
public: argv.output,
|
||||
directoryListing: false,
|
||||
headers: [
|
||||
{
|
||||
source: "**/*.html",
|
||||
headers: [{ key: "Content-Disposition", value: "inline" }],
|
||||
},
|
||||
],
|
||||
})
|
||||
const status = res.statusCode
|
||||
const statusString =
|
||||
status >= 200 && status < 300 ? chalk.green(`[${status}]`) : chalk.red(`[${status}]`)
|
||||
console.log(statusString + chalk.grey(` ${argv.baseDir}${req.url}`))
|
||||
release()
|
||||
}
|
||||
|
||||
const redirect = (newFp) => {
|
||||
newFp = argv.baseDir + newFp
|
||||
res.writeHead(302, {
|
||||
Location: newFp,
|
||||
})
|
||||
console.log(chalk.yellow("[302]") + chalk.grey(` ${argv.baseDir}${req.url} -> ${newFp}`))
|
||||
res.end()
|
||||
}
|
||||
|
||||
let fp = req.url?.split("?")[0] ?? "/"
|
||||
|
||||
// handle redirects
|
||||
if (fp.endsWith("/")) {
|
||||
// /trailing/
|
||||
// does /trailing/index.html exist? if so, serve it
|
||||
const indexFp = path.posix.join(fp, "index.html")
|
||||
if (fs.existsSync(path.posix.join(argv.output, indexFp))) {
|
||||
req.url = fp
|
||||
return serve()
|
||||
}
|
||||
|
||||
// does /trailing.html exist? if so, redirect to /trailing
|
||||
let base = fp.slice(0, -1)
|
||||
if (path.extname(base) === "") {
|
||||
base += ".html"
|
||||
}
|
||||
if (fs.existsSync(path.posix.join(argv.output, base))) {
|
||||
return redirect(fp.slice(0, -1))
|
||||
}
|
||||
} else {
|
||||
// /regular
|
||||
// does /regular.html exist? if so, serve it
|
||||
let base = fp
|
||||
if (path.extname(base) === "") {
|
||||
base += ".html"
|
||||
}
|
||||
if (fs.existsSync(path.posix.join(argv.output, base))) {
|
||||
req.url = fp
|
||||
return serve()
|
||||
}
|
||||
|
||||
// does /regular/index.html exist? if so, redirect to /regular/
|
||||
let indexFp = path.posix.join(fp, "index.html")
|
||||
if (fs.existsSync(path.posix.join(argv.output, indexFp))) {
|
||||
return redirect(fp + "/")
|
||||
}
|
||||
}
|
||||
|
||||
return serve()
|
||||
})
|
||||
server.listen(argv.port)
|
||||
const wss = new WebSocketServer({ port: argv.wsPort })
|
||||
wss.on("connection", (ws) => connections.push(ws))
|
||||
console.log(
|
||||
chalk.cyan(
|
||||
`Started a Quartz server listening at http://localhost:${argv.port}${argv.baseDir}`,
|
||||
),
|
||||
)
|
||||
console.log("hint: exit with ctrl+c")
|
||||
chokidar
|
||||
.watch(["**/*.ts", "**/*.tsx", "**/*.scss", "package.json"], {
|
||||
ignoreInitial: true,
|
||||
})
|
||||
.on("all", async () => {
|
||||
build(clientRefresh)
|
||||
})
|
||||
} else {
|
||||
await build(() => {})
|
||||
ctx.dispose()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles `npx quartz update`
|
||||
* @param {*} argv arguments for `update`
|
||||
*/
|
||||
export async function handleUpdate(argv) {
|
||||
const contentFolder = path.join(cwd, argv.directory)
|
||||
console.log(chalk.bgGreen.black(`\n Quartz v${version} \n`))
|
||||
console.log("Backing up your content")
|
||||
execSync(
|
||||
`git remote show upstream || git remote add upstream https://github.com/jackyzha0/quartz.git`,
|
||||
)
|
||||
await stashContentFolder(contentFolder)
|
||||
console.log(
|
||||
"Pulling updates... you may need to resolve some `git` conflicts if you've made changes to components or plugins.",
|
||||
)
|
||||
gitPull(UPSTREAM_NAME, QUARTZ_SOURCE_BRANCH)
|
||||
await popContentFolder(contentFolder)
|
||||
console.log("Ensuring dependencies are up to date")
|
||||
spawnSync("npm", ["i"], { stdio: "inherit" })
|
||||
console.log(chalk.green("Done!"))
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles `npx quartz restore`
|
||||
* @param {*} argv arguments for `restore`
|
||||
*/
|
||||
export async function handleRestore(argv) {
|
||||
const contentFolder = path.join(cwd, argv.directory)
|
||||
await popContentFolder(contentFolder)
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles `npx quartz sync`
|
||||
* @param {*} argv arguments for `sync`
|
||||
*/
|
||||
export async function handleSync(argv) {
|
||||
const contentFolder = path.join(cwd, argv.directory)
|
||||
console.log(chalk.bgGreen.black(`\n Quartz v${version} \n`))
|
||||
console.log("Backing up your content")
|
||||
|
||||
if (argv.commit) {
|
||||
const contentStat = await fs.promises.lstat(contentFolder)
|
||||
if (contentStat.isSymbolicLink()) {
|
||||
const linkTarg = await fs.promises.readlink(contentFolder)
|
||||
console.log(chalk.yellow("Detected symlink, trying to dereference before committing"))
|
||||
|
||||
// stash symlink file
|
||||
await stashContentFolder(contentFolder)
|
||||
|
||||
// follow symlink and copy content
|
||||
await fs.promises.cp(linkTarg, contentFolder, {
|
||||
recursive: true,
|
||||
preserveTimestamps: true,
|
||||
})
|
||||
}
|
||||
|
||||
const currentTimestamp = new Date().toLocaleString("en-US", {
|
||||
dateStyle: "medium",
|
||||
timeStyle: "short",
|
||||
})
|
||||
spawnSync("git", ["add", "."], { stdio: "inherit" })
|
||||
spawnSync("git", ["commit", "-m", `Quartz sync: ${currentTimestamp}`], { stdio: "inherit" })
|
||||
|
||||
if (contentStat.isSymbolicLink()) {
|
||||
// put symlink back
|
||||
await popContentFolder(contentFolder)
|
||||
}
|
||||
}
|
||||
|
||||
await stashContentFolder(contentFolder)
|
||||
|
||||
if (argv.pull) {
|
||||
console.log(
|
||||
"Pulling updates from your repository. You may need to resolve some `git` conflicts if you've made changes to components or plugins.",
|
||||
)
|
||||
gitPull(ORIGIN_NAME, QUARTZ_SOURCE_BRANCH)
|
||||
}
|
||||
|
||||
await popContentFolder(contentFolder)
|
||||
if (argv.push) {
|
||||
console.log("Pushing your changes")
|
||||
spawnSync("git", ["push", "-f", ORIGIN_NAME, QUARTZ_SOURCE_BRANCH], { stdio: "inherit" })
|
||||
}
|
||||
|
||||
console.log(chalk.green("Done!"))
|
||||
}
|
||||
52
quartz/cli/helpers.js
Normal file
52
quartz/cli/helpers.js
Normal file
@@ -0,0 +1,52 @@
|
||||
import { isCancel, outro } from "@clack/prompts"
|
||||
import chalk from "chalk"
|
||||
import { contentCacheFolder } from "./constants.js"
|
||||
import { spawnSync } from "child_process"
|
||||
import fs from "fs"
|
||||
|
||||
export function escapePath(fp) {
|
||||
return fp
|
||||
.replace(/\\ /g, " ") // unescape spaces
|
||||
.replace(/^".*"$/, "$1")
|
||||
.replace(/^'.*"$/, "$1")
|
||||
.trim()
|
||||
}
|
||||
|
||||
export function exitIfCancel(val) {
|
||||
if (isCancel(val)) {
|
||||
outro(chalk.red("Exiting"))
|
||||
process.exit(0)
|
||||
} else {
|
||||
return val
|
||||
}
|
||||
}
|
||||
|
||||
export async function stashContentFolder(contentFolder) {
|
||||
await fs.promises.rm(contentCacheFolder, { force: true, recursive: true })
|
||||
await fs.promises.cp(contentFolder, contentCacheFolder, {
|
||||
force: true,
|
||||
recursive: true,
|
||||
verbatimSymlinks: true,
|
||||
preserveTimestamps: true,
|
||||
})
|
||||
await fs.promises.rm(contentFolder, { force: true, recursive: true })
|
||||
}
|
||||
|
||||
export function gitPull(origin, branch) {
|
||||
const flags = ["--no-rebase", "--autostash", "-s", "recursive", "-X", "ours", "--no-edit"]
|
||||
const out = spawnSync("git", ["pull", ...flags, origin, branch], { stdio: "inherit" })
|
||||
if (out.stderr) {
|
||||
throw new Error(`Error while pulling updates: ${out.stderr}`)
|
||||
}
|
||||
}
|
||||
|
||||
export async function popContentFolder(contentFolder) {
|
||||
await fs.promises.rm(contentFolder, { force: true, recursive: true })
|
||||
await fs.promises.cp(contentCacheFolder, contentFolder, {
|
||||
force: true,
|
||||
recursive: true,
|
||||
verbatimSymlinks: true,
|
||||
preserveTimestamps: true,
|
||||
})
|
||||
await fs.promises.rm(contentCacheFolder, { force: true, recursive: true })
|
||||
}
|
||||
@@ -1,15 +1,16 @@
|
||||
import { formatDate } from "./Date"
|
||||
import { formatDate, getDate } from "./Date"
|
||||
import { QuartzComponentConstructor, QuartzComponentProps } from "./types"
|
||||
import readingTime from "reading-time"
|
||||
|
||||
export default (() => {
|
||||
function ContentMetadata({ fileData }: QuartzComponentProps) {
|
||||
function ContentMetadata({ cfg, fileData }: QuartzComponentProps) {
|
||||
const text = fileData.text
|
||||
if (text) {
|
||||
const segments: string[] = []
|
||||
const { text: timeTaken, words: _words } = readingTime(text)
|
||||
if (fileData.dates?.modified) {
|
||||
segments.push(formatDate(fileData.dates.modified))
|
||||
|
||||
if (fileData.dates) {
|
||||
segments.push(formatDate(getDate(cfg, fileData)!))
|
||||
}
|
||||
|
||||
segments.push(timeTaken)
|
||||
|
||||
@@ -1,7 +1,21 @@
|
||||
import { GlobalConfiguration } from "../cfg"
|
||||
import { QuartzPluginData } from "../plugins/vfile"
|
||||
|
||||
interface Props {
|
||||
date: Date
|
||||
}
|
||||
|
||||
export type ValidDateType = keyof Required<QuartzPluginData>["dates"]
|
||||
|
||||
export function getDate(cfg: GlobalConfiguration, data: QuartzPluginData): Date | undefined {
|
||||
if (!cfg.defaultDateType) {
|
||||
throw new Error(
|
||||
`Field 'defaultDateType' was not set in the configuration object of quartz.config.ts. See https://quartz.jzhao.xyz/configuration#general-configuration for more details.`,
|
||||
)
|
||||
}
|
||||
return data.dates?.[cfg.defaultDateType]
|
||||
}
|
||||
|
||||
export function formatDate(d: Date): string {
|
||||
return d.toLocaleDateString("en-US", {
|
||||
year: "numeric",
|
||||
|
||||
121
quartz/components/Explorer.tsx
Normal file
121
quartz/components/Explorer.tsx
Normal file
@@ -0,0 +1,121 @@
|
||||
import { QuartzComponentConstructor, QuartzComponentProps } from "./types"
|
||||
import explorerStyle from "./styles/explorer.scss"
|
||||
|
||||
// @ts-ignore
|
||||
import script from "./scripts/explorer.inline"
|
||||
import { ExplorerNode, FileNode, Options } from "./ExplorerNode"
|
||||
import { QuartzPluginData } from "../plugins/vfile"
|
||||
|
||||
// Options interface defined in `ExplorerNode` to avoid circular dependency
|
||||
const defaultOptions = {
|
||||
title: "Explorer",
|
||||
folderClickBehavior: "collapse",
|
||||
folderDefaultState: "collapsed",
|
||||
useSavedState: true,
|
||||
sortFn: (a, b) => {
|
||||
// Sort order: folders first, then files. Sort folders and files alphabetically
|
||||
if ((!a.file && !b.file) || (a.file && b.file)) {
|
||||
return a.displayName.localeCompare(b.displayName)
|
||||
}
|
||||
if (a.file && !b.file) {
|
||||
return 1
|
||||
} else {
|
||||
return -1
|
||||
}
|
||||
},
|
||||
filterFn: (node) => node.name !== "tags",
|
||||
order: ["filter", "map", "sort"],
|
||||
} satisfies Options
|
||||
|
||||
export default ((userOpts?: Partial<Options>) => {
|
||||
// Parse config
|
||||
const opts: Options = { ...defaultOptions, ...userOpts }
|
||||
|
||||
// memoized
|
||||
let fileTree: FileNode
|
||||
let jsonTree: string
|
||||
|
||||
function constructFileTree(allFiles: QuartzPluginData[]) {
|
||||
if (!fileTree) {
|
||||
// Construct tree from allFiles
|
||||
fileTree = new FileNode("")
|
||||
allFiles.forEach((file) => fileTree.add(file, 1))
|
||||
|
||||
/**
|
||||
* Keys of this object must match corresponding function name of `FileNode`,
|
||||
* while values must be the argument that will be passed to the function.
|
||||
*
|
||||
* e.g. entry for FileNode.sort: `sort: opts.sortFn` (value is sort function from options)
|
||||
*/
|
||||
const functions = {
|
||||
map: opts.mapFn,
|
||||
sort: opts.sortFn,
|
||||
filter: opts.filterFn,
|
||||
}
|
||||
|
||||
// Execute all functions (sort, filter, map) that were provided (if none were provided, only default "sort" is applied)
|
||||
if (opts.order) {
|
||||
// Order is important, use loop with index instead of order.map()
|
||||
for (let i = 0; i < opts.order.length; i++) {
|
||||
const functionName = opts.order[i]
|
||||
if (functions[functionName]) {
|
||||
// for every entry in order, call matching function in FileNode and pass matching argument
|
||||
// e.g. i = 0; functionName = "filter"
|
||||
// converted to: (if opts.filterFn) => fileTree.filter(opts.filterFn)
|
||||
|
||||
// @ts-ignore
|
||||
// typescript cant statically check these dynamic references, so manually make sure reference is valid and ignore warning
|
||||
fileTree[functionName].call(fileTree, functions[functionName])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Get all folders of tree. Initialize with collapsed state
|
||||
const folders = fileTree.getFolderPaths(opts.folderDefaultState === "collapsed")
|
||||
|
||||
// Stringify to pass json tree as data attribute ([data-tree])
|
||||
jsonTree = JSON.stringify(folders)
|
||||
}
|
||||
}
|
||||
|
||||
function Explorer({ allFiles, displayClass, fileData }: QuartzComponentProps) {
|
||||
constructFileTree(allFiles)
|
||||
return (
|
||||
<div class={`explorer ${displayClass}`}>
|
||||
<button
|
||||
type="button"
|
||||
id="explorer"
|
||||
data-behavior={opts.folderClickBehavior}
|
||||
data-collapsed={opts.folderDefaultState}
|
||||
data-savestate={opts.useSavedState}
|
||||
data-tree={jsonTree}
|
||||
>
|
||||
<h1>{opts.title}</h1>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="14"
|
||||
height="14"
|
||||
viewBox="5 8 14 8"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
class="fold"
|
||||
>
|
||||
<polyline points="6 9 12 15 18 9"></polyline>
|
||||
</svg>
|
||||
</button>
|
||||
<div id="explorer-content">
|
||||
<ul class="overflow" id="explorer-ul">
|
||||
<ExplorerNode node={fileTree} opts={opts} fileData={fileData} />
|
||||
<li id="explorer-end" />
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Explorer.css = explorerStyle
|
||||
Explorer.afterDOMLoaded = script
|
||||
return Explorer
|
||||
}) satisfies QuartzComponentConstructor
|
||||
224
quartz/components/ExplorerNode.tsx
Normal file
224
quartz/components/ExplorerNode.tsx
Normal file
@@ -0,0 +1,224 @@
|
||||
// @ts-ignore
|
||||
import { QuartzPluginData } from "../plugins/vfile"
|
||||
import { resolveRelative } from "../util/path"
|
||||
|
||||
type OrderEntries = "sort" | "filter" | "map"
|
||||
|
||||
export interface Options {
|
||||
title: string
|
||||
folderDefaultState: "collapsed" | "open"
|
||||
folderClickBehavior: "collapse" | "link"
|
||||
useSavedState: boolean
|
||||
sortFn: (a: FileNode, b: FileNode) => number
|
||||
filterFn?: (node: FileNode) => boolean
|
||||
mapFn?: (node: FileNode) => void
|
||||
order?: OrderEntries[]
|
||||
}
|
||||
|
||||
type DataWrapper = {
|
||||
file: QuartzPluginData
|
||||
path: string[]
|
||||
}
|
||||
|
||||
export type FolderState = {
|
||||
path: string
|
||||
collapsed: boolean
|
||||
}
|
||||
|
||||
// Structure to add all files into a tree
|
||||
export class FileNode {
|
||||
children: FileNode[]
|
||||
name: string
|
||||
displayName: string
|
||||
file: QuartzPluginData | null
|
||||
depth: number
|
||||
|
||||
constructor(name: string, file?: QuartzPluginData, depth?: number) {
|
||||
this.children = []
|
||||
this.name = name
|
||||
this.displayName = name
|
||||
this.file = file ? structuredClone(file) : null
|
||||
this.depth = depth ?? 0
|
||||
}
|
||||
|
||||
private insert(file: DataWrapper) {
|
||||
if (file.path.length === 1) {
|
||||
if (file.path[0] !== "index.md") {
|
||||
this.children.push(new FileNode(file.file.frontmatter!.title, file.file, this.depth + 1))
|
||||
} else {
|
||||
const title = file.file.frontmatter?.title
|
||||
if (title && title !== "index" && file.path[0] === "index.md") {
|
||||
this.displayName = title
|
||||
}
|
||||
}
|
||||
} else {
|
||||
const next = file.path[0]
|
||||
file.path = file.path.splice(1)
|
||||
for (const child of this.children) {
|
||||
if (child.name === next) {
|
||||
child.insert(file)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
const newChild = new FileNode(next, undefined, this.depth + 1)
|
||||
newChild.insert(file)
|
||||
this.children.push(newChild)
|
||||
}
|
||||
}
|
||||
|
||||
// Add new file to tree
|
||||
add(file: QuartzPluginData, splice: number = 0) {
|
||||
this.insert({ file, path: file.filePath!.split("/").splice(splice) })
|
||||
}
|
||||
|
||||
// Print tree structure (for debugging)
|
||||
print(depth: number = 0) {
|
||||
let folderChar = ""
|
||||
if (!this.file) folderChar = "|"
|
||||
console.log("-".repeat(depth), folderChar, this.name, this.depth)
|
||||
this.children.forEach((e) => e.print(depth + 1))
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter FileNode tree. Behaves similar to `Array.prototype.filter()`, but modifies tree in place
|
||||
* @param filterFn function to filter tree with
|
||||
*/
|
||||
filter(filterFn: (node: FileNode) => boolean) {
|
||||
this.children = this.children.filter(filterFn)
|
||||
this.children.forEach((child) => child.filter(filterFn))
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter FileNode tree. Behaves similar to `Array.prototype.map()`, but modifies tree in place
|
||||
* @param mapFn function to use for mapping over tree
|
||||
*/
|
||||
map(mapFn: (node: FileNode) => void) {
|
||||
mapFn(this)
|
||||
|
||||
this.children.forEach((child) => child.map(mapFn))
|
||||
}
|
||||
|
||||
/**
|
||||
* Get folder representation with state of tree.
|
||||
* Intended to only be called on root node before changes to the tree are made
|
||||
* @param collapsed default state of folders (collapsed by default or not)
|
||||
* @returns array containing folder state for tree
|
||||
*/
|
||||
getFolderPaths(collapsed: boolean): FolderState[] {
|
||||
const folderPaths: FolderState[] = []
|
||||
|
||||
const traverse = (node: FileNode, currentPath: string) => {
|
||||
if (!node.file) {
|
||||
const folderPath = currentPath + (currentPath ? "/" : "") + node.name
|
||||
if (folderPath !== "") {
|
||||
folderPaths.push({ path: folderPath, collapsed })
|
||||
}
|
||||
node.children.forEach((child) => traverse(child, folderPath))
|
||||
}
|
||||
}
|
||||
|
||||
traverse(this, "")
|
||||
|
||||
return folderPaths
|
||||
}
|
||||
|
||||
// Sort order: folders first, then files. Sort folders and files alphabetically
|
||||
/**
|
||||
* Sorts tree according to sort/compare function
|
||||
* @param sortFn compare function used for `.sort()`, also used recursively for children
|
||||
*/
|
||||
sort(sortFn: (a: FileNode, b: FileNode) => number) {
|
||||
this.children = this.children.sort(sortFn)
|
||||
this.children.forEach((e) => e.sort(sortFn))
|
||||
}
|
||||
}
|
||||
|
||||
type ExplorerNodeProps = {
|
||||
node: FileNode
|
||||
opts: Options
|
||||
fileData: QuartzPluginData
|
||||
fullPath?: string
|
||||
}
|
||||
|
||||
export function ExplorerNode({ node, opts, fullPath, fileData }: ExplorerNodeProps) {
|
||||
// Get options
|
||||
const folderBehavior = opts.folderClickBehavior
|
||||
const isDefaultOpen = opts.folderDefaultState === "open"
|
||||
|
||||
// Calculate current folderPath
|
||||
let pathOld = fullPath ? fullPath : ""
|
||||
let folderPath = ""
|
||||
if (node.name !== "") {
|
||||
folderPath = `${pathOld}/${node.name}`
|
||||
}
|
||||
|
||||
return (
|
||||
<li>
|
||||
{node.file ? (
|
||||
// Single file node
|
||||
<li key={node.file.slug}>
|
||||
<a href={resolveRelative(fileData.slug!, node.file.slug!)} data-for={node.file.slug}>
|
||||
{node.displayName}
|
||||
</a>
|
||||
</li>
|
||||
) : (
|
||||
<div>
|
||||
{node.name !== "" && (
|
||||
// Node with entire folder
|
||||
// Render svg button + folder name, then children
|
||||
<div class="folder-container">
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="12"
|
||||
height="12"
|
||||
viewBox="5 8 14 8"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
class="folder-icon"
|
||||
>
|
||||
<polyline points="6 9 12 15 18 9"></polyline>
|
||||
</svg>
|
||||
{/* render <a> tag if folderBehavior is "link", otherwise render <button> with collapse click event */}
|
||||
<div key={node.name} data-folderpath={folderPath}>
|
||||
{folderBehavior === "link" ? (
|
||||
<a href={`${folderPath}`} data-for={node.name} class="folder-title">
|
||||
{node.displayName}
|
||||
</a>
|
||||
) : (
|
||||
<button class="folder-button">
|
||||
<p class="folder-title">{node.displayName}</p>
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
{/* Recursively render children of folder */}
|
||||
<div class={`folder-outer ${node.depth === 0 || isDefaultOpen ? "open" : ""}`}>
|
||||
<ul
|
||||
// Inline style for left folder paddings
|
||||
style={{
|
||||
paddingLeft: node.name !== "" ? "1.4rem" : "0",
|
||||
}}
|
||||
class="content"
|
||||
data-folderul={folderPath}
|
||||
>
|
||||
{node.children.map((childNode, i) => (
|
||||
<ExplorerNode
|
||||
node={childNode}
|
||||
key={i}
|
||||
opts={opts}
|
||||
fullPath={folderPath}
|
||||
fileData={fileData}
|
||||
/>
|
||||
))}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</li>
|
||||
)
|
||||
}
|
||||
@@ -13,6 +13,8 @@ export interface D3Config {
|
||||
linkDistance: number
|
||||
fontSize: number
|
||||
opacityScale: number
|
||||
removeTags: string[]
|
||||
showTags: boolean
|
||||
}
|
||||
|
||||
interface GraphOptions {
|
||||
@@ -31,6 +33,8 @@ const defaultOptions: GraphOptions = {
|
||||
linkDistance: 30,
|
||||
fontSize: 0.6,
|
||||
opacityScale: 1,
|
||||
showTags: true,
|
||||
removeTags: [],
|
||||
},
|
||||
globalGraph: {
|
||||
drag: true,
|
||||
@@ -42,6 +46,8 @@ const defaultOptions: GraphOptions = {
|
||||
linkDistance: 30,
|
||||
fontSize: 0.6,
|
||||
opacityScale: 1,
|
||||
showTags: true,
|
||||
removeTags: [],
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { joinSegments, pathToRoot } from "../util/path"
|
||||
import { FullSlug, _stripSlashes, joinSegments, pathToRoot } from "../util/path"
|
||||
import { JSResourceToScriptElement } from "../util/resources"
|
||||
import { QuartzComponentConstructor, QuartzComponentProps } from "./types"
|
||||
|
||||
@@ -7,7 +7,11 @@ export default (() => {
|
||||
const title = fileData.frontmatter?.title ?? "Untitled"
|
||||
const description = fileData.description?.trim() ?? "No description provided"
|
||||
const { css, js } = externalResources
|
||||
const baseDir = pathToRoot(fileData.slug!)
|
||||
|
||||
const url = new URL(`https://${cfg.baseUrl ?? "example.com"}`)
|
||||
const path = url.pathname as FullSlug
|
||||
const baseDir = fileData.slug === "404" ? path : pathToRoot(fileData.slug!)
|
||||
|
||||
const iconPath = joinSegments(baseDir, "static/icon.png")
|
||||
const ogImagePath = `https://${cfg.baseUrl}/static/og-image.png`
|
||||
|
||||
|
||||
@@ -1,31 +1,36 @@
|
||||
import { FullSlug, resolveRelative } from "../util/path"
|
||||
import { QuartzPluginData } from "../plugins/vfile"
|
||||
import { Date } from "./Date"
|
||||
import { Date, getDate } from "./Date"
|
||||
import { QuartzComponentProps } from "./types"
|
||||
import { GlobalConfiguration } from "../cfg"
|
||||
|
||||
export function byDateAndAlphabetical(f1: QuartzPluginData, f2: QuartzPluginData): number {
|
||||
if (f1.dates && f2.dates) {
|
||||
// sort descending by last modified
|
||||
return f2.dates.modified.getTime() - f1.dates.modified.getTime()
|
||||
} else if (f1.dates && !f2.dates) {
|
||||
// prioritize files with dates
|
||||
return -1
|
||||
} else if (!f1.dates && f2.dates) {
|
||||
return 1
|
||||
export function byDateAndAlphabetical(
|
||||
cfg: GlobalConfiguration,
|
||||
): (f1: QuartzPluginData, f2: QuartzPluginData) => number {
|
||||
return (f1, f2) => {
|
||||
if (f1.dates && f2.dates) {
|
||||
// sort descending
|
||||
return getDate(cfg, f2)!.getTime() - getDate(cfg, f1)!.getTime()
|
||||
} else if (f1.dates && !f2.dates) {
|
||||
// prioritize files with dates
|
||||
return -1
|
||||
} else if (!f1.dates && f2.dates) {
|
||||
return 1
|
||||
}
|
||||
|
||||
// otherwise, sort lexographically by title
|
||||
const f1Title = f1.frontmatter?.title.toLowerCase() ?? ""
|
||||
const f2Title = f2.frontmatter?.title.toLowerCase() ?? ""
|
||||
return f1Title.localeCompare(f2Title)
|
||||
}
|
||||
|
||||
// otherwise, sort lexographically by title
|
||||
const f1Title = f1.frontmatter?.title.toLowerCase() ?? ""
|
||||
const f2Title = f2.frontmatter?.title.toLowerCase() ?? ""
|
||||
return f1Title.localeCompare(f2Title)
|
||||
}
|
||||
|
||||
type Props = {
|
||||
limit?: number
|
||||
} & QuartzComponentProps
|
||||
|
||||
export function PageList({ fileData, allFiles, limit }: Props) {
|
||||
let list = allFiles.sort(byDateAndAlphabetical)
|
||||
export function PageList({ cfg, fileData, allFiles, limit }: Props) {
|
||||
let list = allFiles.sort(byDateAndAlphabetical(cfg))
|
||||
if (limit) {
|
||||
list = list.slice(0, limit)
|
||||
}
|
||||
@@ -41,7 +46,7 @@ export function PageList({ fileData, allFiles, limit }: Props) {
|
||||
<div class="section">
|
||||
{page.dates && (
|
||||
<p class="meta">
|
||||
<Date date={page.dates.modified} />
|
||||
<Date date={getDate(cfg, page)!} />
|
||||
</p>
|
||||
)}
|
||||
<div class="desc">
|
||||
|
||||
@@ -3,7 +3,8 @@ import { FullSlug, SimpleSlug, resolveRelative } from "../util/path"
|
||||
import { QuartzPluginData } from "../plugins/vfile"
|
||||
import { byDateAndAlphabetical } from "./PageList"
|
||||
import style from "./styles/recentNotes.scss"
|
||||
import { Date } from "./Date"
|
||||
import { Date, getDate } from "./Date"
|
||||
import { GlobalConfiguration } from "../cfg"
|
||||
|
||||
interface Options {
|
||||
title: string
|
||||
@@ -13,18 +14,18 @@ interface Options {
|
||||
sort: (f1: QuartzPluginData, f2: QuartzPluginData) => number
|
||||
}
|
||||
|
||||
const defaultOptions: Options = {
|
||||
const defaultOptions = (cfg: GlobalConfiguration): Options => ({
|
||||
title: "Recent Notes",
|
||||
limit: 3,
|
||||
linkToMore: false,
|
||||
filter: () => true,
|
||||
sort: byDateAndAlphabetical,
|
||||
}
|
||||
sort: byDateAndAlphabetical(cfg),
|
||||
})
|
||||
|
||||
export default ((userOpts?: Partial<Options>) => {
|
||||
const opts = { ...defaultOptions, ...userOpts }
|
||||
function RecentNotes(props: QuartzComponentProps) {
|
||||
const { allFiles, fileData, displayClass } = props
|
||||
const { allFiles, fileData, displayClass, cfg } = props
|
||||
const opts = { ...defaultOptions(cfg), ...userOpts }
|
||||
const pages = allFiles.filter(opts.filter).sort(opts.sort)
|
||||
const remaining = Math.max(0, pages.length - opts.limit)
|
||||
return (
|
||||
@@ -47,7 +48,7 @@ export default ((userOpts?: Partial<Options>) => {
|
||||
</div>
|
||||
{page.dates && (
|
||||
<p class="meta">
|
||||
<Date date={page.dates.modified} />
|
||||
<Date date={getDate(cfg, page)!} />
|
||||
</p>
|
||||
)}
|
||||
<ul class="tags">
|
||||
|
||||
@@ -44,7 +44,8 @@ TagList.css = `
|
||||
a.tag-link {
|
||||
border-radius: 8px;
|
||||
background-color: var(--highlight);
|
||||
padding: 0.2rem 0.5rem;
|
||||
padding: 0.2rem 0.4rem;
|
||||
margin: 0 0.1rem;
|
||||
}
|
||||
`
|
||||
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
import ArticleTitle from "./ArticleTitle"
|
||||
import Content from "./pages/Content"
|
||||
import TagContent from "./pages/TagContent"
|
||||
import FolderContent from "./pages/FolderContent"
|
||||
import NotFound from "./pages/404"
|
||||
import ArticleTitle from "./ArticleTitle"
|
||||
import Darkmode from "./Darkmode"
|
||||
import Head from "./Head"
|
||||
import PageTitle from "./PageTitle"
|
||||
import ContentMeta from "./ContentMeta"
|
||||
import Spacer from "./Spacer"
|
||||
import TableOfContents from "./TableOfContents"
|
||||
import Explorer from "./Explorer"
|
||||
import TagList from "./TagList"
|
||||
import Graph from "./Graph"
|
||||
import Backlinks from "./Backlinks"
|
||||
@@ -28,6 +30,7 @@ export {
|
||||
ContentMeta,
|
||||
Spacer,
|
||||
TableOfContents,
|
||||
Explorer,
|
||||
TagList,
|
||||
Graph,
|
||||
Backlinks,
|
||||
@@ -36,4 +39,5 @@ export {
|
||||
DesktopOnly,
|
||||
MobileOnly,
|
||||
RecentNotes,
|
||||
NotFound,
|
||||
}
|
||||
|
||||
12
quartz/components/pages/404.tsx
Normal file
12
quartz/components/pages/404.tsx
Normal file
@@ -0,0 +1,12 @@
|
||||
import { QuartzComponentConstructor } from "../types"
|
||||
|
||||
function NotFound() {
|
||||
return (
|
||||
<article class="popover-hint">
|
||||
<h1>404</h1>
|
||||
<p>Either this page is private or doesn't exist.</p>
|
||||
</article>
|
||||
)
|
||||
}
|
||||
|
||||
export default (() => NotFound) satisfies QuartzComponentConstructor
|
||||
@@ -7,6 +7,7 @@ import style from "../styles/listPage.scss"
|
||||
import { PageList } from "../PageList"
|
||||
import { _stripSlashes, simplifySlug } from "../../util/path"
|
||||
import { Root } from "hast"
|
||||
import { pluralize } from "../../util/lang"
|
||||
|
||||
function FolderContent(props: QuartzComponentProps) {
|
||||
const { tree, fileData, allFiles } = props
|
||||
@@ -33,8 +34,10 @@ function FolderContent(props: QuartzComponentProps) {
|
||||
|
||||
return (
|
||||
<div class="popover-hint">
|
||||
<article>{content}</article>
|
||||
<p>{allPagesInFolder.length} items under this folder.</p>
|
||||
<article>
|
||||
<p>{content}</p>
|
||||
</article>
|
||||
<p>{pluralize(allPagesInFolder.length, "item")} under this folder.</p>
|
||||
<div>
|
||||
<PageList {...listProps} />
|
||||
</div>
|
||||
|
||||
@@ -6,6 +6,7 @@ import { PageList } from "../PageList"
|
||||
import { FullSlug, getAllSegmentPrefixes, simplifySlug } from "../../util/path"
|
||||
import { QuartzPluginData } from "../../plugins/vfile"
|
||||
import { Root } from "hast"
|
||||
import { pluralize } from "../../util/lang"
|
||||
|
||||
const numPages = 10
|
||||
function TagContent(props: QuartzComponentProps) {
|
||||
@@ -37,7 +38,9 @@ function TagContent(props: QuartzComponentProps) {
|
||||
|
||||
return (
|
||||
<div class="popover-hint">
|
||||
<article>{content}</article>
|
||||
<article>
|
||||
<p>{content}</p>
|
||||
</article>
|
||||
<p>Found {tags.length} total tags.</p>
|
||||
<div>
|
||||
{tags.map((tag) => {
|
||||
@@ -58,7 +61,7 @@ function TagContent(props: QuartzComponentProps) {
|
||||
</h2>
|
||||
{content && <p>{content}</p>}
|
||||
<p>
|
||||
{pages.length} items with this tag.{" "}
|
||||
{pluralize(pages.length, "item")} with this tag.{" "}
|
||||
{pages.length > numPages && `Showing first ${numPages}.`}
|
||||
</p>
|
||||
<PageList limit={numPages} {...listProps} />
|
||||
@@ -78,7 +81,7 @@ function TagContent(props: QuartzComponentProps) {
|
||||
return (
|
||||
<div class="popover-hint">
|
||||
<article>{content}</article>
|
||||
<p>{pages.length} items with this tag.</p>
|
||||
<p>{pluralize(pages.length, "item")} with this tag.</p>
|
||||
<div>
|
||||
<PageList {...listProps} />
|
||||
</div>
|
||||
|
||||
@@ -3,7 +3,9 @@ import { QuartzComponent, QuartzComponentProps } from "./types"
|
||||
import HeaderConstructor from "./Header"
|
||||
import BodyConstructor from "./Body"
|
||||
import { JSResourceToScriptElement, StaticResources } from "../util/resources"
|
||||
import { FullSlug, joinSegments, pathToRoot } from "../util/path"
|
||||
import { FullSlug, RelativeURL, joinSegments } from "../util/path"
|
||||
import { visit } from "unist-util-visit"
|
||||
import { Root, Element } from "hast"
|
||||
|
||||
interface RenderComponents {
|
||||
head: QuartzComponent
|
||||
@@ -15,9 +17,10 @@ interface RenderComponents {
|
||||
footer: QuartzComponent
|
||||
}
|
||||
|
||||
export function pageResources(slug: FullSlug, staticResources: StaticResources): StaticResources {
|
||||
const baseDir = pathToRoot(slug)
|
||||
|
||||
export function pageResources(
|
||||
baseDir: FullSlug | RelativeURL,
|
||||
staticResources: StaticResources,
|
||||
): StaticResources {
|
||||
const contentIndexPath = joinSegments(baseDir, "static/contentIndex.json")
|
||||
const contentIndexScript = `const fetchData = fetch(\`${contentIndexPath}\`).then(data => data.json())`
|
||||
|
||||
@@ -52,6 +55,40 @@ export function renderPage(
|
||||
components: RenderComponents,
|
||||
pageResources: StaticResources,
|
||||
): string {
|
||||
// process transcludes in componentData
|
||||
visit(componentData.tree as Root, "element", (node, _index, _parent) => {
|
||||
if (node.tagName === "blockquote") {
|
||||
const classNames = (node.properties?.className ?? []) as string[]
|
||||
if (classNames.includes("transclude")) {
|
||||
const inner = node.children[0] as Element
|
||||
const blockSlug = inner.properties?.["data-slug"] as FullSlug
|
||||
const blockRef = node.properties!.dataBlock as string
|
||||
|
||||
// TODO: avoid this expensive find operation and construct an index ahead of time
|
||||
let blockNode = componentData.allFiles.find((f) => f.slug === blockSlug)?.blocks?.[blockRef]
|
||||
if (blockNode) {
|
||||
if (blockNode.tagName === "li") {
|
||||
blockNode = {
|
||||
type: "element",
|
||||
tagName: "ul",
|
||||
children: [blockNode],
|
||||
}
|
||||
}
|
||||
|
||||
node.children = [
|
||||
blockNode,
|
||||
{
|
||||
type: "element",
|
||||
tagName: "a",
|
||||
properties: { href: inner.properties?.href, class: ["internal"] },
|
||||
children: [{ type: "text", value: `Link to original` }],
|
||||
},
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
const {
|
||||
head: Head,
|
||||
header,
|
||||
|
||||
@@ -20,4 +20,13 @@ document.addEventListener("nav", () => {
|
||||
if (currentTheme === "dark") {
|
||||
toggleSwitch.checked = true
|
||||
}
|
||||
|
||||
// Listen for changes in prefers-color-scheme
|
||||
const colorSchemeMediaQuery = window.matchMedia("(prefers-color-scheme: dark)")
|
||||
colorSchemeMediaQuery.addEventListener("change", (e) => {
|
||||
const newTheme = e.matches ? "dark" : "light"
|
||||
document.documentElement.setAttribute("saved-theme", newTheme)
|
||||
localStorage.setItem("theme", newTheme)
|
||||
toggleSwitch.checked = e.matches
|
||||
})
|
||||
})
|
||||
|
||||
164
quartz/components/scripts/explorer.inline.ts
Normal file
164
quartz/components/scripts/explorer.inline.ts
Normal file
@@ -0,0 +1,164 @@
|
||||
import { FolderState } from "../ExplorerNode"
|
||||
|
||||
// Current state of folders
|
||||
let explorerState: FolderState[]
|
||||
|
||||
const observer = new IntersectionObserver((entries) => {
|
||||
// If last element is observed, remove gradient of "overflow" class so element is visible
|
||||
const explorer = document.getElementById("explorer-ul")
|
||||
for (const entry of entries) {
|
||||
if (entry.isIntersecting) {
|
||||
explorer?.classList.add("no-background")
|
||||
} else {
|
||||
explorer?.classList.remove("no-background")
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
function toggleExplorer(this: HTMLElement) {
|
||||
// Toggle collapsed state of entire explorer
|
||||
this.classList.toggle("collapsed")
|
||||
const content = this.nextElementSibling as HTMLElement
|
||||
content.classList.toggle("collapsed")
|
||||
content.style.maxHeight = content.style.maxHeight === "0px" ? content.scrollHeight + "px" : "0px"
|
||||
}
|
||||
|
||||
function toggleFolder(evt: MouseEvent) {
|
||||
evt.stopPropagation()
|
||||
|
||||
// Element that was clicked
|
||||
const target = evt.target as HTMLElement
|
||||
|
||||
// Check if target was svg icon or button
|
||||
const isSvg = target.nodeName === "svg"
|
||||
|
||||
// corresponding <ul> element relative to clicked button/folder
|
||||
let childFolderContainer: HTMLElement
|
||||
|
||||
// <li> element of folder (stores folder-path dataset)
|
||||
let currentFolderParent: HTMLElement
|
||||
|
||||
// Get correct relative container and toggle collapsed class
|
||||
if (isSvg) {
|
||||
childFolderContainer = target.parentElement?.nextSibling as HTMLElement
|
||||
currentFolderParent = target.nextElementSibling as HTMLElement
|
||||
|
||||
childFolderContainer.classList.toggle("open")
|
||||
} else {
|
||||
childFolderContainer = target.parentElement?.parentElement?.nextElementSibling as HTMLElement
|
||||
currentFolderParent = target.parentElement as HTMLElement
|
||||
|
||||
childFolderContainer.classList.toggle("open")
|
||||
}
|
||||
if (!childFolderContainer) return
|
||||
|
||||
// Collapse folder container
|
||||
const isCollapsed = childFolderContainer.classList.contains("open")
|
||||
setFolderState(childFolderContainer, !isCollapsed)
|
||||
|
||||
// Save folder state to localStorage
|
||||
const clickFolderPath = currentFolderParent.dataset.folderpath as string
|
||||
|
||||
// Remove leading "/"
|
||||
const fullFolderPath = clickFolderPath.substring(1)
|
||||
toggleCollapsedByPath(explorerState, fullFolderPath)
|
||||
|
||||
const stringifiedFileTree = JSON.stringify(explorerState)
|
||||
localStorage.setItem("fileTree", stringifiedFileTree)
|
||||
}
|
||||
|
||||
function setupExplorer() {
|
||||
// Set click handler for collapsing entire explorer
|
||||
const explorer = document.getElementById("explorer")
|
||||
|
||||
// Get folder state from local storage
|
||||
const storageTree = localStorage.getItem("fileTree")
|
||||
|
||||
// Convert to bool
|
||||
const useSavedFolderState = explorer?.dataset.savestate === "true"
|
||||
|
||||
if (explorer) {
|
||||
// Get config
|
||||
const collapseBehavior = explorer.dataset.behavior
|
||||
|
||||
// Add click handlers for all folders (click handler on folder "label")
|
||||
if (collapseBehavior === "collapse") {
|
||||
Array.prototype.forEach.call(
|
||||
document.getElementsByClassName("folder-button"),
|
||||
function (item) {
|
||||
item.removeEventListener("click", toggleFolder)
|
||||
item.addEventListener("click", toggleFolder)
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
// Add click handler to main explorer
|
||||
explorer.removeEventListener("click", toggleExplorer)
|
||||
explorer.addEventListener("click", toggleExplorer)
|
||||
}
|
||||
|
||||
// Set up click handlers for each folder (click handler on folder "icon")
|
||||
Array.prototype.forEach.call(document.getElementsByClassName("folder-icon"), function (item) {
|
||||
item.removeEventListener("click", toggleFolder)
|
||||
item.addEventListener("click", toggleFolder)
|
||||
})
|
||||
|
||||
if (storageTree && useSavedFolderState) {
|
||||
// Get state from localStorage and set folder state
|
||||
explorerState = JSON.parse(storageTree)
|
||||
explorerState.map((folderUl) => {
|
||||
// grab <li> element for matching folder path
|
||||
const folderLi = document.querySelector(
|
||||
`[data-folderpath='/${folderUl.path}']`,
|
||||
) as HTMLElement
|
||||
|
||||
// Get corresponding content <ul> tag and set state
|
||||
if (folderLi) {
|
||||
const folderUL = folderLi.parentElement?.nextElementSibling
|
||||
if (folderUL) {
|
||||
setFolderState(folderUL as HTMLElement, folderUl.collapsed)
|
||||
}
|
||||
}
|
||||
})
|
||||
} else {
|
||||
// If tree is not in localStorage or config is disabled, use tree passed from Explorer as dataset
|
||||
explorerState = JSON.parse(explorer?.dataset.tree as string)
|
||||
}
|
||||
}
|
||||
|
||||
window.addEventListener("resize", setupExplorer)
|
||||
document.addEventListener("nav", () => {
|
||||
setupExplorer()
|
||||
|
||||
const explorerContent = document.getElementById("explorer-ul")
|
||||
// select pseudo element at end of list
|
||||
const lastItem = document.getElementById("explorer-end")
|
||||
|
||||
observer.disconnect()
|
||||
observer.observe(lastItem as Element)
|
||||
})
|
||||
|
||||
/**
|
||||
* Toggles the state of a given folder
|
||||
* @param folderElement <div class="folder-outer"> Element of folder (parent)
|
||||
* @param collapsed if folder should be set to collapsed or not
|
||||
*/
|
||||
function setFolderState(folderElement: HTMLElement, collapsed: boolean) {
|
||||
if (collapsed) {
|
||||
folderElement?.classList.remove("open")
|
||||
} else {
|
||||
folderElement?.classList.add("open")
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Toggles visibility of a folder
|
||||
* @param array array of FolderState (`fileTree`, either get from local storage or data attribute)
|
||||
* @param path path to folder (e.g. 'advanced/more/more2')
|
||||
*/
|
||||
function toggleCollapsedByPath(array: FolderState[], path: string) {
|
||||
const entry = array.find((item) => item.path === path)
|
||||
if (entry) {
|
||||
entry.collapsed = !entry.collapsed
|
||||
}
|
||||
}
|
||||
@@ -42,19 +42,38 @@ async function renderGraph(container: string, fullSlug: FullSlug) {
|
||||
linkDistance,
|
||||
fontSize,
|
||||
opacityScale,
|
||||
removeTags,
|
||||
showTags,
|
||||
} = JSON.parse(graph.dataset["cfg"]!)
|
||||
|
||||
const data = await fetchData
|
||||
|
||||
const links: LinkData[] = []
|
||||
const tags: SimpleSlug[] = []
|
||||
|
||||
const validLinks = new Set(Object.keys(data).map((slug) => simplifySlug(slug as FullSlug)))
|
||||
|
||||
for (const [src, details] of Object.entries<ContentDetails>(data)) {
|
||||
const source = simplifySlug(src as FullSlug)
|
||||
const outgoing = details.links ?? []
|
||||
|
||||
for (const dest of outgoing) {
|
||||
if (dest in data) {
|
||||
if (validLinks.has(dest)) {
|
||||
links.push({ source, target: dest })
|
||||
}
|
||||
}
|
||||
|
||||
if (showTags) {
|
||||
const localTags = details.tags
|
||||
.filter((tag) => !removeTags.includes(tag))
|
||||
.map((tag) => simplifySlug(("tags/" + tag) as FullSlug))
|
||||
|
||||
tags.push(...localTags.filter((tag) => !tags.includes(tag)))
|
||||
|
||||
for (const tag of localTags) {
|
||||
links.push({ source, target: tag })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const neighbourhood = new Set<SimpleSlug>()
|
||||
@@ -75,14 +94,18 @@ async function renderGraph(container: string, fullSlug: FullSlug) {
|
||||
}
|
||||
} else {
|
||||
Object.keys(data).forEach((id) => neighbourhood.add(simplifySlug(id as FullSlug)))
|
||||
if (showTags) tags.forEach((tag) => neighbourhood.add(tag))
|
||||
}
|
||||
|
||||
const graphData: { nodes: NodeData[]; links: LinkData[] } = {
|
||||
nodes: [...neighbourhood].map((url) => ({
|
||||
id: url,
|
||||
text: data[url]?.title ?? url,
|
||||
tags: data[url]?.tags ?? [],
|
||||
})),
|
||||
nodes: [...neighbourhood].map((url) => {
|
||||
const text = url.startsWith("tags/") ? "#" + url.substring(5) : data[url]?.title ?? url
|
||||
return {
|
||||
id: url,
|
||||
text: text,
|
||||
tags: data[url]?.tags ?? [],
|
||||
}
|
||||
}),
|
||||
links: links.filter((l) => neighbourhood.has(l.source) && neighbourhood.has(l.target)),
|
||||
}
|
||||
|
||||
@@ -126,7 +149,7 @@ async function renderGraph(container: string, fullSlug: FullSlug) {
|
||||
const isCurrent = d.id === slug
|
||||
if (isCurrent) {
|
||||
return "var(--secondary)"
|
||||
} else if (visited.has(d.id)) {
|
||||
} else if (visited.has(d.id) || d.id.startsWith("tags/")) {
|
||||
return "var(--tertiary)"
|
||||
} else {
|
||||
return "var(--gray)"
|
||||
@@ -230,9 +253,7 @@ async function renderGraph(container: string, fullSlug: FullSlug) {
|
||||
.attr("dx", 0)
|
||||
.attr("dy", (d) => -nodeRadius(d) + "px")
|
||||
.attr("text-anchor", "middle")
|
||||
.text(
|
||||
(d) => data[d.id]?.title || (d.id.charAt(1).toUpperCase() + d.id.slice(2)).replace("-", " "),
|
||||
)
|
||||
.text((d) => d.text)
|
||||
.style("opacity", (opacityScale - 1) / 3.75)
|
||||
.style("pointer-events", "none")
|
||||
.style("font-size", fontSize + "em")
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Document } from "flexsearch"
|
||||
import { Document, SimpleDocumentSearchResultSetUnit } from "flexsearch"
|
||||
import { ContentDetails } from "../../plugins/emitters/contentIndex"
|
||||
import { registerEscapeHandler, removeAllChildren } from "./util"
|
||||
import { FullSlug, resolveRelative } from "../../util/path"
|
||||
@@ -8,12 +8,20 @@ interface Item {
|
||||
slug: FullSlug
|
||||
title: string
|
||||
content: string
|
||||
tags: string[]
|
||||
}
|
||||
|
||||
let index: Document<Item> | undefined = undefined
|
||||
|
||||
// Can be expanded with things like "term" in the future
|
||||
type SearchType = "basic" | "tags"
|
||||
|
||||
// Current searchType
|
||||
let searchType: SearchType = "basic"
|
||||
|
||||
const contextWindowWords = 30
|
||||
const numSearchResults = 5
|
||||
const numTagResults = 3
|
||||
function highlight(searchTerm: string, text: string, trim?: boolean) {
|
||||
// try to highlight longest tokens first
|
||||
const tokenizedTerms = searchTerm
|
||||
@@ -74,6 +82,7 @@ document.addEventListener("nav", async (e: unknown) => {
|
||||
const searchIcon = document.getElementById("search-icon")
|
||||
const searchBar = document.getElementById("search-bar") as HTMLInputElement | null
|
||||
const results = document.getElementById("results-container")
|
||||
const resultCards = document.getElementsByClassName("result-card")
|
||||
const idDataMap = Object.keys(data) as FullSlug[]
|
||||
|
||||
function hideSearch() {
|
||||
@@ -87,9 +96,12 @@ document.addEventListener("nav", async (e: unknown) => {
|
||||
if (results) {
|
||||
removeAllChildren(results)
|
||||
}
|
||||
|
||||
searchType = "basic" // reset search type after closing
|
||||
}
|
||||
|
||||
function showSearch() {
|
||||
function showSearch(searchTypeNew: SearchType) {
|
||||
searchType = searchTypeNew
|
||||
if (sidebar) {
|
||||
sidebar.style.zIndex = "1"
|
||||
}
|
||||
@@ -98,36 +110,123 @@ document.addEventListener("nav", async (e: unknown) => {
|
||||
}
|
||||
|
||||
function shortcutHandler(e: HTMLElementEventMap["keydown"]) {
|
||||
if (e.key === "k" && (e.ctrlKey || e.metaKey)) {
|
||||
if (e.key === "k" && (e.ctrlKey || e.metaKey) && !e.shiftKey) {
|
||||
e.preventDefault()
|
||||
const searchBarOpen = container?.classList.contains("active")
|
||||
searchBarOpen ? hideSearch() : showSearch()
|
||||
searchBarOpen ? hideSearch() : showSearch("basic")
|
||||
} else if (e.shiftKey && (e.ctrlKey || e.metaKey) && e.key.toLowerCase() === "k") {
|
||||
// Hotkey to open tag search
|
||||
e.preventDefault()
|
||||
const searchBarOpen = container?.classList.contains("active")
|
||||
searchBarOpen ? hideSearch() : showSearch("tags")
|
||||
|
||||
// add "#" prefix for tag search
|
||||
if (searchBar) searchBar.value = "#"
|
||||
} else if (e.key === "Enter") {
|
||||
const anchor = document.getElementsByClassName("result-card")[0] as HTMLInputElement | null
|
||||
if (anchor) {
|
||||
anchor.click()
|
||||
// If result has focus, navigate to that one, otherwise pick first result
|
||||
if (results?.contains(document.activeElement)) {
|
||||
const active = document.activeElement as HTMLInputElement
|
||||
active.click()
|
||||
} else {
|
||||
const anchor = document.getElementsByClassName("result-card")[0] as HTMLInputElement | null
|
||||
anchor?.click()
|
||||
}
|
||||
} else if (e.key === "ArrowDown") {
|
||||
e.preventDefault()
|
||||
// When first pressing ArrowDown, results wont contain the active element, so focus first element
|
||||
if (!results?.contains(document.activeElement)) {
|
||||
const firstResult = resultCards[0] as HTMLInputElement | null
|
||||
firstResult?.focus()
|
||||
} else {
|
||||
// If an element in results-container already has focus, focus next one
|
||||
const nextResult = document.activeElement?.nextElementSibling as HTMLInputElement | null
|
||||
nextResult?.focus()
|
||||
}
|
||||
} else if (e.key === "ArrowUp") {
|
||||
e.preventDefault()
|
||||
if (results?.contains(document.activeElement)) {
|
||||
// If an element in results-container already has focus, focus previous one
|
||||
const prevResult = document.activeElement?.previousElementSibling as HTMLInputElement | null
|
||||
prevResult?.focus()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function trimContent(content: string) {
|
||||
// works without escaping html like in `description.ts`
|
||||
const sentences = content.replace(/\s+/g, " ").split(".")
|
||||
let finalDesc = ""
|
||||
let sentenceIdx = 0
|
||||
|
||||
// Roughly estimate characters by (words * 5). Matches description length in `description.ts`.
|
||||
const len = contextWindowWords * 5
|
||||
while (finalDesc.length < len) {
|
||||
const sentence = sentences[sentenceIdx]
|
||||
if (!sentence) break
|
||||
finalDesc += sentence + "."
|
||||
sentenceIdx++
|
||||
}
|
||||
|
||||
// If more content would be available, indicate it by finishing with "..."
|
||||
if (finalDesc.length < content.length) {
|
||||
finalDesc += ".."
|
||||
}
|
||||
|
||||
return finalDesc
|
||||
}
|
||||
|
||||
const formatForDisplay = (term: string, id: number) => {
|
||||
const slug = idDataMap[id]
|
||||
return {
|
||||
id,
|
||||
slug,
|
||||
title: highlight(term, data[slug].title ?? ""),
|
||||
content: highlight(term, data[slug].content ?? "", true),
|
||||
title: searchType === "tags" ? data[slug].title : highlight(term, data[slug].title ?? ""),
|
||||
// if searchType is tag, display context from start of file and trim, otherwise use regular highlight
|
||||
content:
|
||||
searchType === "tags"
|
||||
? trimContent(data[slug].content)
|
||||
: highlight(term, data[slug].content ?? "", true),
|
||||
tags: highlightTags(term, data[slug].tags),
|
||||
}
|
||||
}
|
||||
|
||||
const resultToHTML = ({ slug, title, content }: Item) => {
|
||||
function highlightTags(term: string, tags: string[]) {
|
||||
if (tags && searchType === "tags") {
|
||||
// Find matching tags
|
||||
const termLower = term.toLowerCase()
|
||||
let matching = tags.filter((str) => str.includes(termLower))
|
||||
|
||||
// Substract matching from original tags, then push difference
|
||||
if (matching.length > 0) {
|
||||
let difference = tags.filter((x) => !matching.includes(x))
|
||||
|
||||
// Convert to html (cant be done later as matches/term dont get passed to `resultToHTML`)
|
||||
matching = matching.map((tag) => `<li><p class="match-tag">#${tag}</p></li>`)
|
||||
difference = difference.map((tag) => `<li><p>#${tag}</p></li>`)
|
||||
matching.push(...difference)
|
||||
}
|
||||
|
||||
// Only allow max of `numTagResults` in preview
|
||||
if (tags.length > numTagResults) {
|
||||
matching.splice(numTagResults)
|
||||
}
|
||||
|
||||
return matching
|
||||
} else {
|
||||
return []
|
||||
}
|
||||
}
|
||||
|
||||
const resultToHTML = ({ slug, title, content, tags }: Item) => {
|
||||
const htmlTags = tags.length > 0 ? `<ul>${tags.join("")}</ul>` : ``
|
||||
const button = document.createElement("button")
|
||||
button.classList.add("result-card")
|
||||
button.id = slug
|
||||
button.innerHTML = `<h3>${title}</h3><p>${content}</p>`
|
||||
button.innerHTML = `<h3>${title}</h3>${htmlTags}<p>${content}</p>`
|
||||
button.addEventListener("click", () => {
|
||||
const targ = resolveRelative(currentSlug, slug)
|
||||
window.spaNavigate(new URL(targ, window.location.toString()))
|
||||
hideSearch()
|
||||
})
|
||||
return button
|
||||
}
|
||||
@@ -147,15 +246,45 @@ document.addEventListener("nav", async (e: unknown) => {
|
||||
}
|
||||
|
||||
async function onType(e: HTMLElementEventMap["input"]) {
|
||||
const term = (e.target as HTMLInputElement).value
|
||||
const searchResults = (await index?.searchAsync(term, numSearchResults)) ?? []
|
||||
let term = (e.target as HTMLInputElement).value
|
||||
let searchResults: SimpleDocumentSearchResultSetUnit[]
|
||||
|
||||
if (term.toLowerCase().startsWith("#")) {
|
||||
searchType = "tags"
|
||||
} else {
|
||||
searchType = "basic"
|
||||
}
|
||||
|
||||
switch (searchType) {
|
||||
case "tags": {
|
||||
term = term.substring(1)
|
||||
searchResults =
|
||||
(await index?.searchAsync({ query: term, limit: numSearchResults, index: ["tags"] })) ??
|
||||
[]
|
||||
break
|
||||
}
|
||||
case "basic":
|
||||
default: {
|
||||
searchResults =
|
||||
(await index?.searchAsync({
|
||||
query: term,
|
||||
limit: numSearchResults,
|
||||
index: ["title", "content"],
|
||||
})) ?? []
|
||||
}
|
||||
}
|
||||
|
||||
const getByField = (field: string): number[] => {
|
||||
const results = searchResults.filter((x) => x.field === field)
|
||||
return results.length === 0 ? [] : ([...results[0].result] as number[])
|
||||
}
|
||||
|
||||
// order titles ahead of content
|
||||
const allIds: Set<number> = new Set([...getByField("title"), ...getByField("content")])
|
||||
const allIds: Set<number> = new Set([
|
||||
...getByField("title"),
|
||||
...getByField("content"),
|
||||
...getByField("tags"),
|
||||
])
|
||||
const finalResults = [...allIds].map((id) => formatForDisplay(term, id))
|
||||
displayResults(finalResults)
|
||||
}
|
||||
@@ -166,8 +295,8 @@ document.addEventListener("nav", async (e: unknown) => {
|
||||
|
||||
document.addEventListener("keydown", shortcutHandler)
|
||||
prevShortcutHandler = shortcutHandler
|
||||
searchIcon?.removeEventListener("click", showSearch)
|
||||
searchIcon?.addEventListener("click", showSearch)
|
||||
searchIcon?.removeEventListener("click", () => showSearch("basic"))
|
||||
searchIcon?.addEventListener("click", () => showSearch("basic"))
|
||||
searchBar?.removeEventListener("input", onType)
|
||||
searchBar?.addEventListener("input", onType)
|
||||
|
||||
@@ -189,22 +318,36 @@ document.addEventListener("nav", async (e: unknown) => {
|
||||
field: "content",
|
||||
tokenize: "reverse",
|
||||
},
|
||||
{
|
||||
field: "tags",
|
||||
tokenize: "reverse",
|
||||
},
|
||||
],
|
||||
},
|
||||
})
|
||||
|
||||
let id = 0
|
||||
for (const [slug, fileData] of Object.entries<ContentDetails>(data)) {
|
||||
await index.addAsync(id, {
|
||||
id,
|
||||
slug: slug as FullSlug,
|
||||
title: fileData.title,
|
||||
content: fileData.content,
|
||||
})
|
||||
id++
|
||||
}
|
||||
fillDocument(index, data)
|
||||
}
|
||||
|
||||
// register handlers
|
||||
registerEscapeHandler(container, hideSearch)
|
||||
})
|
||||
|
||||
/**
|
||||
* Fills flexsearch document with data
|
||||
* @param index index to fill
|
||||
* @param data data to fill index with
|
||||
*/
|
||||
async function fillDocument(index: Document<Item, false>, data: any) {
|
||||
let id = 0
|
||||
for (const [slug, fileData] of Object.entries<ContentDetails>(data)) {
|
||||
await index.addAsync(id, {
|
||||
id,
|
||||
slug: slug as FullSlug,
|
||||
title: fileData.title,
|
||||
content: fileData.content,
|
||||
tags: fileData.tags,
|
||||
})
|
||||
id++
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ async function navigate(url: URL, isBack: boolean = false) {
|
||||
// scroll into place and add history
|
||||
if (!isBack) {
|
||||
if (url.hash) {
|
||||
const el = document.getElementById(url.hash.substring(1))
|
||||
const el = document.getElementById(decodeURIComponent(url.hash.substring(1)))
|
||||
el?.scrollIntoView()
|
||||
} else {
|
||||
window.scrollTo({ top: 0 })
|
||||
@@ -79,7 +79,9 @@ async function navigate(url: URL, isBack: boolean = false) {
|
||||
|
||||
// delay setting the url until now
|
||||
// at this point everything is loaded so changing the url should resolve to the correct addresses
|
||||
history.pushState({}, "", url)
|
||||
if (!isBack) {
|
||||
history.pushState({}, "", url)
|
||||
}
|
||||
notifyNav(getFullSlug(window))
|
||||
delete announcer.dataset.persist
|
||||
}
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
background-color: var(--light);
|
||||
border: 1px solid;
|
||||
border-radius: 5px;
|
||||
z-index: 1;
|
||||
opacity: 0;
|
||||
transition: 0.2s;
|
||||
|
||||
|
||||
@@ -21,6 +21,14 @@
|
||||
}
|
||||
}
|
||||
|
||||
:root[saved-theme="dark"] {
|
||||
color-scheme: dark;
|
||||
}
|
||||
|
||||
:root[saved-theme="light"] {
|
||||
color-scheme: light;
|
||||
}
|
||||
|
||||
:root[saved-theme="dark"] .toggle ~ label {
|
||||
& > #dayIcon {
|
||||
opacity: 0;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user