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

url issues #1090

Open
hesxenon opened this issue Sep 11, 2023 · 2 comments
Open

url issues #1090

hesxenon opened this issue Sep 11, 2023 · 2 comments

Comments

@hesxenon
Copy link

  1. the "home" url (upper left, where Doks stands) doesn't seem to be affected by setting the "baseUrl" - it always tries to go to the server root. Am I missing something?
  2. is there an option so that I can use absolute urls in markdown links? Currently it seems they're just being appendend to the current url - which also breaks links.

Repo in question: https://gitlab.com/hesxenon/andale/-/tree/main/docs

Thank you so far for your work, even though working with hugo is sometimes frustrating for me I now have (semi) working, professional looking docs :)

If you notice anything strange in that repo, please tell me and I'll do my best to change it.

@h-enk
Copy link
Member

h-enk commented Sep 12, 2023

Ad 1) You can make the URL absolute. Copy docs/node_modules/@hyas/doks/layouts/partials/header/header.html to docs/layouts/partials/header/header.html, and update lines 14..16 from

    <a class="navbar-brand order-0" href="{{ "/" | relLangURL }}" aria-label="{{ .Site.Params.Title }}">
      {{ .Site.Params.Title }}
    </a>

to

    <a class="navbar-brand order-0" href="{{ "/" | absLangURL }}" aria-label="{{ .Site.Params.Title }}">
      {{ .Site.Params.Title }}
    </a>

Ad 2) You can use Hugo's ref shortcode — see also Use of ref and relref So, for instance, instead of:

They're not supported - see [reasoning](../../concepts/reasoning#route_params)

use

They're not supported - see [reasoning]({{< ref "reasoning#route_params" >}})

Last Friday I released Doks 1.0, I'm working hard now on updating the documentation — including a migration guide. Would you be interested in migrating? I could make a PR on your repo and learn and describe how to do things. Thanks!

@hesxenon
Copy link
Author

hesxenon commented Sep 12, 2023 via email

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

2 participants