Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Math/LaTeX embeds broken #1281

Open
andysmithfal opened this issue Sep 10, 2024 · 3 comments
Open

Math/LaTeX embeds broken #1281

andysmithfal opened this issue Sep 10, 2024 · 3 comments

Comments

@andysmithfal
Copy link

Description

My Doks site is hosted on GitHub pages on an GitHub Enterprise server. The URL is as follows:
https://pages.github.example.org/Org-Name/docs-repo-name/

My hugo.toml contains the following:

baseurl = "https://pages.github.example.org/Org-Name/docs-repo-name/"
canonifyURLs = true

And I have the section from the Maths doc page:

[getresource]
  dir = ':resourceDir/_gen'
  maxAge = -1

Everything works as expected apart from math expressions.

When a page contains this:

{{< math >}}$(x,y,z)${{< /math >}}

The resulting image embed will be as follows:
<img src="https://pages.github.example.org/Org-Name/docs-repo-name/Org-Name/docs-repo-name/_15674824548266881901.svg" alt="mathematical expression or equation">

There are no other issues with URL bases - CSS, JS and image uploads are all working fine.

@h-enk
Copy link
Member

h-enk commented Sep 12, 2024

What if you set:

canonifyURLs = false

See also Canonical URLs

@h-enk
Copy link
Member

h-enk commented Sep 12, 2024

Aside from your issue, are you sometimes experiencing issues generating the math images?

And get an error message like this:

ERROR The "kroki" code block render hook was unable to get the remote diagram. See "D:\THULITE\getdoks.org\content\blog\doks-1-2\index.md:44:1". failed to fetch remote resource: Bad Request

See Timeout

@Chromaroma
Copy link

Thanks. The canonifyURLs = false option worked. It has resolved the issue both for diagrams and maths expressions. ('m replying on behalf of my colleague @andysmithfal who orginally posted the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants