NixOS / NixOS/nix.dev

Add support for a tag system on nix.dev

Open
#529 1 comment 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

site
Dominant language
Nix
Stars
4k
Forks
339
Avg merge
2d 11h
Merged PRs (30d)
7

Description

Current status

Currently pages on nix.dev can only be navigated to through links in the sidebar. Pages may also only appear a single time in the sidebar.

Problem statement

Since pages may only appear under a single topic, pages that may cover more than one topic must be arbitrarily placed under one of potentially many plausible topics. A better user experience would be if users could find all articles related to a particular topic regardless of where they appear in the site structure.

Approach

One method of adding this functionality is through a tag system. Tags may be added to the front-matter of each page. From the tags contained in each page a complete list of the tags may be generated during a build of the site. A page containing all of the tags can be generated from this list, and each tag listed on this page may link to a page containing all the pages that contain this tag.

There are Sphinx extensions that offer this functionality, namely sphinx-tags. Note that this Python module is not in nixpkgs and would need to be upstreamed in order to use it on nix.dev.

In a system with tags, a page may be placed under one canonical topic, but would also appear under the tag pages for any tags included in the page's front matter.

Suggested tag system

This is up for discussion, but an initial tagging system could look like this:

  • nix-cli
  • nix-lang
  • nixos
  • configuration
  • tags for each language e.g. python, rust, etc
  • etc

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or entry points are named. Start by reviewing the nix.dev build configuration and the linked sphinx-tags extension, then determine how front-matter tags could generate a complete tag index and per-tag page listings. Done means the agreed tag system is implemented and pages are discoverable through their canonical topic and relevant tag pages.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.