- Remove all overcomplicated code
- Use the single-line initialization from Mermaid docs
- Eliminate event listeners and extra methods
- Implement KISS principle with just load + initialize
- Added DOMContentLoaded event listener to ensure Mermaid only runs after page is loaded
- Used both initialization methods for redundancy:
* mermaid.initialize({ startOnLoad: true })
* mermaid.run({ querySelector: '.mermaid' })
- This belt-and-suspenders approach should catch edge cases where one method fails
- Following exact approach recommended by Jekyll/Mermaid expert feedback
- Removed complex JS that was looking for non-existent <pre><code> elements
- Since Jekyll already outputs <div class='mermaid'> directly, conversion was unnecessary
- Simplified to use Mermaid's built-in initialization with startOnLoad:true
- Fixed various HTML syntax errors in default.html template
- Applied KISS and DRY principles for a more robust implementation
- Fixed DOM manipulation to correctly replace code block elements
- Changed from using replaceWith to parentNode.replaceChild
- This ensures proper replacement of Jekyll-rendered code blocks
- Follows recommended implementation for GitHub Pages with Jekyll
- Move style.scss back to assets/css/ to fix Jekyll build path
- Remove backup file
- Keep Mermaid diagram format changes
This fixes the broken CSS on the live site while preserving
the Mermaid diagram improvements.
- Move style.scss to dox-theme/assets/css/ to match live site path
- Update default.html layout to reference correct CSS path
- Update GitHub Actions workflow to verify correct output path
- Backup original style.scss as style.scss.backup
- Replace absolute_url filter with site.baseurl for CSS and JS assets
- Ensure consistent path handling across all assets
- Fix 404 errors for theme assets on GitHub Pages
- Add max-width constraint to prevent overflow
- Implement proper word wrapping for long lines
- Remove redundant borders from nested elements
- Enhance copy button positioning and styling
- Add navigation structure to main hooks documentation page
- Add navigation structure to child hooks documentation page
- Maintain consistent navigation pattern across hook documentation
This extends the sidebar navigation fix to additional hook documentation pages,
ensuring consistent navigation across the documentation site.
- Add proper front matter with navigation structure to guides/index.md
- Add proper front matter with navigation structure to mainwp-hooks/dashboard/index.md
- Update template path handling to use site.baseurl consistently
- Fix asset path resolution in documentation-single.html and homepage.html
This fixes the left sidebar navigation issues on the guides and hooks documentation pages by:
1. Adding proper navigation structure in front matter
2. Ensuring consistent path handling for assets
3. Maintaining scroll-spy functionality
Testing:
- Verified navigation structure matches working pages
- Confirmed proper asset path resolution
- Tested scroll-spy behavior
- Added CDN links for PHP, JavaScript, HTML/XML, CSS, and Bash language packs
- Removed deprecated hljs.initHighlightingOnLoad() initialization
- Let code-blocks.js handle initialization with hljs.highlightAll()
- This fixes missing code block headers and copy buttons on live site