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

docs: refactor navbar and sidebar out of config #4523

Merged
merged 5 commits into from
May 8, 2024
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
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ output
.cover
.terraform/
node_modules/
**/.vuepress/*
helm/test-values.yaml
*.swp
golangci-lint
Expand All @@ -27,3 +26,9 @@ tmp-CHANGELOG.md

# IDE files
*.code-workspace

# vuepress
**/.vuepress/*
!runatlantis.io/.vuepress/config.*
!runatlantis.io/.vuepress/navbar.*
!runatlantis.io/.vuepress/sidebar.*
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"@vuepress/theme-default": "2.0.0-rc.21",
"@vuepress/utils": "2.0.0-rc.9",
"sass-loader": "14.1.1",
"vuepress": "2.0.0-rc.9",
"vue": "3.4.21"
"vue": "3.4.21",
"vuepress": "2.0.0-rc.9"
},
"scripts": {
"website:dev": "vuepress dev runatlantis.io",
Expand Down
34 changes: 17 additions & 17 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

96 changes: 4 additions & 92 deletions runatlantis.io/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import { defaultTheme } from '@vuepress/theme-default';
import { defineUserConfig } from 'vuepress';
import { sitemapPlugin } from '@vuepress/plugin-sitemap';
import { webpackBundler } from '@vuepress/bundler-webpack';
import navbar from "./navbar";
import sidebar from "./sidebar";

const __dirname = getDirname(import.meta.url)

Expand Down Expand Up @@ -85,12 +87,7 @@ export default defineUserConfig({
locales: {
'/': {
selectLanguageName: 'English',
navbar: [
{ text: 'Home', link: '/' },
{ text: 'Guide', link: '/guide/' },
{ text: 'Docs', link: '/docs/' },
{ text: 'Blog', link: 'https://medium.com/runatlantis' },
],
navbar: navbar.en,
},
/*
'/es/': {
Expand All @@ -104,92 +101,7 @@ export default defineUserConfig({
},
*/
},
sidebar: {
'/guide/': [
'/guide/',
'/guide/test-drive',
'/guide/testing-locally',
],
'/docs/': [
{
text: 'Installing Atlantis',
collapsible: true,
children: [
'/docs/installation-guide',
'/docs/requirements',
'/docs/access-credentials',
'/docs/webhook-secrets',
'/docs/deployment',
'/docs/configuring-webhooks',
'/docs/provider-credentials',
]
},
{
text: 'Configuring Atlantis',
collapsible: true,
children: [
{
text: 'Overview',
link: '/docs/configuring-atlantis',
},
'/docs/server-configuration',
'/docs/server-side-repo-config',
'/docs/pre-workflow-hooks',
'/docs/post-workflow-hooks',
'/docs/policy-checking',
'/docs/custom-workflows',
'/docs/repo-level-atlantis-yaml',
'/docs/upgrading-atlantis-yaml',
'/docs/command-requirements',
'/docs/checkout-strategy',
'/docs/terraform-versions',
'/docs/terraform-cloud',
'/docs/using-slack-hooks',
'/docs/stats',
'/docs/faq',
]
},
{
text: 'Using Atlantis',
collapsible: true,
children: [
{
text: 'Overview',
link: '/docs/using-atlantis',
},
'/docs/api-endpoints',
]
},
{
text: 'How Atlantis Works',
collapsible: true,
children: [
{
text: 'Overview',
link: '/docs/how-atlantis-works',
},
'/docs/locking',
'/docs/autoplanning',
'/docs/automerging',
'/docs/security',
]
},
{
text: 'Real-time Terraform Logs',
collapsible: true,
children: [
'/docs/streaming-logs',
]
},
{
text: 'Troubleshooting',
collapsible: true,
children: [
'/docs/troubleshooting-https',
]
}
]
},
sidebar: sidebar.en,
repo: 'runatlantis/atlantis',
docsDir: 'runatlantis.io',
editLink: true,
Expand Down
8 changes: 8 additions & 0 deletions runatlantis.io/.vuepress/navbar.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
const en = [
{ text: 'Home', link: '/' },
{ text: 'Guide', link: '/guide/' },
{ text: 'Docs', link: '/docs/' },
{ text: 'Blog', link: 'https://medium.com/runatlantis' },
];

export default { en };
88 changes: 88 additions & 0 deletions runatlantis.io/.vuepress/sidebar.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
const en = {
'/guide/': [
'/guide/',
'/guide/test-drive',
'/guide/testing-locally',
],
'/docs/': [
{
text: 'Installing Atlantis',
collapsible: true,
children: [
'/docs/installation-guide',
'/docs/requirements',
'/docs/access-credentials',
'/docs/webhook-secrets',
'/docs/deployment',
'/docs/configuring-webhooks',
'/docs/provider-credentials',
]
},
{
text: 'Configuring Atlantis',
collapsible: true,
children: [
{
text: 'Overview',
link: '/docs/configuring-atlantis',
},
'/docs/server-configuration',
'/docs/server-side-repo-config',
'/docs/pre-workflow-hooks',
'/docs/post-workflow-hooks',
'/docs/policy-checking',
'/docs/custom-workflows',
'/docs/repo-level-atlantis-yaml',
'/docs/upgrading-atlantis-yaml',
'/docs/command-requirements',
'/docs/checkout-strategy',
'/docs/terraform-versions',
'/docs/terraform-cloud',
'/docs/using-slack-hooks',
'/docs/stats',
'/docs/faq',
]
},
{
text: 'Using Atlantis',
collapsible: true,
children: [
{
text: 'Overview',
link: '/docs/using-atlantis',
},
'/docs/api-endpoints',
]
},
{
text: 'How Atlantis Works',
collapsible: true,
children: [
{
text: 'Overview',
link: '/docs/how-atlantis-works',
},
'/docs/locking',
'/docs/autoplanning',
'/docs/automerging',
'/docs/security',
]
},
{
text: 'Real-time Terraform Logs',
collapsible: true,
children: [
'/docs/streaming-logs',
]
},
{
text: 'Troubleshooting',
collapsible: true,
children: [
'/docs/troubleshooting-https',
]
}
]
};

export default { en };
Loading