Bug 237744

Summary: Allow table of contents on posts in special cases
Product: WebKit Reporter: Jon Davis <jond>
Component: WebKit WebsiteAssignee: Jon Davis <jond>
Status: RESOLVED FIXED    
Severity: Normal CC: hi, jond, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Before applying patch
none
After applying patch
none
Patch none

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>