mieweb / wikiGDrive

Wiki for Google Shared Drive
15 stars 6 forks source link

(Urgent) Incorrect Result - Links do not work on some pages #305

Closed wreiske closed 2 years ago

wreiske commented 2 years ago

After a recent update, it seems that many links are linking to the .md files instead of the actual html.

image

Example: https://dev.wikigdrive.com/drive/0AF_nrE0_QH_2Uk9PVA/content/rapid-deployment/review-sessions/review-session-patient-registration.md https://docs.webchartnow.com/rapid-deployment/review-sessions/review-session-patient-registration/

image

Another example: https://docs.webchartnow.com/resources/system-specifications/application-programming-interface-api/

image

ggodlewski commented 2 years ago

You need to add render-link.html hook to the layouts:

https://gohugo.io/templates/render-hooks/

<a href="{{ (.Page.GetPage .Destination).RelPermalink | safeURL }}">{{ .Text | safeHTML }}</a>

wreiske commented 2 years ago

The layouts are all generated from the wikigdrive markdown files in the content folder.

The link for example shows:

[Terms of API Use](application-programming-interface-api/terms-of-api-use.md)

Shouldn't the wikigdrive link change that to just be

[Terms of API Use](application-programming-interface-api/terms-of-api-use.html)

or something similar?

wreiske commented 2 years ago

Actually, I now know exactly what you mean. I fixed it. Thank you!