Skip to content

Commit aba63de

Browse files
author
ebembi-crdb
committed
restore deleted files
1 parent 8e06e40 commit aba63de

File tree

5 files changed

+122
-0
lines changed

5 files changed

+122
-0
lines changed

src/current/404.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
title: Page Not Found
3+
description: "Page not found."
4+
summary: The requested CockroachDB documentation page was not found.
5+
sitemap: false
6+
search: exclude
7+
related_pages: none
8+
toc: false
9+
docs_area: 404
10+
---
11+
12+
13+
{%comment%}
14+
<script type="text/javascript">
15+
var GOOG_FIXURL_LANG = 'en';
16+
var GOOG_FIXURL_SITE = '{{ site.url }}'
17+
</script>
18+
<script type="text/javascript"
19+
src="http://linkhelp.clients.google.com/tbproxy/lh/wm/fixurl.js">
20+
</script>
21+
{%endcomment%}

src/current/index.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
title: CockroachDB Docs
3+
summary: CockroachDB is the SQL database for building global, scalable cloud services that survive disasters.
4+
# title: Home page
5+
layout: homepage
6+
homepage: true
7+
contribute: false
8+
main_homepage: true
9+
docs_area: home
10+
---

src/current/package.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"name": "cockroachdb-docs",
3+
"version": "2.0.0",
4+
"devDependencies": {
5+
"@netlify/plugin-lighthouse": "^4.0.7",
6+
"jest": "^26",
7+
"jest-cli": "^26"
8+
},
9+
"dependencies": {
10+
"@netlify/edge-functions": "^2.10.0",
11+
"front-matter": "^4.0.2",
12+
"redoc-cli": "^0.11.4",
13+
"snippet-enricher-cli": "^0.0.8",
14+
"swagger2openapi": "^7.0.5",
15+
"yaml": "^1.10.2"
16+
}
17+
}
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
#!/bin/bash
2+
3+
# Set the site URL for Jekyll
4+
site_url="https://www.cockroachlabs.com"
5+
JEKYLL_ENV="production"
6+
echo "Setting site domain to cockroachlabs.com and JEKYLL_ENV to production"
7+
8+
# Generate the _config_url.yml file
9+
echo "url: ${site_url}" > _config_url.yml
10+
11+
# Function to build the site
12+
function build {
13+
bundle exec jekyll build --trace --config _config_base.yml,$1
14+
if [[ $? != 0 ]]; then
15+
echo "Jekyll build failed."
16+
exit 1
17+
fi
18+
}
19+
20+
# Install dependencies
21+
echo "Installing dependencies..."
22+
gem install bundler --silent
23+
bundle install --quiet
24+
25+
# Build the site
26+
echo "Building the site..."
27+
build _config_cockroachdb.yml,_config_url.yml
28+
29+
# Copy necessary files for redirects and 404 handling
30+
echo "Copying redirects and 404 page..."
31+
cp _site/docs/_redirects _site/_redirects
32+
cp _site/docs/404.html _site/404.html
33+
34+
# Build the Algolia index
35+
echo "Building Algolia index..."
36+
if [[ -z "${PROD_ALGOLIA_API_KEY}" ]]; then
37+
echo "Error: PROD_ALGOLIA_API_KEY is not set. Exiting..."
38+
exit 1
39+
fi
40+
41+
ALGOLIA_API_KEY=${PROD_ALGOLIA_API_KEY} ALGOLIA_LOG_LEVEL=debug bundle exec jekyll algolia --config _config_base.yml,_config_url.yml --builds-config _config_cockroachdb.yml
42+
if [[ $? != 0 ]]; then
43+
echo "Algolia index build failed."
44+
exit 1
45+
fi
46+
47+
echo "Build completed successfully."

src/current/update-links.sh

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/bin/bash
2+
3+
sed -i '' -E 's/"..\/cockroachcloud\/connect-to-a-serverless-cluster.html/"https:\/\/www.cockroachlabs.com\/docs\/cockroachcloud\/connect-to-a-serverless-cluster/g' v23.1/connect-to-the-database.md
4+
sed -i '' -E 's/"..\/cockroachcloud\/connect-to-a-serverless-cluster.html/"https:\/\/www.cockroachlabs.com\/docs\/cockroachcloud\/connect-to-a-serverless-cluster/g' v23.1/connect-to-the-database.md
5+
sed -i '' -E 's/"..\/cockroachcloud\/transactions-page.html/"https:\/\/www.cockroachlabs.com\/docs\/cockroachcloud\/transactions-page/g' v23.1/performance-recipes.md
6+
sed -i '' -E 's/"..\/cockroachcloud\/metrics-page.html#sql-statement-contention/"https:\/\/www.cockroachlabs.com\/docs\/cockroachcloud\/metrics-page#sql-statement-contention/g' v23.1/performance-recipes.md
7+
sed -i '' -E 's/"..\/cockroachcloud\/metrics-page.html#transaction-restarts/"https:\/\/www.cockroachlabs.com\/docs\/cockroachcloud\/metrics-page#transaction-restarts/g' v23.1/performance-recipes.md
8+
sed -i '' -E 's/"..\/releases\/\{\{page.version.version\}\}.html/"https:\/\/www.cockroachlabs.com\/docs\/releases\/\{\{page.version.version\}\}/g' v23.1/install-cockroachdb-linux.md
9+
sed -i '' -E 's/"..\/tutorials\/demo-json-support-interactive.html/"https:\/\/www.cockroachlabs.com\/docs\/tutorials\/demo-json-support-interactive/g' v23.1/demo-json-support.md
10+
sed -i '' -E 's/"..\/cockroachcloud\/create-your-cluster.html/"https:\/\/www.cockroachlabs.com\/docs\/cockroachcloud\/create-your-cluster/g' v23.1/index.md
11+
sed -i '' -E 's/"..\/releases\/\{\{page.version.version\}\}.html/"https:\/\/www.cockroachlabs.com\/docs\/releases\/\{\{page.version.version\}\}/g' v23.1/index.md
12+
sed -i '' -E 's/"..\/releases\/index.html/"https:\/\/www.cockroachlabs.com\/docs\/releases\/index/g' v23.1/index.md
13+
sed -i '' -E 's/"..\/releases\/release-support-policy.html/"https:\/\/www.cockroachlabs.com\/docs\/releases\/release-support-policy/g' v23.1/index.md
14+
sed -i '' -E 's/"..\/releases\/\{\{ page.version.version \}\}.html#\{\{ r.release_name | replace: '.', '-' \}\}/"https:\/\/www.cockroachlabs.com\/docs\/releases\/\{\{ page.version.version \}\}#\{\{ r.release_name | replace: '.', '-' \}\}/g' v23.1/fips.md
15+
sed -i '' -E 's/"..\/cockroachcloud\/quickstart.html/"https:\/\/www.cockroachlabs.com\/docs\/cockroachcloud\/quickstart/g' v23.1/choose-a-deployment-option.md
16+
sed -i '' -E 's/"..\/cockroachcloud\/serverless-faqs.html#what-is-a-request-unit/"https:\/\/www.cockroachlabs.com\/docs\/cockroachcloud\/serverless-faqs#what-is-a-request-unit/g' v23.1/choose-a-deployment-option.md
17+
sed -i '' -E 's/"..\/cockroachcloud\/quickstart-trial-cluster.html/"https:\/\/www.cockroachlabs.com\/docs\/cockroachcloud\/quickstart-trial-cluster/g' v23.1/choose-a-deployment-option.md
18+
sed -i '' -E 's/"..\/releases\/\{\{page.version.version\}\}.html/"https:\/\/www.cockroachlabs.com\/docs\/releases\/\{\{page.version.version\}\}/g' v23.1/install-cockroachdb-windows.md
19+
sed -i '' -E 's/"..\/tutorials\/demo-spatial-tutorial-interactive.html/"https:\/\/www.cockroachlabs.com\/docs\/tutorials\/demo-spatial-tutorial-interactive/g' v23.1/spatial-tutorial.md
20+
sed -i '' -E 's/"..\/releases\/\{\{page.version.version\}\}.html/"https:\/\/www.cockroachlabs.com\/docs\/releases\/\{\{page.version.version\}\}/g' v23.1/install-cockroachdb-mac.md
21+
22+
sed -i '' -E 's/"..\/sso-db-console.html/"{% link {{ page.version.version }}\/sso-db-console.md %}/g' v23.1/security-reference/security-overview.md
23+
sed -i '' -E 's/"..\/gssapi_authentication.html/"{% link {{ page.version.version }}\/gssapi_authentication.md %}/g' v23.1/security-reference/security-overview.md
24+
25+
sed -i '' -E 's/"..\/sql-audit-logging.html/"{% link {{ page.version.version }}\/sql-audit-logging.md %}/g' v23.1/security-reference/security-overview.md
26+
sed -i '' -E 's/"..\/demo-fault-tolerance-and-recovery.html/"{% link {{ page.version.version }}\/demo-fault-tolerance-and-recovery.md %}/g' v23.1/security-reference/security-overview.md
27+
sed -i '' -E 's/"..\/demo-fault-tolerance-and-recovery.html/"{% link {{ page.version.version }}\/demo-fault-tolerance-and-recovery.md %}/g' v23.1/security-reference/security-overview.md

0 commit comments

Comments
 (0)