Repository navigation
Link each question to related ones, and check the built site - #26
Merged
Merged
Conversation
Each question page ended at "previous" and "next", which are neighbours by number, not by subject. The build now picks up to four related questions by the tags they share, weighting a tag by how rare it is (IDF) so "varhandle" outweighs "executors", ignoring tags that name a kind of question rather than a subject (basics, theory, design, api, puzzle), and using the same topic only to break ties. 171 of 180 questions get some; the rest have their only close matches as the previous or next question, which are linked already. They show on the question pages and in an opened card on the front page, where they link within the page. The build then checks what it wrote and fails on a broken internal link (2,457 checked), HTML escaped twice anywhere including questions.json, or a question page without a title, heading or description. Injecting a broken link and a double-escaped entity into a page fails the build with both reported.
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.
Each question page ended at "previous" and "next", which are neighbours by number, not by subject.
Related questions. The build picks up to four per question by shared tags:
varhandlecounts for more than sharingexecutors;basics,theory,design,api,puzzle) are ignored, after "What is a deadlock?" turned out related to "process vs thread" throughbasics;171 of 180 questions get some, 3.6 on average. Examples: the deadlock question links to the Coffman conditions, the transfer deadlock, diagnosing one, and
tryLockwith a timeout; the singleton question to both double-checked locking questions. Shown on question pages and inside an opened card on the front page (in-page links there).The build checks its output and fails on a broken internal link (2,457 checked across all pages), HTML escaped twice anywhere including
questions.json(the #18 bug class), or a question page without a title, heading or description. Verified by injecting a broken link and<into a page: the build failed and reported both../gradlew testpassesnode build.mjspasses its checks; looked at a question page and an opened card in Chrome