Commit Graph

12 Commits

Author SHA1 Message Date
Matthew Woehlke
038f4c12e3 Utilities/Sphinx: Add hanging indent to version notes
Tweak HTML styling of version-{added,changed} notes to include a hanging
indent. This makes it more obvious what text is part of such a note in
cases where the note is lengthy (especially if more than one paragraph),
rather than the relevant text blending into the surrounding prose.
2023-03-14 14:39:44 -04:00
Matthew Woehlke
39ecaa5da1 Utilities/Sphinx: Improve word wrap of signatures
Implement logic to support several styles of parsing in the new
signature directive that control where line breaks are allowed in a
signature.

The default is 'smart', which forbids breaks inside of square- or
angle-brackets. The 'verbatim' option forbids all breaks. In all cases,
breaks are always allowed where a newline appears in the source.

This seems to Just Work for most writers, but HTML needs some special
handling that is accomplished by a new CSS rule and assigning the 'nbsp'
class to spaces that are not allowed to break. (ROFF's line wrapping is
rather unfortunate here, as it prefers splitting and hyphenating words
rather than breaking at a space.)
2023-03-13 13:31:38 -04:00
Matthew Woehlke
74e3c1d313 Utilities/Sphinx: Add a directive to document command signatures
Add a `signature` directive to offer a CMake version of Sphinx's
`function` directive, similar to that found in other domains (py, cpp,
etc.).  Like others, this takes one or more signatures as arguments and
creates dt/dd nodes from the signatures and the directive contents.
2023-03-03 17:05:02 -05:00
Alex Turbov
977c38c339 Help: Render guide links as normal text instead of monospace
The guide document names are phrases, not code-like man-page names.
Add CSS selectors for `:guide:` links and revert unnecessary properties.
2022-11-08 09:53:20 -05:00
Brad King
a14905d4df Utilities/Sphinx: Add option to build outdated version banner for cmake.org
This was previously added in a custom branch for building the
cmake.org reference documentation.
2022-04-05 16:09:54 -04:00
Nikita Nemkin
dafcef8b50 Help: Improve styling for versionadded/deprecated directives
Sphinx theme CSS removes top margin for dd > p combination,
but directives add an intervening div and need a separate rule.

Issue: #19715
2020-12-02 21:00:28 +05:00
Lucy Phipps
b9e6d04558 Reduce size of PNG images
Use FileOptimizer 13.50.2431 (x86) and ZopfliPNG 1.0.2.

Update expected file hashes in tests.
2019-01-25 09:14:51 -05:00
T.J. Corona
66f59bd7da cmake-gui: Update icons 2018-08-16 11:56:08 -04:00
Brad King
72814e46da Utilities/Sphinx: Make HTML links in parsed-literal blocks more obvious
Hyperlink text color does not stand out when used inside a literal block
because such blocks typically get syntax highlighting.  Update our CSS
style to make the links more distinct.

Suggested-by: Kyle Edwards <kyle.edwards@kitware.com>
2018-05-07 10:10:37 -04:00
Brad King
a023a26cad Help: Configure html favicon 2013-11-05 08:59:02 -05:00
Brad King
fb332197bf Help: Configure html page navigation bars
Add a small CMake logo to the left side of the header and footer
navigation bars.  Set the html theme, title, and short title explicitly.
2013-11-05 08:58:56 -05:00
Brad King
bfe07aa97e Build Help documentation during CMake build using Sphinx
Add a Utilities/Sphinx directory to hold CMake build code to run the
Sphinx (sphinx-doc.org) documentation generation tool.  Create a
CMakeLists.txt file there capable of building either as a subdirectory
of the main CMake build, or as a standalone documentation build.

Add cache options SPHINX_MAN and SPHINX_HTML to select output formats
and SPHINX_EXECUTABLE to specify the sphinx-build executable.  Add
bootstrap options --sphix-man and --sphinx-html to select output formats
and --sphinx-build=<sb> to specify the sphinx-build executable.

Create a "conf.py.in" file to configure_file into "conf.py" to tell
sphinx-build how to build our documents.  Create a "cmake.py" Sphinx
extension module defining:

* The "cmake-module" directive used in Help/module/*.rst files to
  scan .rst markup from the corresponding Modules/*.cmake file.

* A Sphinx domain called "cmake" defining documentation object types
  for CMake Help/<type> directories: command, generator, manual,
  module, policy, prop_*, and variable.  Add a "role" for each type
  to perform cross-references.  Teach the roles to treat "<XYZ>"
  as placeholders instead of explicit targets if not preceded by
  a space.  Add cmake domain directives to define command and
  variable objects explicitly in .rst file content.  This will
  allow modules to define their own commands and variables and
  have them indexed and linkable.

* A Sphinx document transform that converts Help/<type>/*.rst documents
  into cmake domain objects of the corresponding <type> and adds index
  entries for them.  This will automatically index all CMake documentation
  objects and provide cross-reference targets for them with no special
  markup in the .rst files.
2013-10-16 09:22:37 -04:00