1
0
mirror of https://gitlab.com/MisterBiggs/brain-quartz.git synced 2025-06-15 09:16:39 +00:00

Compare commits

...

7 Commits

Author SHA1 Message Date
f1e6d516e6 now that recent notes are fixed lets show more of them 2025-06-09 21:58:56 -06:00
915f383f7a the issue is def the depth 2025-06-09 21:52:01 -06:00
9c568ecbda Merge branch 'v4' of https://github.com/jackyzha0/quartz into v4 2025-06-09 21:47:50 -06:00
097f4475eb guess you can't do that 2025-06-09 21:47:20 -06:00
e82d3da6ef see if this fixes dates 2025-06-09 21:44:22 -06:00
Jiangnan Li
cdd0be2aa8
feat(giscus): expose language option for Comments component (#2012)
* add language support for Comment

* docs: let users know they can customize their language preference
2025-06-08 11:23:01 +02:00
Jacky Zhao
9de370ae14 watcher: manually ignore .git changes 2025-06-04 15:00:41 -07:00
7 changed files with 17 additions and 7 deletions

View File

@ -5,7 +5,7 @@ pages:
- if: '$CI_COMMIT_REF_NAME == "v4"'
before_script:
- git config --global url."https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.com/".insteadOf "git@gitlab.com:"
- git clone --depth 1 git@gitlab.com:Anson-Projects/brain.git content
- git clone git@gitlab.com:Anson-Projects/brain.git content
- hash -r
- npm ci --cache .npm --prefer-offline
script:

View File

@ -45,6 +45,8 @@ afterBody: [
category: 'Announcements',
// from data-category-id
categoryId: 'DIC_kwDOFxRnmM4B-Xg6',
// from data-lang
lang: 'en'
}
}),
],
@ -90,6 +92,10 @@ type Options = {
// where to put the comment input box relative to the comments
// defaults to 'bottom'
inputPosition?: "top" | "bottom"
// set your preference language here
// defaults to 'en'
lang?: string
}
}
```

View File

@ -68,7 +68,7 @@ const config: QuartzConfig = {
transformers: [
Plugin.FrontMatter(),
Plugin.CreatedModifiedDate({
priority: ["frontmatter", "git", "filesystem"],
priority: ["frontmatter", "git"],
}),
Plugin.SyntaxHighlighting({
theme: {

View File

@ -125,9 +125,10 @@ async function startWatching(
ctx,
mut,
contentMap,
ignored: (path) => {
if (gitIgnoredMatcher(path)) return true
const pathStr = path.toString()
ignored: (fp) => {
const pathStr = toPosixPath(fp.toString())
if (pathStr.startsWith(".git/")) return true
if (gitIgnoredMatcher(pathStr)) return true
for (const pattern of cfg.configuration.ignorePatterns) {
if (minimatch(pathStr, pattern)) {
return true

View File

@ -17,6 +17,7 @@ type Options = {
strict?: boolean
reactionsEnabled?: boolean
inputPosition?: "top" | "bottom"
lang?: string
}
}
@ -50,6 +51,7 @@ export default ((opts: Options) => {
data-theme-url={
opts.options.themeUrl ?? `https://${cfg.baseUrl ?? "example.com"}/static/giscus`
}
data-lang={opts.options.lang ?? "en"}
></div>
)
}

View File

@ -18,7 +18,7 @@ interface Options {
}
const defaultOptions = (cfg: GlobalConfiguration): Options => ({
limit: 3,
limit: 5,
linkToMore: false,
showTags: true,
filter: () => true,

View File

@ -55,6 +55,7 @@ type GiscusElement = Omit<HTMLElement, "dataset"> & {
strict: string
reactionsEnabled: string
inputPosition: "top" | "bottom"
lang: string
}
}
@ -78,7 +79,7 @@ document.addEventListener("nav", () => {
giscusScript.setAttribute("data-strict", giscusContainer.dataset.strict)
giscusScript.setAttribute("data-reactions-enabled", giscusContainer.dataset.reactionsEnabled)
giscusScript.setAttribute("data-input-position", giscusContainer.dataset.inputPosition)
giscusScript.setAttribute("data-lang", giscusContainer.dataset.lang)
const theme = document.documentElement.getAttribute("saved-theme")
if (theme) {
giscusScript.setAttribute("data-theme", getThemeUrl(getThemeName(theme)))