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

deps(website): upgrade vuepress 1.x to 2.x #2980

Merged
merged 21 commits into from
Jan 18, 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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@ output
.cover
.terraform/
node_modules/
**/.vuepress/dist
**/.vuepress/*
helm/test-values.yaml
*.swp
golangci-lint
atlantis
.devcontainer
atlantis.env
*.act
package-lock.json

# gitreleaser
dist/
Expand Down
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{
"license": "Apache-2.0",
"devDependencies": {
"@vuepress/plugin-google-analytics": "^1.9.7",
"vuepress": "^1.9.7"
"@vuepress/plugin-docsearch": "^2.0.0-beta.60",
"@vuepress/plugin-google-analytics": "^2.0.0-beta.60",
"vuepress": "^2.0.0-beta.60"
},
"scripts": {
"website:dev": "vuepress dev runatlantis.io",
Expand Down
144 changes: 99 additions & 45 deletions runatlantis.io/.vuepress/config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,39 @@
module.exports = {
title: 'Atlantis',
description: 'Atlantis: Terraform Pull Request Automation',
import { googleAnalyticsPlugin } from '@vuepress/plugin-google-analytics'
import { docsearchPlugin } from '@vuepress/plugin-docsearch'
import { getDirname, path } from '@vuepress/utils'
import { defaultTheme, defineUserConfig } from 'vuepress'

const __dirname = getDirname(import.meta.url)

export default defineUserConfig({
alias: {
'@theme/Home.vue': path.resolve(__dirname, './theme/components/Home.vue'),
},
locales: {
'/': {
lang: 'en-US',
title: 'Atlantis',
description: 'Atlantis: Terraform Pull Request Automation',
},
/*
'/es/': {
lang: 'es-ES',
title: 'Atlantis',
description: 'Atlantis: Automatización de Pull Requests para Terraform',
},
nitrocode marked this conversation as resolved.
Show resolved Hide resolved
*/
},
plugins: [
['@vuepress/google-analytics', { ga: "UA-6850151-3", }]
googleAnalyticsPlugin({
id: 'UA-6850151-3',
}),
docsearchPlugin({
// We internally discussed how this API key is exposed in the code and decided
// that it is a non-issue because this API key can easily be extracted by
// looking at the browser dev tools since the key is used in the API requests.
apiKey: '3b733dff1539ca3a210775860301fa86',
indexName: 'runatlantis',
}),
],
head: [
['link', { rel: 'icon', type: 'image/png', href: '/favicon-196x196.png', sizes: '196x196' }],
Expand All @@ -18,29 +49,43 @@ module.exports = {
['link', { rel: 'apple-touch-icon-precomposed', sizes: '120x120', href: '/apple-touch-icon-120x120.png' }],
['link', { rel: 'apple-touch-icon-precomposed', sizes: '76x76', href: '/apple-touch-icon-76x76.png' }],
['link', { rel: 'apple-touch-icon-precomposed', sizes: '152x152', href: '/apple-touch-icon-152x152.png' }],
['meta', {name: 'msapplication-TileColor', content: '#FFFFFF' }],
['meta', {name: 'msapplication-TileImage', content: '/mstile-144x144.png' }],
['meta', {name: 'msapplication-square70x70logo', content: '/mstile-70x70.png' }],
['meta', {name: 'msapplication-square150x150logo', content: '/mstile-150x150.png' }],
['meta', {name: 'msapplication-wide310x150logo', content: '/mstile-310x150.png' }],
['meta', {name: 'msapplication-square310x310logo', content: '/mstile-310x310.png' }],
['meta', { name: 'msapplication-TileColor', content: '#FFFFFF' }],
['meta', { name: 'msapplication-TileImage', content: '/mstile-144x144.png' }],
['meta', { name: 'msapplication-square70x70logo', content: '/mstile-70x70.png' }],
['meta', { name: 'msapplication-square150x150logo', content: '/mstile-150x150.png' }],
['meta', { name: 'msapplication-wide310x150logo', content: '/mstile-310x150.png' }],
['meta', { name: 'msapplication-square310x310logo', content: '/mstile-310x310.png' }],
['link', { rel: 'stylesheet', sizes: '152x152', href: 'https://fonts.googleapis.com/css?family=Lato:400,900' }],
['meta', {name: 'google-site-verification', content: 'kTnsDBpHqtTNY8oscYxrQeeiNml2d2z-03Ct9wqeCeE' }]
['meta', { name: 'google-site-verification', content: 'kTnsDBpHqtTNY8oscYxrQeeiNml2d2z-03Ct9wqeCeE' }],
],
themeConfig: {
docsBranch: "main",
themePlugins: {
activeHeaderLinks: false,
algolia: {
apiKey: '3b733dff1539ca3a210775860301fa86',
indexName: 'runatlantis'
},
},
theme: defaultTheme({
docsBranch: "main",
logo: '/hero.png',
nav: [
{text: 'Home', link: '/'},
{text: 'Guide', link: '/guide/'},
{text: 'Docs', link: '/docs/'},
{text: 'Blog', link: 'https://medium.com/runatlantis'}
],
locales: {
'/': {
selectLanguageName: 'English',
navbar: [
{ text: 'Home', link: '/' },
{ text: 'Guide', link: '/guide/' },
{ text: 'Docs', link: '/docs/' },
{ text: 'Blog', link: 'https://medium.com/runatlantis' },
],
},
/*
'/es/': {
selectLanguageName: 'Spanish',
navbar: [
{ text: 'Home', link: '/es/' },
{ text: 'Guide', link: '/es/guide/' },
{ text: 'Docs', link: '/es/docs/' },
{ text: 'Blog', link: 'https://medium.com/runatlantis' },
],
},
nitrocode marked this conversation as resolved.
Show resolved Hide resolved
*/
},
sidebar: {
'/guide/': [
'',
Expand All @@ -49,23 +94,26 @@ module.exports = {
],
'/docs/': [
{
title: 'Installing Atlantis',
collapsable: true,
text: 'Installing Atlantis',
collapsible: true,
children: [
'installation-guide',
'requirements',
'access-credentials',
'webhook-secrets',
'deployment',
'configuring-webhooks',
'provider-credentials'
'provider-credentials',
]
},
{
title: 'Configuring Atlantis',
collapsable: true,
text: 'Configuring Atlantis',
collapsible: true,
children: [
['configuring-atlantis', 'Overview'],
{
text: 'Overview',
link: 'configuring-atlantis',
},
'server-configuration',
'server-side-repo-config',
'pre-workflow-hooks',
Expand All @@ -80,37 +128,43 @@ module.exports = {
'terraform-cloud',
'using-slack-hooks',
'stats',
'faq'
'faq',
]
},
{
title: 'Using Atlantis',
collapsable: true,
text: 'Using Atlantis',
collapsible: true,
children: [
['using-atlantis', 'Overview']
{
text: 'Overview',
link: 'using-atlantis',
},
]
},
{
title: 'How Atlantis Works',
collapsable: true,
text: 'How Atlantis Works',
collapsible: true,
children: [
['how-atlantis-works', 'Overview'],
{
text: 'Overview',
link: 'how-atlantis-works',
},
'locking',
'autoplanning',
'automerging',
'security'
'security',
]
},
{
title: 'Real-time Terraform Logs',
collapsable: true,
text: 'Real-time Terraform Logs',
collapsible: true,
children: [
'streaming-logs'
'streaming-logs',
]
},
{
title: 'Troubleshooting',
collapsable: true,
text: 'Troubleshooting',
collapsible: true,
children: [
'troubleshooting-https',
]
Expand All @@ -119,6 +173,6 @@ module.exports = {
},
repo: 'runatlantis/atlantis',
docsDir: 'runatlantis.io',
editLinks: true,
}
}
editLink: true,
})
})
41 changes: 41 additions & 0 deletions runatlantis.io/.vuepress/styles/index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
.theme-container {
&.home-custom {
.hero {
h1 {
font-size: 64px;
font-family: Lato, sans-serif;
font-weight: 900;
color: #222;
}
img {
height: 200px;
}
}
p {
&.description {
position: relative;
&:before {
position: absolute;
content: '';
width: 40px;
height: 3px;
top: -19px;
left: 50%;
margin-left: -20px;
background: #f36;
}
}
}
.feature {
h2 {
color: #222;
}
p {
color: #222;
}
}
}
}
.sidebar-heading {
font-size: inherit;
}
38 changes: 0 additions & 38 deletions runatlantis.io/.vuepress/styles/index.styl

This file was deleted.

4 changes: 4 additions & 0 deletions runatlantis.io/.vuepress/styles/palette.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
$accentColor: #0074db;
$textColor: #2c3e50;
$borderColor: #eaecef;
$codeBgColor: #282c34;
4 changes: 0 additions & 4 deletions runatlantis.io/.vuepress/styles/palette.styl

This file was deleted.

Loading