imfing / hextra

🔯 Modern, batteries-included Hugo theme for creating beautiful doc, blog and static websites
https://imfing.github.io/hextra/
MIT License
564 stars 143 forks source link

Mermaid diagram not working for index page #281

Open temiraevpg opened 7 months ago

temiraevpg commented 7 months ago

I'm starting to learn hugo. When using hextra via https://github.com/imfing/hextra-starter-template and cloning the repository on a PC, the test page with mermaid diagrams works, but I'm confused by the absence of the rest of the hugo folders in the project. Installation according to instructions:

  1. Hugo Modules (Recommended)
  2. Git Submodule

mermaid diagrams doesn't work

imfing commented 7 months ago

Hi can you provide a little more details, like the commands you use and some screenshots?

temiraevpg commented 7 months ago

terminal:

image

index file:

image

hugo.yaml

image

site page:

image
imfing commented 7 months ago

Can you use the template repository hugo.yaml config file?

https://github.com/imfing/hextra-starter-template

temiraevpg commented 7 months ago

hugo server did not start

image
imfing commented 7 months ago

can you try commenting out the module section in the config file?

temiraevpg commented 7 months ago

got this result

image image
temiraevpg commented 7 months ago

Copied content files to the created site from exampleSite

image

It may be necessary to update the template installation information. Repeating steps from the instructions does not bring the desired result

temiraevpg commented 7 months ago

I copied all the files from the folders \my-site\themes\hextra: /assets, /data, /images, /layouts, /static and everything worked. The instructions for getting a working website are different from what we already have. It is not clear how to automatically update the theme files; when they are updated, this operation will have to be done manually, this is not the result that I expect.

imfing commented 7 months ago

@temiraevpg I recommend using the Hugo modules to initialize the site: https://imfing.github.io/hextra/docs/getting-started/#setup-hextra-as-hugo-module

or simply create a repo using the imfing/hextra-starter-template

I will look into the issue with using Git submodules.

imfing commented 7 months ago

@temiraevpg I think it was by design that Mermaid will not be enabled in the homepage. I will provide an option to override this behavior in the future.

In the meantime, if you follow the initial steps, and put the mermaid block in docs/_index.md which would display as normal.

image

Let me know if this works.

temiraevpg commented 6 months ago

You are completely right it works. Doesn't work on the main page.