Giter Site home page Giter Site logo

Comments (3)

davidovich avatar davidovich commented on June 11, 2024

Hi @nicolasfara

I have tried to reproduce your error with no avail. Tried in latest Chrome and Firefox. The "latest work" you mention was related to:

  1. At hugo build-time, download the latest mermaid.js as a local resource, and use the local version once the site is built
  2. ensure that when landing on a mermaid enabled page, that the render occurs.

I added your code to the exampleSite, and was not able to reproduce. Note that the browser may have cached a prior version of your site, maybe a forced reload would fix that ?

from reveal-hugo.

nicolasfara avatar nicolasfara commented on June 11, 2024

Hi @davidovich
I think I fixed the problem: all the slides are inside the _index.md file and the mermaid diagram does not work.
So I moved all the slides inside another file (and directory) and all the mermaid diagrams now work.

The structure of the content folder is as follows:

home/
├─ slides.md
_index.md

In conclusion, if all the slides are in the _index.md file, the mermaid diagrams do not work.
If the slides are on a different file, all the diagrams are rendered correctly.

from reveal-hugo.

davidovich avatar davidovich commented on June 11, 2024

Ok, this brings me some ideas.
The automated evaluation of the need for mermaid is based on iterating .Site.RegularPages and it seems that root pages are not included in that slice. I think using .Site.AllPages instead would solve it for your specific structure (and should be supported).

from reveal-hugo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.