Bug 237744 - Allow table of contents on posts in special cases
Summary: Allow table of contents on posts in special cases
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Website (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jon Davis
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-03-10 16:20 PST by Jon Davis
Modified: 2022-03-11 13:27 PST (History)
3 users (show)

See Also:


Attachments
Patch (3.20 KB, patch)
2022-03-10 16:30 PST, Jon Davis
no flags Details | Formatted Diff | Diff
Before applying patch (1.01 MB, image/png)
2022-03-10 16:30 PST, Jon Davis
no flags Details
After applying patch (1.06 MB, image/png)
2022-03-10 16:30 PST, Jon Davis
no flags Details
Patch (3.21 KB, patch)
2022-03-11 11:10 PST, Jon Davis
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jon Davis 2022-03-10 16:20:53 PST
Add the ability to turn on table of contents generation for blog posts on webkit.org.
Comment 1 Jon Davis 2022-03-10 16:30:13 PST
Created attachment 454423 [details]
Patch
Comment 2 Jon Davis 2022-03-10 16:30:41 PST
Created attachment 454424 [details]
Before applying patch
Comment 3 Jon Davis 2022-03-10 16:30:58 PST
Created attachment 454425 [details]
After applying patch
Comment 4 Devin Rousso 2022-03-10 16:42:46 PST
Comment on attachment 454423 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=454423&action=review

r=me

> Websites/webkit.org/wp-content/plugins/table-of-contents.php:24
> +    public static function tocEnabled ($post_type) {

Style: I think we'd prefer something like `shouldEnableTableOfContents`, as future developers might not know what "toc" is 😅  Unless `'build-toc'` is some WordPress concept?
Comment 5 Jon Davis 2022-03-11 11:10:21 PST
Created attachment 454499 [details]
Patch
Comment 6 Jon Davis 2022-03-11 11:11:30 PST
The follow-up patch has been changed to use `'build-table-of-contents'`.
Comment 7 EWS 2022-03-11 13:26:40 PST
Committed r291185 (248344@main): <https://commits.webkit.org/248344@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 454499 [details].
Comment 8 Radar WebKit Bug Importer 2022-03-11 13:27:21 PST
<rdar://problem/90177978>