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

docs request: linking directly to the modules #476

Closed
aos opened this issue Aug 5, 2024 · 4 comments · Fixed by #479
Closed

docs request: linking directly to the modules #476

aos opened this issue Aug 5, 2024 · 4 comments · Fixed by #479

Comments

@aos
Copy link
Contributor

aos commented Aug 5, 2024

Hey y'all - thanks for putting this together. It's been great having a good reference for proper defaults. While I was browsing the docs, I saw that there are references to the code, like so:

image

Unfortunately, this means that I also need to have a separate tab open to find this particular file and look through it. I see with mkdocs you have a variable for the repo_url. I attempted to template that in, but it seems like your version of mkdocs doesn't support this feature of Jinja templating, eg. {{ repo_url }}/blob/main/nixos/hardware/hetzner-cloud/default.nix. There are plugins for this (like this one), but I don't know your appetite for going that far. :-)

What are your thoughts on just adding hardcoded links directly to modules in the Github repo? So the above: nixosModules.hardware-hetzner-cloud becomes: nixosModules.hardware-hetzner-cloud? I'm happy to put together a PR for it if so.

@zimbatm
Copy link
Member

zimbatm commented Aug 5, 2024

Hey aos, thanks for caring about the details, this is going to make future users experience much nicer.

I'm up for enabling the plugin. We actually have it already in the environment, it just wasn't added to the mkdocs plugin list (see numtide/mkdocs-numtide). You could enable it upstream or here.

@aos
Copy link
Contributor Author

aos commented Aug 6, 2024

Hi @zimbatm - looks like you did the hard work already. Thanks :-) I went ahead and sent the change upstream: numtide/mkdocs-numtide#5

Once that's merged in, I can make a PR here to pull in the new input hash and make the change here.

@zowoq
Copy link
Contributor

zowoq commented Aug 6, 2024

I can make a PR here to pull in the new input hash and make the change here.

The docs also seem to be broken in yesterdays flake update by other changes from mkdocs-numtide: #475.

zimbatm pushed a commit to numtide/mkdocs-numtide that referenced this issue Aug 6, 2024
@zimbatm
Copy link
Member

zimbatm commented Aug 6, 2024

thanks @aos, merged!

@zowoq fixed in #478

aos added a commit to aos/srvos that referenced this issue Aug 7, 2024
Closes nix-community#476

Here's a first pass at linking to the modules. I thought about
finding a way to automate this (eg. populating the links directly from
the exposed flake modules) but couldn't find a clean solution.
@zimbatm zimbatm closed this as completed in 95804de Aug 7, 2024
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

Successfully merging a pull request may close this issue.

3 participants