Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#492] feat(doc): Document website framework #512

Merged
merged 5 commits into from
Oct 17, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions docs/launch-docs-website.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function copy_docs() {

# Copy all markdown files to the Hugo website docs directory
# 1. Copy all root directory markdown files
cp ${bin}/*.md ${bin}/build/web/content/docs
rsync -av --exclude='README.md' ${bin}/*.md ${bin}/build/web/content/docs

# 2. Copy all subdirectory markdown files
subDirs=$(find "${bin}" -type d -mindepth 1 -maxdepth 1)
Expand All @@ -71,11 +71,11 @@ function launch_website() {
fi

if [ ! -d "${bin}/build/hugo" ]; then
Copy link
Member Author

@xunliu xunliu Oct 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think, That's the way it should be.

  if [ ! -f "${bin}/build/hugo" ]; then
    if [ ! -f "${bin}/build/${HUGO_PACKAGE_NAME}" ]; then
      wget -q -P "${bin}/build" ${HUGO_DOWNLOAD_URL}
    fi
    tar -xzf "${bin}/build/${HUGO_PACKAGE_NAME}" -C "${bin}/build"
  fi

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not a big deal, I think we can improve the script later on.

if [ ! -f "${bin}/build/${HUGO_PACKAGE_NAME}" ]; then
curl -L -o "${bin}/build" ${HUGO_DOWNLOAD_URL}
if [ ! -f "${bin}/build/hugo" ]; then
wget -q -P "${bin}/build" ${HUGO_DOWNLOAD_URL}
tar -xzf "${bin}/build/${HUGO_PACKAGE_NAME}" -C "${bin}/build"
rm -rf "${bin}/build/${HUGO_PACKAGE_NAME}"
fi
tar -xzf "${bin}/build/${HUGO_PACKAGE_NAME}" -C "${bin}/build"
rm -rf "${bin}/build/${HUGO_PACKAGE_NAME}"
fi

# Remove the old Hugo website
Expand Down
Loading