A default css stylesheet is included for docs generated in html format.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang-tools-extra/clang-doc/tool/ClangDocMain.cpp | ||
---|---|---|
255–280 | Could you use llvm::sys::fs::copy_file here? https://llvm.org/doxygen/namespacellvm_1_1sys_1_1fs.html#abe768b38d21bfc2bc91a1c1d09cd84de |
clang-tools-extra/clang-doc/tool/ClangDocMain.cpp | ||
---|---|---|
256 | Eventually, we'll want to make this a configurable thing via a flag, but that can be done in another patch. |
clang-tools-extra/clang-doc/tool/ClangDocMain.cpp | ||
---|---|---|
252 | On second thought, can you create a virtual method to the Generator along the lines of Generator::createResources(ClangDocContext ctx), which would be a no-op for the YAML and MD generators atm and for the HTML generator would encapsulate this logic? I'd rather not have it in the main tool file, since it is generator-specific. |
Move the generation of css stylesheet to a function inside the HTMLGenerator.
A virtual function createResources was declared for Generator class. This is no-op for the YAML and MD generators. For the HTML it contains the generation of css stylesheet.
Move the CSS file to share/clang and read it from there, instead of trying to read it from the file that's with the source code, that only worked when run locally.
I'm blindly accepting the CSS but all other code looks fine. I still have that chrome bug where I can't LGTM sometimes but consider this reviewed and accepted by me as well
On second thought, can you create a virtual method to the Generator along the lines of Generator::createResources(ClangDocContext ctx), which would be a no-op for the YAML and MD generators atm and for the HTML generator would encapsulate this logic? I'd rather not have it in the main tool file, since it is generator-specific.