updates?
This commit is contained in:
@@ -7,13 +7,22 @@ echo "Currently compiling pages: ${KEEP_PAGES}"
|
||||
# Rewrite base _meta.js and next.config.js for export pages
|
||||
echo "Rewrite base _meta.js and keeping ${KEEP_PAGES}"
|
||||
|
||||
$first =~ s@(\w+\d+.*)\s*:\s*(\{\s+.+\s+.+)\s+.+\s+.+\s+.+\s+(\},)@$1_link:$2\n href: \x27/$1\x27\n $3@gmx
|
||||
cp ./${KEEP_PAGES}/_meta.js ../content/_meta.js
|
||||
|
||||
perl -0777 -pe first -i ./content/_meta.js
|
||||
# remove other subdirectories
|
||||
for dir in ../content/; do
|
||||
if [ "$dir" != "${KEEP_PAGES}/" ]; then
|
||||
rm -rf $dir
|
||||
fi
|
||||
done
|
||||
|
||||
$second =~ s@@${KEEP_PAGES}:$2\n theme:{\n timestamp: true,\n }\n $3@gmx
|
||||
# remove public directory
|
||||
for dir in ../public/; do
|
||||
if [ "$dir" != "${KEEP_PAGES}/" ]; then
|
||||
rm -rf $dir
|
||||
fi
|
||||
done
|
||||
|
||||
echo "Done clearing up resources and compiling for ${KEEP_PAGES}"
|
||||
|
||||
# Write saved pages back
|
||||
perl -0777 -pe '' -i ./content/_meta.js
|
||||
# cat ./content/_meta.js
|
||||
|
||||
|
||||
Reference in New Issue
Block a user