mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge pull request #4815 from tk0miya/refine_add_css_file
Refine adding CSS files
This commit is contained in:
@@ -59,9 +59,6 @@ Important points to note:
|
||||
Note that the current builder tag is not available in ``conf.py``, as it is
|
||||
created *after* the builder is initialized.
|
||||
|
||||
.. seealso:: Additional configurations, such as adding stylesheets,
|
||||
javascripts, builders, etc. can be made through the :doc:`/extdev/appapi`.
|
||||
|
||||
|
||||
General configuration
|
||||
---------------------
|
||||
@@ -846,6 +843,22 @@ that use Sphinx's HTMLWriter class.
|
||||
The image file will be copied to the ``_static`` directory of the output
|
||||
HTML, but only if the file does not already exist there.
|
||||
|
||||
.. confval:: html_css_files
|
||||
|
||||
A list of CSS files. The entry must be a *filename* string or a tuple
|
||||
containing the *filename* string and the *attributes* dictionary. The
|
||||
*filename* must be relative to the :confval:`html_static_path`, or a full URI
|
||||
with scheme like ``http://example.org/style.css``. The *attributes* is used
|
||||
for attributes of ``<link>`` tag. It defaults to an empty list.
|
||||
|
||||
Example::
|
||||
|
||||
html_css_files = ['custom.css'
|
||||
'https://example.com/css/custom.css',
|
||||
('print.css', {'media': 'print'})]
|
||||
|
||||
.. versionadded:: 1.8
|
||||
|
||||
.. confval:: html_static_path
|
||||
|
||||
A list of paths that contain custom static files (such as style
|
||||
@@ -1511,6 +1524,14 @@ the `Dublin Core metadata <http://dublincore.org/>`_.
|
||||
|
||||
.. versionadded:: 1.1
|
||||
|
||||
.. confval:: epub_css_files
|
||||
|
||||
A list of CSS files. The entry must be a *filename* string or a tuple
|
||||
containing the *filename* string and the *attributes* dictionary. For more
|
||||
information, see :confval:`html_css_files`.
|
||||
|
||||
.. versionadded:: 1.8
|
||||
|
||||
.. confval:: epub_guide
|
||||
|
||||
Meta data for the guide element of :file:`content.opf`. This is a
|
||||
|
||||
@@ -114,6 +114,11 @@ The following is a list of deprecated interface.
|
||||
- (will be) Removed
|
||||
- Alternatives
|
||||
|
||||
* - :meth:`~sphinx.application.Sphinx.add_stylesheet()`
|
||||
- 1.8
|
||||
- 4.0
|
||||
- :meth:`~sphinx.application.Sphinx.add_css_file()`
|
||||
|
||||
* - ``sphinx.application.Sphinx.override_domain()``
|
||||
- 1.8
|
||||
- 3.0
|
||||
|
||||
Reference in New Issue
Block a user