Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade Vuepress and Theme Hope #198

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/.vuepress/components/HomePage.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script setup>
import HomeFeatures from '@theme-hope/components/HomeFeatures.js';
import FeaturePanel from '@theme-hope/components/FeaturePanel';
import { usePageFrontmatter, useSiteData } from "@vuepress/client";
import Starfield from './Starfield.vue'
// vuepress-theme-hope does not export their scss files :( - Justin White <kyjus25>
Expand Down
26 changes: 18 additions & 8 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { defineUserConfig, defaultTheme } from 'vuepress';
import { hopeTheme } from "vuepress-theme-hope";
import pulsarTheme from './theme/index';
import { searchPlugin } from '@vuepress/plugin-search';
//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)
Expand All @@ -23,16 +24,25 @@ export default defineUserConfig({
https: true
},
plugins: [
searchPlugin({
maxSuggestions: 10
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",
displayAllHeaders: true,
editLinks: true,
iconAssets: "fontawesome",
editLink: true,
iconAssets: "fontawesome-with-brands",
repo: "pulsar-edit",
repoLabel: "GitHub",
displayFooter: true,
Expand All @@ -54,7 +64,7 @@ export default defineUserConfig({
mdEnhance: {
align: true,
include: {
getPath: (file) => {
resolvePath: (file) => {
if (file.startsWith("@orgdocs")) {
return file.replace("@orgdocs",
path.resolve(__dirname, "../../node_modules/.github/"));
Expand Down Expand Up @@ -83,6 +93,6 @@ export default defineUserConfig({
sidebarDepth: 3
}),
head: [
['script', {src: '/download-preselect.js'}],
['script', {src: '/download-preselect'}],
],
});
8 changes: 4 additions & 4 deletions docs/.vuepress/navbar.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
const navbar_en = [
{
text: 'Download',
icon: 'solid fa-download',
icon: 'fas fa-download',
link: '/download/'
},
{
text: 'Docs',
icon: 'solid fa-file-lines',
icon: 'fas fa-file-lines',
link: '/docs/'
},
{
text: 'Repositories',
icon: 'brands fa-github',
icon: 'fab fa-github',
link: '/repos/'
},
{
Expand Down Expand Up @@ -40,7 +40,7 @@ const navbar_en = [
},
{
text: "Discord",
icon: 'brands fa-discord',
icon: 'fab fa-discord',
link: "https://discord.gg/7aEbB9dGRT"
},
{
Expand Down
9 changes: 3 additions & 6 deletions docs/.vuepress/sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const sidebar_en = {
icon: 'solid fa-rocket',
link:'launch-manual/',
prefix: 'launch-manual/sections/',
collapsable: true,
collapsible: true,
children: [
{
text: 'Getting Started',
Expand Down Expand Up @@ -39,17 +39,15 @@ const sidebar_en = {
},
{
text: 'Packages',
title: 'packages',
icon: 'solid fa-box-open',
link: 'packages/'
},
{
text: 'Resources',
title: 'resources',
icon: 'solid fa-wrench',
link: 'resources/',
prefix: 'resources/',
collapsable: true,
collapsible: true,
children: [
{
text: 'Glossary',
Expand Down Expand Up @@ -85,11 +83,10 @@ const sidebar_en = {
},
{
text: 'Atom Archive',
title: 'atom archive',
icon: 'solid fa-box-archive',
link: 'atom-archive/',
prefix: 'atom-archive/',
collapsable: true,
collapsible: true,
children: [
'getting-started/',
'using-atom/',
Expand Down
4 changes: 2 additions & 2 deletions docs/.vuepress/theme/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ export default (options) => ({

alias: {
// https://vuepress-theme-hope.github.io/v2/cookbook/advanced/replace.html#replace-components
"@theme-hope/components/HomePage.js": path.resolve(
"@theme-hope/components/HomePage": path.resolve(
__dirname,
"../components/HomePage.vue"
),
},
});
});
16 changes: 8 additions & 8 deletions docs/docs/launch-manual/sections/behind-pulsar/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ we'll go into more of a deep dive on individual internal APIs and systems of
Pulsar, even looking at some Atom source to see how things are really getting
done.

@include(sections/configuration-api.md)
@include(sections/keymaps-in-depth.md)
@include(sections/scoped-settings-scopes-and-scope-descriptors.md)
@include(sections/serialization-in-pulsar.md)
@include(sections/developing-node-modules.md)
@include(sections/interacting-with-other-packages-via-services.md)
@include(sections/maintaining-your-packages.md)
@include(sections/summary.md)
<!-- @include: ./sections/configuration-api.md -->
<!-- @include: ./sections/keymaps-in-depth.md -->
<!-- @include: ./sections/scoped-settings-scopes-and-scope-descriptors.md -->
<!-- @include: ./sections/serialization-in-pulsar.md -->
<!-- @include: ./sections/developing-node-modules.md -->
<!-- @include: ./sections/interacting-with-other-packages-via-services.md -->
<!-- @include: ./sections/maintaining-your-packages.md -->
<!-- @include: ./sections/summary.md -->
2 changes: 1 addition & 1 deletion docs/docs/resources/privacy/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ title: Privacy Policy
<!--This page is generated from the PRIVACY_POLICY.md page on the org-level
documentation at https://github.com/pulsar-edit/.github-->

@include(@orgdocs/PRIVACY_POLICY.md)
<!-- include: ./@orgdocs/PRIVACY_POLICY.md -->
13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
"dependencies": {
".github": "github:pulsar-edit/.github",
"pulsar-assets": "github:pulsar-edit/pulsar-assets",
"vuepress-theme-hope": "2.0.0-beta.106"
"vuepress-theme-hope": "2.0.0-beta.200"
},
"devDependencies": {
"@vuepress/client": "2.0.0-beta.51",
"@vuepress/plugin-search": "2.0.0-beta.51",
"@vuepress/utils": "2.0.0-beta.51",
"@vuepress/client": "2.0.0-beta.61",
"@vuepress/plugin-search": "2.0.0-beta.61",
"@vuepress/utils": "2.0.0-beta.61",
"husky": "^8.0.2",
"lint-staged": "^13.0.3",
"prettier": "^2.7.1",
Expand All @@ -33,8 +33,9 @@
"remark-preset-lint-markdown-style-guide": "^5.1.2",
"remark-preset-lint-recommended": "^6.1.2",
"remark-preset-prettier": "^2.0.1",
"vue": "^3.2.45",
"vuepress": "2.0.0-beta.51"
"vue": "^3.2.47",
"vuepress": "2.0.0-beta.61",
"vuepress-plugin-search-pro": "2.0.0-beta.200"
},
"lint-staged": {
"*.md": "prettier --write"
Expand Down
Loading