mirror of
https://gitlab.com/MisterBiggs/brain-quartz.git
synced 2025-06-16 01:36:40 +00:00
Compare commits
7 Commits
524209f284
...
f1e6d516e6
Author | SHA1 | Date | |
---|---|---|---|
f1e6d516e6 | |||
915f383f7a | |||
9c568ecbda | |||
097f4475eb | |||
e82d3da6ef | |||
|
cdd0be2aa8 | ||
|
9de370ae14 |
@ -5,7 +5,7 @@ pages:
|
|||||||
- if: '$CI_COMMIT_REF_NAME == "v4"'
|
- if: '$CI_COMMIT_REF_NAME == "v4"'
|
||||||
before_script:
|
before_script:
|
||||||
- git config --global url."https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.com/".insteadOf "git@gitlab.com:"
|
- 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
|
- hash -r
|
||||||
- npm ci --cache .npm --prefer-offline
|
- npm ci --cache .npm --prefer-offline
|
||||||
script:
|
script:
|
||||||
|
@ -45,6 +45,8 @@ afterBody: [
|
|||||||
category: 'Announcements',
|
category: 'Announcements',
|
||||||
// from data-category-id
|
// from data-category-id
|
||||||
categoryId: 'DIC_kwDOFxRnmM4B-Xg6',
|
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
|
// where to put the comment input box relative to the comments
|
||||||
// defaults to 'bottom'
|
// defaults to 'bottom'
|
||||||
inputPosition?: "top" | "bottom"
|
inputPosition?: "top" | "bottom"
|
||||||
|
|
||||||
|
// set your preference language here
|
||||||
|
// defaults to 'en'
|
||||||
|
lang?: string
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
@ -68,7 +68,7 @@ const config: QuartzConfig = {
|
|||||||
transformers: [
|
transformers: [
|
||||||
Plugin.FrontMatter(),
|
Plugin.FrontMatter(),
|
||||||
Plugin.CreatedModifiedDate({
|
Plugin.CreatedModifiedDate({
|
||||||
priority: ["frontmatter", "git", "filesystem"],
|
priority: ["frontmatter", "git"],
|
||||||
}),
|
}),
|
||||||
Plugin.SyntaxHighlighting({
|
Plugin.SyntaxHighlighting({
|
||||||
theme: {
|
theme: {
|
||||||
|
@ -125,9 +125,10 @@ async function startWatching(
|
|||||||
ctx,
|
ctx,
|
||||||
mut,
|
mut,
|
||||||
contentMap,
|
contentMap,
|
||||||
ignored: (path) => {
|
ignored: (fp) => {
|
||||||
if (gitIgnoredMatcher(path)) return true
|
const pathStr = toPosixPath(fp.toString())
|
||||||
const pathStr = path.toString()
|
if (pathStr.startsWith(".git/")) return true
|
||||||
|
if (gitIgnoredMatcher(pathStr)) return true
|
||||||
for (const pattern of cfg.configuration.ignorePatterns) {
|
for (const pattern of cfg.configuration.ignorePatterns) {
|
||||||
if (minimatch(pathStr, pattern)) {
|
if (minimatch(pathStr, pattern)) {
|
||||||
return true
|
return true
|
||||||
|
@ -17,6 +17,7 @@ type Options = {
|
|||||||
strict?: boolean
|
strict?: boolean
|
||||||
reactionsEnabled?: boolean
|
reactionsEnabled?: boolean
|
||||||
inputPosition?: "top" | "bottom"
|
inputPosition?: "top" | "bottom"
|
||||||
|
lang?: string
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -50,6 +51,7 @@ export default ((opts: Options) => {
|
|||||||
data-theme-url={
|
data-theme-url={
|
||||||
opts.options.themeUrl ?? `https://${cfg.baseUrl ?? "example.com"}/static/giscus`
|
opts.options.themeUrl ?? `https://${cfg.baseUrl ?? "example.com"}/static/giscus`
|
||||||
}
|
}
|
||||||
|
data-lang={opts.options.lang ?? "en"}
|
||||||
></div>
|
></div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,7 @@ interface Options {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const defaultOptions = (cfg: GlobalConfiguration): Options => ({
|
const defaultOptions = (cfg: GlobalConfiguration): Options => ({
|
||||||
limit: 3,
|
limit: 5,
|
||||||
linkToMore: false,
|
linkToMore: false,
|
||||||
showTags: true,
|
showTags: true,
|
||||||
filter: () => true,
|
filter: () => true,
|
||||||
|
@ -55,6 +55,7 @@ type GiscusElement = Omit<HTMLElement, "dataset"> & {
|
|||||||
strict: string
|
strict: string
|
||||||
reactionsEnabled: string
|
reactionsEnabled: string
|
||||||
inputPosition: "top" | "bottom"
|
inputPosition: "top" | "bottom"
|
||||||
|
lang: string
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -78,7 +79,7 @@ document.addEventListener("nav", () => {
|
|||||||
giscusScript.setAttribute("data-strict", giscusContainer.dataset.strict)
|
giscusScript.setAttribute("data-strict", giscusContainer.dataset.strict)
|
||||||
giscusScript.setAttribute("data-reactions-enabled", giscusContainer.dataset.reactionsEnabled)
|
giscusScript.setAttribute("data-reactions-enabled", giscusContainer.dataset.reactionsEnabled)
|
||||||
giscusScript.setAttribute("data-input-position", giscusContainer.dataset.inputPosition)
|
giscusScript.setAttribute("data-input-position", giscusContainer.dataset.inputPosition)
|
||||||
|
giscusScript.setAttribute("data-lang", giscusContainer.dataset.lang)
|
||||||
const theme = document.documentElement.getAttribute("saved-theme")
|
const theme = document.documentElement.getAttribute("saved-theme")
|
||||||
if (theme) {
|
if (theme) {
|
||||||
giscusScript.setAttribute("data-theme", getThemeUrl(getThemeName(theme)))
|
giscusScript.setAttribute("data-theme", getThemeUrl(getThemeName(theme)))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user