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

Enable "mentioned in" feature by default #1114

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

d-ronnqvist
Copy link
Contributor

@d-ronnqvist d-ronnqvist commented Dec 4, 2024

Bug/issue #, if applicable:

Summary

This enables the "mentioned in" feature by default and removes the "experimental" word from its feature flag.

Dependencies

None

Testing

  • Run docc convert --help

    • The mentioned feature should not be described as experimental
  • Build documentation for some project with a symbol that's linked to from the content of some article

    • The symbol's page should display a "Mentioned In" secretion that links back to the article.
  • Repeat step 2 but pass --disable-mentioned-in.

    • The symbol's page should no longer contain a "Mentioned In" section.

Checklist

Make sure you check off the following items. If they cannot be completed, provide a reason.

  • Added tests
  • Ran the ./bin/test script and it succeeded
  • Updated documentation if necessary

@d-ronnqvist
Copy link
Contributor Author

@swift-ci please test

@d-ronnqvist d-ronnqvist marked this pull request as ready for review January 31, 2025 09:06
@d-ronnqvist d-ronnqvist added the documentation Improvements or additions to documentation label Jan 31, 2025
@d-ronnqvist
Copy link
Contributor Author

@swift-ci please test

@d-ronnqvist d-ronnqvist force-pushed the enable-mentioned-in-by-default branch from cf168a5 to c85640e Compare January 31, 2025 09:41
@d-ronnqvist d-ronnqvist added the needs forum discussion Needs to be discussed in the Swift Forums label Jan 31, 2025
@d-ronnqvist
Copy link
Contributor Author

This Swift Forums post proposes that we enable this feature by default.

@d-ronnqvist d-ronnqvist force-pushed the enable-mentioned-in-by-default branch from c85640e to 190ebb1 Compare January 31, 2025 12:27
When you link to a symbol from an article's content, DocC automatically creates a "mentioned in" link from mentioned symbol's page to the article that mentioned the symbol.
These "mentioned in" links helps the reader find conceptual content that put a specific symbol in context or that describe how to accomplish some task using that symbol.

DocC only creates "mentioned in" links when an _article_ links to a symbol and only when that link appears in the article's _content_.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be worth mentioning whether or not this works when a sample code page, API collection page or framework page links to a symbol? Are sample code pages considered to be articles?

I assume the answer is "not" but maybe we should make that explicit here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct, this is specifically for articles.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation needs forum discussion Needs to be discussed in the Swift Forums
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants