Skip to content

Commit

Permalink
Allow running build.sh locally
Browse files Browse the repository at this point in the history
  • Loading branch information
rukai committed Sep 10, 2023
1 parent 31cce20 commit c973ea0
Show file tree
Hide file tree
Showing 17 changed files with 32 additions and 1,421 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
shotover-proxy
node_modules
node_modules
docs/.vitepress/dist
docs/docs/latest
8 changes: 8 additions & 0 deletions build-and-serve.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

set -e
set -u

./build.sh
cd docs/.vitepress/dist
python3 -m http.server
14 changes: 5 additions & 9 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,18 @@
set -e
set -u

rm docs/docs/*.md
rm -rf docs/docs/examples
rm -rf docs/docs/user-guide
git clone https://github.com/shotover/shotover-proxy.git
mv shotover-proxy/docs/src/* docs/docs/
git clone https://github.com/shotover/shotover-proxy.git --depth 1
rm -rf docs/docs/latest
mv shotover-proxy/docs/src docs/docs/latest
rm -rf shotover-proxy
cd docs/docs/
cd docs/docs/latest
find . -type f -name "*.md" -exec sed -i 's/```YAML/```yaml/g' {} +
find . -type f -name "*.md" -exec sed -i 's/```console/```make/g' {} +
rm logo.png logo.svg index.md SUMMARY.md
cd ../../
cd ../../../
npm install --frozen-lockfile
echo "<Footer />" | tee -a docs/blog/*.md
echo "<Footer />" | tee -a docs/docs/*.md
echo "<SocialButtons /><RelatedPosts /><Footer />" | tee -a docs/blog/**/*.md
echo "<Footer />" | tee -a docs/docs/**/*.md
npm run docs:build
cd docs/.vitepress/
mkdir shotover-blog
Expand Down
10 changes: 5 additions & 5 deletions docs/.vitepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default {
},

nav: [
{ text: 'Docs', link: '/docs/user-guide/introduction' },
{ text: 'Docs', link: '/docs/latest/user-guide/introduction' },
//{ text: 'Blog', link: '/blog/' },
{ text: 'Github', link: 'https://github.com/shotover/shotover-proxy' },
],
Expand Down Expand Up @@ -76,7 +76,7 @@ export default {
subtitle2: '',
motto: '',
actionBtnText: 'Get started',
actionBtnLink: '/docs/user-guide/getting-started',
actionBtnLink: '/docs/latest/user-guide/getting-started',

description: {
title: 'What is Shotover?',
Expand All @@ -89,17 +89,17 @@ export default {
{
name: 'Introduction',
description: 'For more information on what Shotover Proxy is, why it exists and some of the underlying philosophies behind it.',
link: '/docs/user-guide/introduction'
link: '/docs/latest/user-guide/introduction'
},
{
name: 'Getting started',
description: 'For details on how to jump straight in and get up running.',
link: '/docs/user-guide/getting-started'
link: '/docs/latest/user-guide/getting-started'
},
{
name: 'Concepts',
description: 'For a deeper dive into some of the fundamental Shotover concepts.',
link: '/docs/user-guide/concepts'
link: '/docs/latest/user-guide/concepts'
}
]
},
Expand Down
22 changes: 11 additions & 11 deletions docs/docs/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@ export default [
{
text: 'User Guide',
items: [
{ text: 'Introduction', link: '/docs/user-guide/introduction' },
{ text: 'Getting Started', link: '/docs/user-guide/getting-started' },
{ text: 'Concepts', link: '/docs/user-guide/concepts' },
{ text: 'Configuration', link: '/docs/user-guide/configuration' },
{ text: 'Observability', link: '/docs/user-guide/observability' }
{ text: 'Introduction', link: '/docs/latest/user-guide/introduction' },
{ text: 'Getting Started', link: '/docs/latest/user-guide/getting-started' },
{ text: 'Concepts', link: '/docs/latest/user-guide/concepts' },
{ text: 'Configuration', link: '/docs/latest/user-guide/configuration' },
{ text: 'Observability', link: '/docs/latest/user-guide/observability' }
]
},
{
items: [
{ text: 'Source Types', link: '/docs/source-types' }
{ text: 'Source Types', link: '/docs/latest/source-types' }
]
},
{
items: [
{ text: 'Transforms', link: '/docs/transforms' }
{ text: 'Transforms', link: '/docs/latest/transforms' }
]
},
{
Expand All @@ -25,21 +25,21 @@ export default [
{
text: 'Redis Cluster',
items: [
{ text: 'Unaware client', link: '/docs/examples/redis-clustering-unaware' },
{ text: 'Aware client', link: '/docs/examples/redis-clustering-aware' }
{ text: 'Unaware client', link: '/docs/latest/examples/redis-clustering-unaware' },
{ text: 'Aware client', link: '/docs/latest/examples/redis-clustering-aware' }
]
},
{
text: 'Cassandra Cluster',
items: [
{ text: 'Shotover sidecars', link: '/docs/examples/cassandra-cluster-shotover-sidecar' }
{ text: 'Shotover sidecars', link: '/docs/latest/examples/cassandra-cluster-shotover-sidecar' }
]
}
]
},
{
items: [
{ text: 'Contributing', link: '/docs/contributing' }
{ text: 'Contributing', link: '/docs/latest/contributing' }
]
}
]
91 changes: 0 additions & 91 deletions docs/docs/contributing.md

This file was deleted.

144 changes: 0 additions & 144 deletions docs/docs/examples/cassandra-cluster-shotover-sidecar.md

This file was deleted.

Loading

0 comments on commit c973ea0

Please sign in to comment.