Repository navigation
Add categories: [[Category:Name]], category pages and a list of categories - #54
Merged
Merged
Conversation
…ories [[Category:Name]] in a wiki article puts it in a category (names are capitalised, and underscores count as spaces). The article lists its categories at the bottom, /wiki/Category:Name lists the live articles in a category with its own description above when it has one, and /wiki/categories lists every category in use. Members are found from the articles' own stored text, so a category added by a template shows under the article but not in the category's list. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The code sniffer wants either a use statement or the full name, not both. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Contributor
Author
|
Pushed Investigated and written by Claude on behalf of William Jacoby (bonelifer). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Articles can now be put in categories.
[[Category:Name]]anywhere in a wiki article. It shows nothing in the text. Names are normalised (first letter capitalised, underscores as spaces), soboxesandBoxesare one category; a sort key after a bar is accepted and ignored. It is read only while a wiki article is saved, like headings and templates, so in a forum post it stays plain text. This means[[Category:Foo]]in a post is no longer a link to an article called "Category:Foo"./wiki/Category:Name. With no article of that name, the page lists the live articles in the category, A to Z, with their descriptions, says it has no description yet and links to write one. If an articleCategory:Nameexists, its text is shown above the list and it keeps its edit and version buttons;?action=editand?action=versionsare the ordinary article pages./wiki/categorieslists every category in use with its article count, linked from the overview next to Templates.<includeonly>.docs/TODO.mdwith the other things not built (sub-categories,[[:Category:Name]], sort keys, and large wikis).Tests
categories_test.phpand new parsing and rendering cases inmarkup_test.php.Investigated and written by Claude on behalf of William Jacoby (bonelifer).