Browse Source

Merge "Build pdf doc"

master
Zuul 2 weeks ago
parent
commit
2d9b7cadf5
3 changed files with 18 additions and 15 deletions
  1. 2
    1
      doc/requirements.txt
  2. 8
    14
      doc/source/conf.py
  3. 8
    0
      tox.ini

+ 2
- 1
doc/requirements.txt View File

@@ -5,4 +5,5 @@ reno>=2.5.0 # Apache-2.0
5 5
 sphinx!=1.6.6,!=1.6.7,>=1.6.2,<2.0.0;python_version=='2.7'  # BSD
6 6
 sphinx!=1.6.6,!=1.6.7,>=1.6.2;python_version>='3.4'  # BSD
7 7
 sphinxcontrib-apidoc>=0.2.0  # BSD
8
-openstackdocstheme>=1.18.1 # Apache-2.0
8
+sphinxcontrib-svg2pdfconverter>=0.1.0 # BSD
9
+openstackdocstheme>=1.20.0 # Apache-2.0

+ 8
- 14
doc/source/conf.py View File

@@ -21,14 +21,10 @@ sys.path.insert(0, os.path.abspath('../..'))
21 21
 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
22 22
 extensions = [
23 23
     'sphinxcontrib.apidoc',
24
+    'sphinxcontrib.rsvgconverter',
25
+    'openstackdocstheme',
24 26
 ]
25 27
 
26
-try:
27
-    import openstackdocstheme
28
-    extensions.append('openstackdocstheme')
29
-except ImportError:
30
-    openstackdocstheme = None
31
-
32 28
 autoclass_content = 'both'
33 29
 apidoc_module_dir = '../../metalsmith'
34 30
 apidoc_output_dir = 'reference/api'
@@ -46,7 +42,6 @@ source_suffix = '.rst'
46 42
 master_doc = 'index'
47 43
 
48 44
 # General information about the project.
49
-project = u'metalsmith'
50 45
 copyright = u'2018, MetalSmith Developers '
51 46
 
52 47
 # The version info for the project you're documenting, acts as replacement for
@@ -77,21 +72,20 @@ pygments_style = 'sphinx'
77 72
 # html_theme = '_theme'
78 73
 # html_static_path = ['static']
79 74
 
80
-if openstackdocstheme is not None:
81
-    html_theme = 'openstackdocs'
82
-else:
83
-    html_theme = 'default'
75
+html_theme = 'openstackdocs'
84 76
 
85 77
 # Output file base name for HTML help builder.
86
-htmlhelp_basename = '%sdoc' % project
78
+htmlhelp_basename = 'metalsmithdoc'
79
+
80
+latex_use_xindy = False
87 81
 
88 82
 # Grouping the document tree into LaTeX files. List of tuples
89 83
 # (source start file, target name, title, author, documentclass
90 84
 # [howto/manual]).
91 85
 latex_documents = [
92 86
     ('index',
93
-     '%s.tex' % project,
94
-     u'%s Documentation' % project,
87
+     'doc-metalsmith.tex',
88
+     u'MetalSmith Documentation',
95 89
      u'MetalSmith Developers', 'manual'),
96 90
 ]
97 91
 

+ 8
- 0
tox.ini View File

@@ -54,6 +54,14 @@ deps =
54 54
 commands =
55 55
   sphinx-build -a -E -W -b html doc/source doc/build/html
56 56
 
57
+[testenv:pdf-docs]
58
+basepython = python3
59
+whitelist_externals = make
60
+deps = {[testenv:docs]deps}
61
+commands =
62
+  sphinx-build -W -b latex doc/source doc/build/pdf
63
+  make -C doc/build/pdf
64
+
57 65
 [testenv:releasenotes]
58 66
 basepython = python3
59 67
 deps =

Loading…
Cancel
Save