-
-
Notifications
You must be signed in to change notification settings - Fork 36
/
Copy pathconfig.js
98 lines (94 loc) · 2.66 KB
/
config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
import { defineUserConfig, defaultTheme } from 'vuepress';
import { hopeTheme } from "vuepress-theme-hope";
import pulsarTheme from './theme/index';
//import { searchPlugin } from '@vuepress/plugin-search';
import { searchProPlugin } from "vuepress-plugin-search-pro";
import { getDirname, path } from '@vuepress/utils';
const __dirname = getDirname(import.meta.url)
import { navbar_en } from "./navbar.js";
import { sidebar_en } from "./sidebar.js";
//import { blog_config } from "./blog.js";
import { footer } from "./footer.js";
export default defineUserConfig({
lang: 'en-US',
//title: 'Pulsar',
description: 'A Community-led Hyper-Hackable Text Editor',
alias: {
'@images': path.resolve(__dirname, '../../node_modules/.github/images')
},
devServer: {
https: true
},
plugins: [
searchProPlugin({
indexContent: true,
customFields: [
{
getter: (page) => page.frontmatter.category,
formatter: "Category: $content",
},
{
getter: (page) => page.frontmatter.tag,
formatter: "Tag: $content",
},
],
}),
],
theme: pulsarTheme({
logo: "/logo-name-navbar-light.svg",
logoDark: "/logo-name-navbar-dark.svg",
editLink: true,
iconAssets: "fontawesome-with-brands",
repo: "pulsar-edit",
repoLabel: "GitHub",
displayFooter: true,
footer: footer,
copyright: false,
docsRepo: "https://github.com/pulsar-edit/pulsar-edit.github.io",
docsDir: "/docs",
navbar: navbar_en,
locales: {
"/": {
selectLanguageName: "English"
}
},
plugins: {
sitemap: {
hostname: "https://pulsar-edit.dev",
sitemapFilename: "sitemap.xml"
},
mdEnhance: {
align: true,
include: {
resolvePath: (file) => {
if (file.startsWith("@orgdocs")) {
return file.replace("@orgdocs",
path.resolve(__dirname, "../../node_modules/.github/"));
}
return file;
},
},
tabs: true,
container: true
},
blog: {
filter: ({ filePathRelative }) =>
filePathRelative ? filePathRelative.startsWith("blog/") : false,
//autoExcerpt: true,
getInfo: ({ excerpt, frontmatter, git = {} }) => ({
author: frontmatter.author || "",
date: frontmatter.date || git.createdTime || null,
category: frontmatter.category || [],
tag: frontmatter.tag || [],
excerpt: page.excerpt
}),
article: "/blog/",
}
},
sidebar: sidebar_en,
sidebarDepth: 3
}),
head: [
['script', {src: '/download-preselect'}],
],
});