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

chore: update vuepress and theme #315

Merged
merged 1 commit into from
Aug 21, 2023
Merged
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
4 changes: 4 additions & 0 deletions documentation/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ dist
config.local.js
basement_dist

src/.vuepress/.cache
src/.vuepress/.temp

!package-lock.json
10 changes: 7 additions & 3 deletions documentation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,17 @@
"description": "Fusion Project Portal documentation",
"scripts": {
"docs:dev": "vuepress dev src",
"docs:clean-dev": "vuepress dev src --clean-cache",
"docs:build": "vuepress build src -d ../docs"
},
"license": "MIT",
"dependencies": {},
"devDependencies": {
"typescript": "^4.8.2",
"vuepress": "^1.9.7",
"vuepress-theme-hope": "^1.30.0"
"@vuepress/plugin-register-components": "^2.0.0-beta.66",
"@vuepress/utils": "2.0.0-beta.66",
"typescript": "^5.1.6",
"vue": "^3.3.4",
"vuepress": "2.0.0-beta.66",
"vuepress-theme-hope": "^2.0.0-beta.233"
}
}
38 changes: 0 additions & 38 deletions documentation/src/.vuepress/components/TagList.vue

This file was deleted.

94 changes: 22 additions & 72 deletions documentation/src/.vuepress/config.ts
Original file line number Diff line number Diff line change
@@ -1,83 +1,33 @@
import hope from "vuepress-theme-hope";
import { defineUserConfig } from "vuepress";
import theme from "./theme";
import { getDirname, path } from "@vuepress/utils";
import { registerComponentsPlugin } from "@vuepress/plugin-register-components";

export default hope.config({
export default defineUserConfig({
base: "/fusion-project-portal/",
title: "Fusion Project Portal",
description:
"Fusion Project Portal is a mono repository for all frontend and backend services associated project portal.",
themeConfig: {
logo: "/fusion.png",
repo: "equinor/fusion-project-portal",
docsBranch: "main",
editLinks: true,
docsDir: "docs/",
darkmode: "auto-switch",
comment: false,
nav: [
head: [
[
"link",
{
text: "Frontend",
link: "/frontend/",
},
{
text: "Backend",
link: "/backend/",
href: "https://cdn.eds.equinor.com/font/equinor-font.css",
rel: "stylesheet",
},
],
sidebar: [
{
title: "Frontend",
path: "/frontend/",
collapsable: false,
sidebarDepth: 3,
children: ["/frontend/portal-actions.md"],
},
{
title: "Backend",
path: "/backend/",
collapsable: false,
sidebarDepth: 3,
children: [
// {
// title: 'Section',
// path: '/frontend/section',
// children: [
// ],
// },
],
},
{
title: "Project Portal Study",
path: "/projectPortalStudy/",
collapsable: false,
sidebarDepth: 3,
children: [
// {
// title: 'Section',
// path: '/frontend/section',
// children: [
// ],
// },
],
},
],

mdEnhance: {
mermaid: true,
codegroup: true,
container: true,
tasklist: true,
presentation: {
plugins: [
"highlight",
"math",
"search",
"notes",
"zoom",
"anything",
"audio",
"chalkboard",
],
},
],
theme,
// plugins: [
// registerComponentsPlugin({
// components: {
// ModuleBadge: path.resolve(__dirname, "./components/ModuleBadge.vue"),
// },
// }),
// ],
markdown: {
code: {
lineNumbers: false,
},
},
});
10 changes: 5 additions & 5 deletions documentation/src/.vuepress/enhanceApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
*/

export default ({
Vue, // the version of Vue being used in the VuePress app
options, // the options for the root Vue instance
router, // the router instance for the app
siteData, // site metadata
Vue, // the version of Vue being used in the VuePress app
options, // the options for the root Vue instance
router, // the router instance for the app
siteData, // site metadata
}) => {
// ...apply enhancements for the site.
// ...apply enhancements for the site.
};
12 changes: 12 additions & 0 deletions documentation/src/.vuepress/nav-bar.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { NavbarOptions } from "vuepress-theme-hope";

export const navbar: NavbarOptions = [
{
text: "Frontend",
link: "/frontend/",
},
{
text: "Backend",
link: "/backend/",
},
];
24 changes: 24 additions & 0 deletions documentation/src/.vuepress/side-bar.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { sidebar } from "vuepress-theme-hope";

export default sidebar({
"/frontend/": [
{
text: "Frontend",
prefix: "/frontend/",
children: [
{
text: "Home",
link: "/frontend/",
},
"/frontend/portal-actions.md",
],
},
],
"/backend/": [
{
text: "Backend",
prefix: "/backend/",
children: [],
},
],
});
11 changes: 11 additions & 0 deletions documentation/src/.vuepress/styles/index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/**
* Custom Styles here.
*
* ref:https://v1.vuepress.vuejs.org/config/#index-styl
*/

:root {
--font-family-code: system-ui;
--font-family: "Equinor", sans-serif !important;
--font-family-fancy: "Equinor", sans-serif !important;
}
17 changes: 0 additions & 17 deletions documentation/src/.vuepress/styles/index.styl

This file was deleted.

27 changes: 27 additions & 0 deletions documentation/src/.vuepress/theme.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { hopeTheme } from "vuepress-theme-hope";
import { navbar } from "./nav-bar";
import sidebar from "./side-bar";
// We export the theme object by default
export default hopeTheme({
// theme configuration

logo: "/fusion.png",
repo: "equinor/fusion-project-portal",
docsBranch: "main",
navbar,
sidebar,
docsDir: "docs/",
darkmode: "switch",
plugins: {
blog: true,
mdEnhance: {
mermaid: true,
codetabs: true,
tabs: true,
tasklist: true,
container: true,
imgSize: true,
align: true,
},
},
});
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
title: Backend
category: backend
tags:
- api
- dotnet
- core
tag:
- api
- dotnet
- core
---

Backend end documentation will come here...
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Client Backend
category: backend
tags:
tag:
- client
- dotnet
- core
Expand Down
6 changes: 3 additions & 3 deletions documentation/src/frontend/frontend-spec.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
title: Frontend spec
category: frontend
tags:
- web
- react
tag:
- web
- react
---

## Menu
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
title: Frontend
category: frontend
tags:
- web
- react
tag:
- web
- react
---

Front end documentation will come here...
11 changes: 5 additions & 6 deletions documentation/src/frontend/portal-actions.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
---
title: Portal Actions
title: Portal Actions
category: frontend
tags:
- actions
- favorites
- settings
tag:
- actions
- favorites
- settings
---


## Add New Action

For a developer to add a new is fairly simple go to `portal-actions-config.ts` file and append a new PortalAction.
Expand Down
20 changes: 10 additions & 10 deletions documentation/src/index.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
---
home: true
title: "Home"
heroImage: /fusion.png
action:
- text: 🚀 Quick Start
link: /#
features:
- title: ⚛️ Frontend
details: Tooling for developing Fusion Project Portal with React
- title: ✍️ TypeScript
details: Written in TypeScript
- title: 📄 Vue Press
details: Documentation with IntelliSense
footer: Made by Fusion with ❤️
- title: ⚛️ Frontend
details: Tooling for developing Fusion Project Portal with React
- title: ✍️ TypeScript
details: Written in TypeScript
- title: 📄 Vue Press
details: Documentation with IntelliSense
footer: Powered by Fusion ❤️
---

Welcome
Loading
Loading