Skip to content
Merged
Changes from all commits
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
24 changes: 8 additions & 16 deletions .github/workflows/move-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,28 +57,20 @@ jobs:
echo "nav_sort: case_insensitive" >> build/nplex/docs/_config.yml
echo "baseurl: /hackatonIOTA-MC" >> build/nplex/docs/_config.yml

# Prepare Frontmatter for the home page (README.md)
sed -i "1i---\nlayout: home\ntitle: Home\nnav_order: 1\n---\n" build/nplex/docs/index.md

# Create a Parent Category Page for the Move Modules so they spawn in the Sidebar
echo -e "---\nlayout: default\ntitle: Nplex Smart Contracts\nnav_order: 2\nhas_children: true\n---\n\nQuesta sezione contiene la documentazione tecnica dei moduli Move." > build/nplex/docs/modules_index.md

# Prepare Jekyll Frontmatter for sidebar navigation (tree view)
# We add this to every Move module markdown file
for md in build/nplex/docs/nplex/*.md; do
filename=$(basename "$md" .md)
# Prepend frontmatter using sed
sed -i "1i---\ntitle: $filename\nparent: Nplex Smart Contracts\n---\n" "$md"
# Prepend frontmatter using sed so it appears inside the left sidebar hierarchy
sed -i "1i---\nlayout: default\ntitle: $filename\nparent: Nplex Smart Contracts\n---\n" "$md"
done

# Prepare Frontmatter for the home page (README.md)
sed -i "1i---\ntitle: Home\nnav_order: 1\n---\n" build/nplex/docs/index.md

# Correct way to inject custom global CSS in 'just-the-docs'
# We download it as a plain CSS file inside assets, then include it in the HTML Head.
mkdir -p build/nplex/docs/assets/css
mkdir -p build/nplex/docs/_includes

# Fetch FE globals.css directly from private repository
curl -H "Authorization: token ${{ secrets.GH_PAT_CLASSIC }}" -sL "https://raw.githubusercontent.com/Sernior/hackatonIOTA-FE/main/src/app/globals.css" > build/nplex/docs/assets/css/globals.css || true

# Add a custom tag inside the document HEAD to load the globals.css styles
echo "<link rel=\"stylesheet\" href=\"{{ '/assets/css/globals.css' | relative_url }}\">" > build/nplex/docs/_includes/head_custom.html

- name: Deploy to GitHub Pages
# Run deploy only on push to main, skip on PRs
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
Expand Down
Loading