-
Notifications
You must be signed in to change notification settings - Fork 167
Add CLI flag to enable DocC adding minimal per-page HTML content to each index.html file #1396
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 CLI flag to enable DocC adding minimal per-page HTML content to each index.html file #1396
Conversation
|
@swift-ci please test |
|
@swift-ci please test |
|
@swift-ci please test |
anferbui
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly got some questions, but overall looking good.
Tests/DocCCommandLineTests/ArgumentParsing/ConvertSubcommandTests.swift
Outdated
Show resolved
Hide resolved
Tests/DocCCommandLineTests/FileWritingHTMLContentConsumerTests.swift
Outdated
Show resolved
Hide resolved
Tests/DocCCommandLineTests/FileWritingHTMLContentConsumerTests.swift
Outdated
Show resolved
Hide resolved
Co-authored-by: Andrea Fernandez Buitrago <[email protected]>
|
@swift-ci please test |
|
@swift-ci please test |
anferbui
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, up to you whether you address the nit or not!
| TextFile(name: "RootArticle.md", utf8Content: """ | ||
| # A single article | ||
|
|
||
| This is an _formatted_ article that becomes the root page (because there is only one page). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: This test also has the same typo, but up to you if you'd like to fix it!
| This is an _formatted_ article that becomes the root page (because there is only one page). | |
| This is a _formatted_ article that becomes the root page (because there is only one page). |
I can fix it. I just need to update the test expectation to match. |
|
@swift-ci please test |
Bug/issue #, if applicable: rdar://163326857
Summary
This is the last piece of #1366.
It adds a new
--experimental-transform-for-static-hosting-with-contentflag that enables DocC's feature to supplement the output with minimal content I the per-page "index.html" files.It also improves the robustness of the modifications of the "index.html" files (in 8e996c4) — even though this is more a theoretical issue since the DocC Render templates have had the same structure for as long as the project has existed.
It also adds support for mixing this experimental feature with the
--experimental-enable-custom-templatesflag (in 4910bf9).Lastly, it adds an entry to the "features.json" file so that tools can check if DocC supports this feature before passing the flag.
Dependencies
None.
Testing
from #1366:
--experimental-transform-for-static-hosting-with-contentflagruby -run -ehttpd . -p8000.Note: the later steps won't work with
docc prevewAlternatively, on macOS you can run
open /path/to/SomeModule.doccarchive/documentation/somemodule/index.htmlChecklist
Make sure you check off the following items. If they cannot be completed, provide a reason.
./bin/testscript and it succeeded