From 0488a870efeb734924e72929138af72e2752154a Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Mon, 28 Feb 2022 22:08:36 -0600 Subject: [PATCH] Added sidebar --- .vitepress/config.js | 28 +++++++++++++++++++++++----- .vitepress/theme/custom.css | 4 ++++ .vitepress/theme/index.js | 1 + {docs => guide}/getting-started.md | 2 ++ guide/index.md | 8 ++++++++ index.md | 2 +- 6 files changed, 39 insertions(+), 6 deletions(-) create mode 100644 .vitepress/theme/custom.css rename {docs => guide}/getting-started.md (52%) create mode 100644 guide/index.md diff --git a/.vitepress/config.js b/.vitepress/config.js index 21fb525f..0c1bd4c8 100644 --- a/.vitepress/config.js +++ b/.vitepress/config.js @@ -2,16 +2,34 @@ module.exports = { lang: "en-US", title: 'Profectus', description: 'A game engine that grows with you.', + head: [ + ['link', { rel: 'stylesheet', href: 'https://fonts.googleapis.com/css2?family=Roboto+Mono' }] + ], themeConfig: { + repo: 'profectus-engine/profectus-docs', + docsDir: '', + docsBranch: 'main', + editLinks: true, + editLinkText: 'Edit this page on GitHub', + lastUpdated: 'Last Updated', nav: [ - { text: "Home", link: "/" }, + { text: "Guide", link: "/guide/", activeMatch: "^/guide/" }, { text: "Forums", link: "https://forums.moddingtree.com" }, { text: "Discord", link: "https://discord.gg/F3xveHV" }, { text: "Github", link: "https://github.com/profectus-engine/Profectus" } ], - // sidebar: [ - // { text: "Guide", link: "/docs" }, - // { text: "Reference", link: "/profectus" } - // ] + sidebar: [ + { + text: "Guide", + children: [ + { text: "Introduction", link: "/guide/" }, + { text: "Getting Started", link: "/guide/getting-started" } + ] + }, + { + text: "Creating Features", + children: [] + } + ] } } diff --git a/.vitepress/theme/custom.css b/.vitepress/theme/custom.css new file mode 100644 index 00000000..cad10ac3 --- /dev/null +++ b/.vitepress/theme/custom.css @@ -0,0 +1,4 @@ +/* Hide Github button that goes to profectus-docs */ +.nav-links > .item:last-child { + display: none; +} \ No newline at end of file diff --git a/.vitepress/theme/index.js b/.vitepress/theme/index.js index 7e1b50a8..d3d01684 100644 --- a/.vitepress/theme/index.js +++ b/.vitepress/theme/index.js @@ -1,5 +1,6 @@ import DefaultTheme from 'vitepress/theme'; import Layout from './Layout.vue'; +import './custom.css'; import './vars.css'; export default { diff --git a/docs/getting-started.md b/guide/getting-started.md similarity index 52% rename from docs/getting-started.md rename to guide/getting-started.md index bad55622..8f1cdf99 100644 --- a/docs/getting-started.md +++ b/guide/getting-started.md @@ -1 +1,3 @@ # Getting Started + +Clone the repo diff --git a/guide/index.md b/guide/index.md new file mode 100644 index 00000000..f3449251 --- /dev/null +++ b/guide/index.md @@ -0,0 +1,8 @@ +--- +title: Introduction +--- +# Introduction + +Profectus is a web-based game engine. You can write your content using many built in features, write your own features, and build up complex gameplay quickly and easily. + +The purpose of creating profectus was to create an easy to use engine that does not create a ceiling for a programmer's personal growth. This engine will grow in complexity with you, empowering you to create increasingly complex designs and mechanics. diff --git a/index.md b/index.md index 69a67944..49098f5f 100644 --- a/index.md +++ b/index.md @@ -4,7 +4,7 @@ title: Home heroText: Profectus tagline: A game engine that grows with you actionText: Get Started -actionLink: /docs/getting-started +actionLink: /guide/getting-started features: - title: Easy to Use details: Everything is written to be as intuitive to use as possible