Skip to content

Commit aacfda0

Browse files
committed
Restore serving json schemas
Without the submodule, do a git clone to restore serving the schemas through the website. Update latest version to v0.1.2. Signed-off-by: Andrea Frittoli <[email protected]>
1 parent 58458e7 commit aacfda0

File tree

3 files changed

+11
-14
lines changed

3 files changed

+11
-14
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ serve:
1212

1313
.PHONY: production-build
1414
production-build:
15-
# ./scripts/build-static.sh
15+
./scripts/build-static.sh
1616
hugo --baseURL $(URL)
1717

1818
.PHONY: preview-build
1919
preview-build:
20-
# ./scripts/build-static.sh
20+
./scripts/build-static.sh
2121
hugo --baseURL $(DEPLOY_PRIME_URL)

config.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ archived_version = false
112112
# The version number for the version of the docs represented in this doc set.
113113
# Used in the "version-banner" partial to display a version number for the
114114
# current doc set.
115-
version = "v0.1.1"
115+
version = "v0.1.2"
116116

117117
# A link to latest version of the docs. Used in the "version-banner" partial to
118118
# point people to the main doc site.
@@ -125,9 +125,9 @@ url_latest_version = "https://cdevents.dev/docs"
125125
version = "latest"
126126
url = "https://cdevents.dev/docs"
127127

128-
#[[params.versions]]
129-
# version = "v0.1.1"
130-
# url = "https://github.com/cdevents/spec/tree/v0.1.1"
128+
[[params.versions]]
129+
version = "v0.1.1"
130+
url = "https://github.com/cdevents/spec/tree/v0.1.1/spec.md"
131131

132132
[[params.versions]]
133133
version = "v0.1.0"

scripts/build-static.sh

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@ set -exo pipefail
55

66
BASE_DIR="$( cd "$( dirname "$0" )/.." >/dev/null 2>&1 && pwd )"
77
STATIC_DIR="${BASE_DIR}/static"
8-
DOCS_DIR="${BASE_DIR}/content/en/docs"
8+
DOCS_DIR="$(mktemp -d)"
9+
10+
# Clone the spec repo to pull the schemas
11+
git clone https://github.com/cdevents/spec ${DOCS_DIR}
912

1013
# Serve versioned schemas
11-
cd ${DOCS_DIR}
12-
ORIGINAL_REVISION=$(git rev-parse HEAD)
14+
cd "${DOCS_DIR}"
1315
for tag in $(git tag); do
1416
# Get the version by trimming the "v"
1517
version=$(printf $tag | sed 's/^v//g')
@@ -25,8 +27,3 @@ for tag in $(git tag); do
2527
cp ${schema} ${TARGET_SCHEMA_FOLDER}/${TARGET_SCHEMA}
2628
done
2729
done
28-
git checkout ${ORIGINAL_REVISION}
29-
30-
# Serve static images
31-
cp ${DOCS_DIR}/images/* ${STATIC_DIR}/images/
32-
sed -i -e 's/\(images\/[a-zA-Z\-]*\.svg\)/\/\1/g' ${DOCS_DIR}/*.md

0 commit comments

Comments
 (0)