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

Linking #53

Open
MikiVanousek opened this issue Apr 4, 2024 · 1 comment
Open

Linking #53

MikiVanousek opened this issue Apr 4, 2024 · 1 comment

Comments

@MikiVanousek
Copy link

Feature

I think it would be very neat to have the ability to declare a given article is about a specific package (or packages) in Nixpkgs. This would improve clarity of the wiki article, and it would facilitate integration with search.nixos.org. Besides Source and Homepage, there could be a link to an article about a package, if there is one on the wiki. This would make it much easier to learn the differences between versions of packages. For example, for the Julia language has the following versions of packages:

julia
julia-bin
julia-lts
julia_18
julia_18-bin

All these point to the same home page. You might think the difference between all these packages is immediately obvious from the names, but there is a more detailed description on the wiki. It would be neat to immediately see that a wiki article exists about these packages.

Approach

There are two fundamental approaches: marking the relationship in meta attribute of each package (like homepage) or marking it in the wiki.

The easier way to implement this feature would be to add a meta attribute to the packages. Then, displaying it in the search results would be as easy as displaying the other links in meta. But I think this approach has some disadvantages. Nixpkgs is already responsible for a lot. Changing the wiki links will would be slow, especially for people on stable. Changing the wiki is much simpler than merging a pull request to Nixpkgs. Furthermore, you would likely mention the relationship on the wiki too, which means you repeat yourself and split the source of truth.

If the relationship is marked in the wiki (with some kind of a tag), you would then query the wiki for all articles related to each packages. After getting the response of the search from the backed, the extract the package_attr_name and query the wiki for articles about the packages you are displaying. It would be trivial if you wanted to query the packages one by one, but I would have to make more research into how exactly we could get the wiki links for all the packages with one request..

@nixos-discourse
Copy link

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/wiki-nixos-org-is-now-live/42570/46

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