-
Notifications
You must be signed in to change notification settings - Fork 503
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
Auto-add deprecation marker for API item if known #3818
Comments
Drive-by comment; when we check for broken links we always look it up. We don't just check if the file exists (in the predictable folder name). So it wouldn't be inconceivable to read in the const identifier = '/en-US/docs/API/Web/Window/onkeypress'
const doc = getPage(identifier);
if (doc) {
// Not broken, but should we annotate the link???
if (doc.tags.includes("Deprecated")) {
text += " (deprecated!)"
}
...
} else {
logBrokenLinkFlaw(identifier)
} Where and what KS macro is that? |
@peterbe That ^^^^ sounds like a good idea.
Now I look at the source the link I was talking about was a plain link and not a macro at all. Doesn't change my answer - any xref macro or link to a topic (note, I did not say "reference topic" here. If the page is marked as deprecated then it probably makes sense to mark it as deprecated when linked even if it is not a reference topic). |
Closing in favor of duplicate #3929. |
As part of mdn/content#5075 I added the tag "Deprecated" to GlobalEventHandlers.onkeypress, which automatically added the deprecated icon to the sidebar:
Nice :-)
Would be good if this was also added to links in the text like this:
Obviously this would be great for any kind of link, but in particular for macro generated links. Bonus points to also add experimental icons etc.
Note, this would probably require some fixes to the cases where the tagging has been added explicitly via `{{deprecated_inline}}. I realise this might be controversial, but to me the information about status really should be documented in the thing that is being referred to, and propagate everywhere. I'd also argue this should be separate from tags, but that's another story.
Further, it is a problem for me that we mark deprecation, non-standard, etc in three places: deprecation header, tags, BCD. This should all come from the BCD if present, and otherwise be over-ridden by a tag. The tag should auto-generate the deprecation header (or BCD should if that was what was used).
The text was updated successfully, but these errors were encountered: