File tree 2 files changed +22
-2
lines changed
2 files changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -14,14 +14,14 @@ serve:
14
14
15
15
production-build :
16
16
git submodule update --init --recursive
17
- ./duplicate_pages .sh
17
+ ./duplicate_missing_content .sh
18
18
hugo \
19
19
--minify
20
20
npx -y pagefind --site public
21
21
22
22
preview-build :
23
23
git submodule update --init --recursive
24
- ./duplicate_pages .sh
24
+ ./duplicate_missing_content .sh
25
25
hugo \
26
26
--baseURL $(DEPLOY_PRIME_URL ) \
27
27
--buildDrafts \
Original file line number Diff line number Diff line change
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
You can’t perform that action at this time.
0 commit comments