forked from LaconicNetwork/kompose
Merge pull request #629 from cdrage/update-release-script-againn
Fix adding Jekyll format to the top
This commit is contained in:
commit
033886c573
@ -30,6 +30,28 @@ cd "$DOCS_REPO_NAME"
|
|||||||
git checkout gh-pages
|
git checkout gh-pages
|
||||||
git checkout master docs
|
git checkout master docs
|
||||||
|
|
||||||
|
# Remove README.md from docs folder as it isn't relevant
|
||||||
|
rm docs/README.md
|
||||||
|
|
||||||
|
# Use quickstart.md instead as the main index page
|
||||||
|
mv docs/quickstart.md index.md
|
||||||
|
|
||||||
|
# Check that index.md has the appropriate Jekyll format
|
||||||
|
index="index.md"
|
||||||
|
if cat $index | head -n 1 | grep "\-\-\-";
|
||||||
|
then
|
||||||
|
echo "index.md already contains Jekyll format"
|
||||||
|
else
|
||||||
|
# Remove ".md" from the name
|
||||||
|
name=${index::-3}
|
||||||
|
echo "Adding Jekyll file format to $index"
|
||||||
|
jekyll="---
|
||||||
|
layout: default
|
||||||
|
---
|
||||||
|
"
|
||||||
|
echo -e "$jekyll\n$(cat $index)" > $index
|
||||||
|
fi
|
||||||
|
|
||||||
# clean-up the docs and convert to jekyll-friendly docs
|
# clean-up the docs and convert to jekyll-friendly docs
|
||||||
cd docs
|
cd docs
|
||||||
for filename in *.md; do
|
for filename in *.md; do
|
||||||
@ -50,12 +72,6 @@ permalink: /$name/
|
|||||||
done
|
done
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
# Remove README.md from docs folder as it isn't relevant
|
|
||||||
rm docs/README.md
|
|
||||||
|
|
||||||
# Use quickstart.md instead as the main index page
|
|
||||||
mv docs/quickstart.md index.md
|
|
||||||
|
|
||||||
# add relevant user information
|
# add relevant user information
|
||||||
git config user.name "$DOCS_USER"
|
git config user.name "$DOCS_USER"
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user