Skip to content

Commit 654e28a

Browse files
change wording to better communicate intent
Signed-off-by: lianmakesthings <[email protected]>
1 parent 58689d2 commit 654e28a

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed

website/Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ serve:
1414

1515
production-build:
1616
git submodule update --init --recursive
17-
./duplicate_pages.sh
17+
./duplicate_missing_content.sh
1818
hugo \
1919
--minify
2020
npx -y pagefind --site public
2121

2222
preview-build:
2323
git submodule update --init --recursive
24-
./duplicate_pages.sh
24+
./duplicate_missing_content.sh
2525
hugo \
2626
--baseURL $(DEPLOY_PRIME_URL) \
2727
--buildDrafts \

website/duplicate_missing_content.sh

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/bash
2+
#
3+
# This script duplicates the content of the default language to all other languages under content/
4+
#
5+
6+
ROOT="content"
7+
DEFAULT_LANG="en"
8+
9+
duplicate_pages() {
10+
if [ $1 != $ROOT/$DEFAULT_LANG ]; then
11+
# -R to handle directories
12+
# -n to avoid overwriting existing files
13+
# -L to follow symlinks
14+
cp -R -n -L $ROOT/$DEFAULT_LANG/* $1
15+
fi
16+
}
17+
18+
for d in $ROOT/*; do
19+
duplicate_pages $d
20+
done

0 commit comments

Comments
 (0)