-
-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: format code via prettier (#125)
- Loading branch information
Showing
61 changed files
with
313 additions
and
397 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# open_collective: nixos-and-flakes-book | ||
patreon: ryan4yin | ||
custom: ['https://buymeacoffee.com/ryan4yin', 'https://afdian.net/a/ryan4yin'] | ||
custom: ["https://buymeacoffee.com/ryan4yin", "https://afdian.net/a/ryan4yin"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,7 @@ | ||
--- | ||
name: Custom issue template | ||
about: Describe this issue template's purpose here. | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
title: "" | ||
labels: "" | ||
assignees: "" | ||
--- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
@media print { | ||
.VPNav, | ||
.VPLocalNav, | ||
.VPDocFooter { | ||
display: none !important; | ||
} | ||
.VPNav, | ||
.VPLocalNav, | ||
.VPDocFooter { | ||
display: none !important; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,30 @@ | ||
import { defineUserConfig } from "vitepress-export-pdf"; | ||
import config from './config' | ||
|
||
import { defineUserConfig } from "vitepress-export-pdf" | ||
import config from "./config" | ||
|
||
// convert `config.themeConfig?.sidebar` to a list of routes | ||
let routeOrder = []; | ||
const sidebar = config.locales.root.themeConfig?.sidebar; | ||
let routeOrder = [] | ||
const sidebar = config.locales.root.themeConfig?.sidebar | ||
if (sidebar) { | ||
sidebar.forEach((it) => { | ||
if (it.items) { | ||
it.items.forEach((subItem) => { | ||
routeOrder.push(subItem.link.replace(/\.md$/, "")); | ||
}); | ||
routeOrder.push(subItem.link.replace(/\.md$/, "")) | ||
}) | ||
} | ||
}); | ||
}) | ||
} | ||
|
||
// print routeOrder in terminal | ||
console.log("routeOrder: ", routeOrder); | ||
console.log("routeOrder: ", routeOrder) | ||
|
||
export default defineUserConfig({ | ||
routePatterns: ["!/zh/**"], // exclude zh-CN pages | ||
sorter: (pageA, pageB) => { | ||
const aIndex = routeOrder.findIndex(route => route === pageA.path); | ||
const bIndex = routeOrder.findIndex(route => route === pageB.path); | ||
const index = aIndex - bIndex; | ||
// console.log(`sorter: ${pageA.path} vs ${pageB.path} = ${index}`); | ||
return index; | ||
}, | ||
urlOrigin: "https://nixos-and-flakes.thiscute.world/", | ||
}); | ||
routePatterns: ["!/zh/**"], // exclude zh-CN pages | ||
sorter: (pageA, pageB) => { | ||
const aIndex = routeOrder.findIndex((route) => route === pageA.path) | ||
const bIndex = routeOrder.findIndex((route) => route === pageB.path) | ||
const index = aIndex - bIndex | ||
// console.log(`sorter: ${pageA.path} vs ${pageB.path} = ${index}`); | ||
return index | ||
}, | ||
urlOrigin: "https://nixos-and-flakes.thiscute.world/", | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.