@@ -194,6 +194,24 @@ def have_command(cmd):
194194 else :
195195 version = release = "unknown version"
196196
197+ #
198+ # HACK: there seems to be no easy way for us to get at the version and
199+ # release information passed in from the makefile...so go pawing through the
200+ # command-line options and find it for ourselves.
201+ #
202+ def get_cline_version ():
203+ c_version = c_release = ''
204+ for arg in sys .argv :
205+ if arg .startswith ('version=' ):
206+ c_version = arg [8 :]
207+ elif arg .startswith ('release=' ):
208+ c_release = arg [8 :]
209+ if c_version :
210+ if c_release :
211+ return c_version + '-' + c_release
212+ return c_version
213+ return version # Whatever we came up with before
214+
197215# The language for content autogenerated by Sphinx. Refer to documentation
198216# for a list of supported languages.
199217#
@@ -247,7 +265,7 @@ def have_command(cmd):
247265# a list of builtin themes.
248266
249267# Default theme
250- html_theme = 'sphinx_rtd_theme '
268+ html_theme = 'alabaster '
251269html_css_files = []
252270
253271if "DOCS_THEME" in os .environ :
@@ -279,7 +297,7 @@ def have_command(cmd):
279297 html_css_files .append ('theme_rtd_colors.css' )
280298
281299 except ImportError :
282- html_theme = 'classic '
300+ html_theme = 'alabaster '
283301
284302if "DOCS_CSS" in os .environ :
285303 css = os .environ ["DOCS_CSS" ].split (" " )
@@ -295,127 +313,28 @@ def have_command(cmd):
295313 for l in html_css_files :
296314 html_context ['css_files' ].append ('_static/' + l )
297315
298- if html_theme == 'classic ' :
316+ if html_theme == 'alabaster ' :
299317 html_theme_options = {
300- 'rightsidebar' : False ,
301- 'stickysidebar' : True ,
302- 'collapsiblesidebar' : True ,
303- 'externalrefs' : False ,
304-
305- 'footerbgcolor' : "white" ,
306- 'footertextcolor' : "white" ,
307- 'sidebarbgcolor' : "white" ,
308- 'sidebarbtncolor' : "black" ,
309- 'sidebartextcolor' : "black" ,
310- 'sidebarlinkcolor' : "#686bff" ,
311- 'relbarbgcolor' : "#133f52" ,
312- 'relbartextcolor' : "white" ,
313- 'relbarlinkcolor' : "white" ,
314- 'bgcolor' : "white" ,
315- 'textcolor' : "black" ,
316- 'headbgcolor' : "#f2f2f2" ,
317- 'headtextcolor' : "#20435c" ,
318- 'headlinkcolor' : "#c60f0f" ,
319- 'linkcolor' : "#355f7c" ,
320- 'visitedlinkcolor' : "#355f7c" ,
321- 'codebgcolor' : "#3f3f3f" ,
322- 'codetextcolor' : "white" ,
323-
324- 'bodyfont' : "serif" ,
325- 'headfont' : "sans-serif" ,
318+ 'description' : get_cline_version (),
319+ 'font_size' : '10pt' ,
320+ 'page_width' : '65em' ,
321+ 'sidebar_width' : '15em' ,
326322 }
327323
328324sys .stderr .write ("Using %s theme\n " % html_theme )
329325
330- # Theme options are theme-specific and customize the look and feel of a theme
331- # further. For a list of options available for each theme, see the
332- # documentation.
333- #html_theme_options = {}
334-
335- # Add any paths that contain custom themes here, relative to this directory.
336- #html_theme_path = []
337-
338- # The name for this set of Sphinx documents. If None, it defaults to
339- # "<project> v<release> documentation".
340- #html_title = None
341-
342- # A shorter title for the navigation bar. Default is the same as html_title.
343- #html_short_title = None
344-
345- # The name of an image file (relative to this directory) to place at the top
346- # of the sidebar.
347- #html_logo = None
348-
349- # The name of an image file (within the static path) to use as favicon of the
350- # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
351- # pixels large.
352- #html_favicon = None
353-
354326# Add any paths that contain custom static files (such as style sheets) here,
355327# relative to this directory. They are copied after the builtin static files,
356328# so a file named "default.css" will overwrite the builtin "default.css".
357329html_static_path = ['sphinx-static' ]
358330
359- # Add any extra paths that contain custom files (such as robots.txt or
360- # .htaccess) here, relative to this directory. These files are copied
361- # directly to the root of the documentation.
362- #html_extra_path = []
363-
364- # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
365- # using the given strftime format.
366- #html_last_updated_fmt = '%b %d, %Y'
367-
368331# If true, SmartyPants will be used to convert quotes and dashes to
369332# typographically correct entities.
370333html_use_smartypants = False
371334
372335# Custom sidebar templates, maps document names to template names.
373- # Note that the RTD theme ignores this.
374- html_sidebars = { '**' : ['searchbox.html' , 'localtoc.html' , 'sourcelink.html' ]}
375-
376- # Additional templates that should be rendered to pages, maps page names to
377- # template names.
378- #html_additional_pages = {}
379-
380- # If false, no module index is generated.
381- #html_domain_indices = True
382-
383- # If false, no index is generated.
384- #html_use_index = True
385-
386- # If true, the index is split into individual pages for each letter.
387- #html_split_index = False
388-
389- # If true, links to the reST sources are added to the pages.
390- #html_show_sourcelink = True
391-
392- # If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
393- #html_show_sphinx = True
394-
395- # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
396- #html_show_copyright = True
397-
398- # If true, an OpenSearch description file will be output, and all pages will
399- # contain a <link> tag referring to it. The value of this option must be the
400- # base URL from which the finished HTML is served.
401- #html_use_opensearch = ''
402-
403- # This is the file name suffix for HTML files (e.g. ".xhtml").
404- #html_file_suffix = None
405-
406- # Language to be used for generating the HTML full-text search index.
407- # Sphinx supports the following languages:
408- # 'da', 'de', 'en', 'es', 'fi', 'fr', 'h', 'it', 'ja'
409- # 'nl', 'no', 'pt', 'ro', 'r', 'sv', 'tr'
410- #html_search_language = 'en'
411-
412- # A dictionary with options for the search language support, empty by default.
413- # Now only 'ja' uses this config value
414- #html_search_options = {'type': 'default'}
415-
416- # The name of a javascript file (relative to the configuration directory) that
417- # implements a search results scorer. If empty, the default will be used.
418- #html_search_scorer = 'scorer.js'
336+ # Note that the RTD theme ignores this
337+ html_sidebars = { '**' : ["about.html" , 'searchbox.html' , 'localtoc.html' , 'sourcelink.html' ]}
419338
420339# Output file base name for HTML help builder.
421340htmlhelp_basename = 'TheLinuxKerneldoc'
@@ -558,19 +477,6 @@ def have_command(cmd):
558477 'Miscellaneous' ),
559478]
560479
561- # Documents to append as an appendix to all manuals.
562- #texinfo_appendices = []
563-
564- # If false, no module index is generated.
565- #texinfo_domain_indices = True
566-
567- # How to display URL addresses: 'footnote', 'no', or 'inline'.
568- #texinfo_show_urls = 'footnote'
569-
570- # If true, do not generate a @detailmenu in the "Top" node's menu.
571- #texinfo_no_detailmenu = False
572-
573-
574480# -- Options for Epub output ----------------------------------------------
575481
576482# Bibliographic Dublin Core info.
@@ -579,67 +485,9 @@ def have_command(cmd):
579485epub_publisher = author
580486epub_copyright = copyright
581487
582- # The basename for the epub file. It defaults to the project name.
583- #epub_basename = project
584-
585- # The HTML theme for the epub output. Since the default themes are not
586- # optimized for small screen space, using the same theme for HTML and epub
587- # output is usually not wise. This defaults to 'epub', a theme designed to save
588- # visual space.
589- #epub_theme = 'epub'
590-
591- # The language of the text. It defaults to the language option
592- # or 'en' if the language is not set.
593- #epub_language = ''
594-
595- # The scheme of the identifier. Typical schemes are ISBN or URL.
596- #epub_scheme = ''
597-
598- # The unique identifier of the text. This can be a ISBN number
599- # or the project homepage.
600- #epub_identifier = ''
601-
602- # A unique identification for the text.
603- #epub_uid = ''
604-
605- # A tuple containing the cover image and cover page html template filenames.
606- #epub_cover = ()
607-
608- # A sequence of (type, uri, title) tuples for the guide element of content.opf.
609- #epub_guide = ()
610-
611- # HTML files that should be inserted before the pages created by sphinx.
612- # The format is a list of tuples containing the path and title.
613- #epub_pre_files = []
614-
615- # HTML files that should be inserted after the pages created by sphinx.
616- # The format is a list of tuples containing the path and title.
617- #epub_post_files = []
618-
619488# A list of files that should not be packed into the epub file.
620489epub_exclude_files = ['search.html' ]
621490
622- # The depth of the table of contents in toc.ncx.
623- #epub_tocdepth = 3
624-
625- # Allow duplicate toc entries.
626- #epub_tocdup = True
627-
628- # Choose between 'default' and 'includehidden'.
629- #epub_tocscope = 'default'
630-
631- # Fix unsupported image types using the Pillow.
632- #epub_fix_images = False
633-
634- # Scale large images.
635- #epub_max_image_width = 0
636-
637- # How to display URL addresses: 'footnote', 'no', or 'inline'.
638- #epub_show_urls = 'inline'
639-
640- # If false, no index is generated.
641- #epub_use_index = True
642-
643491#=======
644492# rst2pdf
645493#
0 commit comments