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

Add Support for Anchor Links #1039

Closed
kevinfodness opened this issue Jan 3, 2024 · 0 comments · Fixed by #1044
Closed

Add Support for Anchor Links #1039

kevinfodness opened this issue Jan 3, 2024 · 0 comments · Fixed by #1044
Assignees
Labels
enhancement New feature or request php Requires understanding PHP
Milestone

Comments

@kevinfodness
Copy link
Member

kevinfodness commented Jan 3, 2024

Description

Apple News supports anchor links (e.g., #my-cool-heading) but this plugin does not. It intentionally converts various types of referential links to absolute URLs so that they don't break when sent to Apple News (e.g., a relative link like /my-example-page would be rewritten to include the domain, like https://www.example.org/my-example-page). It would be good to remove this behavior for anchor links and instead make anchor links work properly. In order to do that, we will need to add an identifier property to components based on the id of the HTML element.

ref: https://developer.apple.com/documentation/apple_news/apple_news_format/components/using_html_with_apple_news_format

Use Case

As an editor, I want to be able to create anchor links within my document that work on Apple News as well as natively on my site.

Acceptance Criteria

  • Remove the logic that adds the permalink to the anchor link, leaving the anchor link intact.
  • Add parsing for IDs and add IDs as identifiers to components so that they can be accessed by anchor links. Use the first (top-level) ID found within component HTML as the identifier for the component.
@kevinfodness kevinfodness added enhancement New feature or request php Requires understanding PHP labels Jan 3, 2024
@attackant attackant self-assigned this Jan 12, 2024
@attackant attackant added this to the v2.4.2 milestone Jan 12, 2024
@attackant attackant linked a pull request Jan 16, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request php Requires understanding PHP
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants