mirror of
https://github.com/alrayyes/wiki.git
synced 2024-11-25 21:16:21 +00:00
fix: small typos (#686)
This commit is contained in:
parent
52e6c03730
commit
0a8c38dc21
7 changed files with 12 additions and 12 deletions
|
@ -2,7 +2,7 @@
|
||||||
title: Authoring Content
|
title: Authoring Content
|
||||||
---
|
---
|
||||||
|
|
||||||
All of the content in your Quartz should go in the `/content` folder. The content for the home page of your Quartz lives in `content/index.md`. If you've [[index#🪴 Get Started|setup Quartz]] already, this folder should already be initailized. Any Markdown in this folder will get processed by Quartz.
|
All of the content in your Quartz should go in the `/content` folder. The content for the home page of your Quartz lives in `content/index.md`. If you've [[index#🪴 Get Started|setup Quartz]] already, this folder should already be initialized. Any Markdown in this folder will get processed by Quartz.
|
||||||
|
|
||||||
It is recommended that you use [Obsidian](https://obsidian.md/) as a way to edit and maintain your Quartz. It comes with a nice editor and graphical interface to preview, edit, and link your local files and attachments.
|
It is recommended that you use [Obsidian](https://obsidian.md/) as a way to edit and maintain your Quartz. It comes with a nice editor and graphical interface to preview, edit, and link your local files and attachments.
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ Component.Breadcrumbs({
|
||||||
rootName: "Home", // name of first/root element
|
rootName: "Home", // name of first/root element
|
||||||
resolveFrontmatterTitle: true, // whether to resolve folder names through frontmatter titles
|
resolveFrontmatterTitle: true, // whether to resolve folder names through frontmatter titles
|
||||||
hideOnRoot: true, // whether to hide breadcrumbs on root `index.md` page
|
hideOnRoot: true, // whether to hide breadcrumbs on root `index.md` page
|
||||||
showCurrentPage: true, // wether to display the current page in the breadcrumbs
|
showCurrentPage: true, // whether to display the current page in the breadcrumbs
|
||||||
})
|
})
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@ Component.Explorer({
|
||||||
title: "Explorer", // title of the explorer component
|
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)
|
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")
|
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
|
useSavedState: true, // whether to use local storage to save "state" (which folders are opened) of explorer
|
||||||
// Sort order: folders first, then files. Sort folders and files alphabetically
|
// Sort order: folders first, then files. Sort folders and files alphabetically
|
||||||
sortFn: (a, b) => {
|
sortFn: (a, b) => {
|
||||||
... // default implementation shown later
|
... // default implementation shown later
|
||||||
|
|
|
@ -225,6 +225,6 @@ pages:
|
||||||
- public
|
- public
|
||||||
```
|
```
|
||||||
|
|
||||||
When `.gitlab-ci.yaml` is commited, GitLab will build and deploy the website as a GitLab Page. You can find the url under `Deploy > Pages` in the sidebar.
|
When `.gitlab-ci.yaml` is committed, GitLab will build and deploy the website as a GitLab Page. You can find the url under `Deploy > Pages` in the sidebar.
|
||||||
|
|
||||||
By default, the page is private and only visible when logged in to a GitLab account with access to the repository but can be opened in the settings under `Deploy` -> `Pages`.
|
By default, the page is private and only visible when logged in to a GitLab account with access to the repository but can be opened in the settings under `Deploy` -> `Pages`.
|
||||||
|
|
|
@ -450,7 +450,7 @@ export async function handleUpdate(argv) {
|
||||||
try {
|
try {
|
||||||
gitPull(UPSTREAM_NAME, QUARTZ_SOURCE_BRANCH)
|
gitPull(UPSTREAM_NAME, QUARTZ_SOURCE_BRANCH)
|
||||||
} catch {
|
} catch {
|
||||||
console.log(chalk.red("An error occured above while pulling updates."))
|
console.log(chalk.red("An error occurred above while pulling updates."))
|
||||||
await popContentFolder(contentFolder)
|
await popContentFolder(contentFolder)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -522,7 +522,7 @@ export async function handleSync(argv) {
|
||||||
try {
|
try {
|
||||||
gitPull(ORIGIN_NAME, QUARTZ_SOURCE_BRANCH)
|
gitPull(ORIGIN_NAME, QUARTZ_SOURCE_BRANCH)
|
||||||
} catch {
|
} catch {
|
||||||
console.log(chalk.red("An error occured above while pulling updates."))
|
console.log(chalk.red("An error occurred above while pulling updates."))
|
||||||
await popContentFolder(contentFolder)
|
await popContentFolder(contentFolder)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,15 +18,15 @@ interface BreadcrumbOptions {
|
||||||
*/
|
*/
|
||||||
rootName: string
|
rootName: string
|
||||||
/**
|
/**
|
||||||
* wether to look up frontmatter title for folders (could cause performance problems with big vaults)
|
* Whether to look up frontmatter title for folders (could cause performance problems with big vaults)
|
||||||
*/
|
*/
|
||||||
resolveFrontmatterTitle: boolean
|
resolveFrontmatterTitle: boolean
|
||||||
/**
|
/**
|
||||||
* Wether to display breadcrumbs on root `index.md`
|
* Whether to display breadcrumbs on root `index.md`
|
||||||
*/
|
*/
|
||||||
hideOnRoot: boolean
|
hideOnRoot: boolean
|
||||||
/**
|
/**
|
||||||
* Wether to display the current page in the breadcrumbs.
|
* Whether to display the current page in the breadcrumbs.
|
||||||
*/
|
*/
|
||||||
showCurrentPage: boolean
|
showCurrentPage: boolean
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,12 +35,12 @@ function highlight(searchTerm: string, text: string, trim?: boolean) {
|
||||||
if (trim) {
|
if (trim) {
|
||||||
const includesCheck = (tok: string) =>
|
const includesCheck = (tok: string) =>
|
||||||
tokenizedTerms.some((term) => tok.toLowerCase().startsWith(term.toLowerCase()))
|
tokenizedTerms.some((term) => tok.toLowerCase().startsWith(term.toLowerCase()))
|
||||||
const occurencesIndices = tokenizedText.map(includesCheck)
|
const occurrencesIndices = tokenizedText.map(includesCheck)
|
||||||
|
|
||||||
let bestSum = 0
|
let bestSum = 0
|
||||||
let bestIndex = 0
|
let bestIndex = 0
|
||||||
for (let i = 0; i < Math.max(tokenizedText.length - contextWindowWords, 0); i++) {
|
for (let i = 0; i < Math.max(tokenizedText.length - contextWindowWords, 0); i++) {
|
||||||
const window = occurencesIndices.slice(i, i + contextWindowWords)
|
const window = occurrencesIndices.slice(i, i + contextWindowWords)
|
||||||
const windowSum = window.reduce((total, cur) => total + (cur ? 1 : 0), 0)
|
const windowSum = window.reduce((total, cur) => total + (cur ? 1 : 0), 0)
|
||||||
if (windowSum >= bestSum) {
|
if (windowSum >= bestSum) {
|
||||||
bestSum = windowSum
|
bestSum = windowSum
|
||||||
|
@ -196,7 +196,7 @@ document.addEventListener("nav", async (e: unknown) => {
|
||||||
const termLower = term.toLowerCase()
|
const termLower = term.toLowerCase()
|
||||||
let matching = tags.filter((str) => str.includes(termLower))
|
let matching = tags.filter((str) => str.includes(termLower))
|
||||||
|
|
||||||
// Substract matching from original tags, then push difference
|
// Subtract matching from original tags, then push difference
|
||||||
if (matching.length > 0) {
|
if (matching.length > 0) {
|
||||||
let difference = tags.filter((x) => !matching.includes(x))
|
let difference = tags.filter((x) => !matching.includes(x))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue