Skip to content

Publish Mendix Docs to Siemens Support Center - #11897

Draft
MarkvanMents wants to merge 18 commits into
developmentfrom
MvM-PublishToSiemens
Draft

Publish Mendix Docs to Siemens Support Center#11897
MarkvanMents wants to merge 18 commits into
developmentfrom
MvM-PublishToSiemens

Conversation

@MarkvanMents

Copy link
Copy Markdown
Collaborator

Summary

  • Adds a Hugo environment configuration (config/siemens-internal/) for building the Mendix docs site for deployment to the Siemens internal documentation portal at https://internal.docs.sw.siemens.com/...
  • Fixes font and asset path issues caused by the deep deployment URL using canonifyURLs and relative font paths in CSS
  • Adds _scripts/add-index-html-links.sh, a post-processing script that rewrites directory-style href links (including links with anchors) to explicit /index.html links, required because the Siemens server does not serve directory indexes automatically

Build instructions

node_modules/.bin/hugo --environment siemens-internal --cleanDestinationDir
bash _scripts/add-index-html-links.sh public \
  https://internal.docs.sw.siemens.com/documentation/internal/PL20260323299104942/en-US/Mendix-Docs/public/

Test plan

  • Build the site with the siemens-internal environment and verify no build errors
  • Run add-index-html-links.sh and verify the file count matches the number of HTML files
  • Check that internal page links (nav, breadcrumbs, content) include index.html
  • Check that anchor links (e.g. /page/#section) are rewritten to /page/index.html#section
  • Check that external links, CSS, and image paths are unchanged
  • Deploy to Siemens internal portal and verify pages load correctly

🤖 Generated with Claude Code

MarkvanMents and others added 17 commits April 7, 2026 15:55
Update the post-processing script to copy font directories to the doubled-path location, fixing font loading issues on the Siemens internal portal.

Changes:
- scripts/fix-siemens-paths.sh: Copy webfonts/ and fonts/ directories
- config/siemens-internal/README.md: Document font copying and clarify uglyURLs behavior

CSS files reference fonts via relative paths (../webfonts/) and root-relative paths (/fonts/), which need to be available at the doubled-path location for proper loading.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Change font references from root-relative paths (/fonts/) to relative paths (../fonts/)
so fonts work correctly in all deployment environments without needing to be copied.

Changes:
- assets/scss/_font-face.scss: Change font URLs from /fonts/ to ../fonts/
- scripts/fix-siemens-paths.sh: Remove font copying (no longer needed)
- config/siemens-internal/README.md: Update documentation to reflect relative path approach

This fixes font loading for the Siemens internal deployment while also working for
production and development environments. Reduces duplicated files from ~3.4MB to ~2.2MB.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Update Siemens internal deployment documentation to reflect that Hugo v0.156.0+ fixed the doubled-path bug. Post-processing is no longer needed.

Changes:
- config/siemens-internal/README.md: Document Hugo v0.156.0+ fix, update build instructions, clarify technical details
- scripts/fix-siemens-paths.sh: Simplify to no-op script for backward compatibility

The canonifyURLs bug that caused doubled paths for CSS and JS assets has been resolved in Hugo v0.156.0. Sites can now be built with a single hugo command without post-processing.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Change the deployment path to match the location where Siemens serves the documentation tiles.

Changes:
- config/siemens-internal/hugo.toml: Update baseURL to include /Mendix-Docs/ in path
- config/siemens-internal/README.md: Update all URL references to new path
- config/siemens-internal/INDEX-HTML-WORKAROUND.md: Update example URLs to new path

The new deployment URL is:
https://internal.docs.sw.siemens.com/documentation/internal/PL20260323299104942/en-US/Mendix-Docs/public/

This matches the directory structure on the Siemens internal web server where the documentation tiles are located.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Adds _scripts/add-index-html-links.sh, which rewrites directory-style
href links (ending with /) to explicit /index.html links after a Hugo
build, so the Siemens server can serve pages without automatic directory
index support. Accepts a base URL argument to handle canonifyURLs-expanded
internal links generated by the siemens-internal environment.

Moves scripts/ to _scripts/ alongside existing repo scripts, and updates
README.md and INDEX-HTML-WORKAROUND.md to document the new build step.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…uirement

Removes the _print exclusion from add-index-html-links.sh — _print pages
have index.html files and need the same rewriting as the rest of the site.

Updates README to make clear the base URL argument is required for
siemens-internal builds, where canonifyURLs expands all internal links
to absolute URLs that the script would otherwise treat as external.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Updates add-index-html-links.sh to handle href values like /path/#anchor,
which previously were not rewritten because the URL doesn't end with /.
The script now splits off the fragment before checking and rewriting the
path, producing /path/index.html#anchor.

Updates INDEX-HTML-WORKAROUND.md to document this case.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@MarkvanMents MarkvanMents changed the title Publish Mendix Docs to SIemens Support Center Publish Mendix Docs to Siemens Support Center Sep 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants