|  | 
|  | 1 | +# Configuration file for the Sphinx documentation builder. | 
|  | 2 | +# | 
|  | 3 | +# This file only contains a selection of the most common options. For a full | 
|  | 4 | +# list see the documentation: | 
|  | 5 | +# https://www.sphinx-doc.org/en/master/usage/configuration.html | 
|  | 6 | + | 
|  | 7 | +# -- Path setup -------------------------------------------------------------- | 
|  | 8 | + | 
|  | 9 | +# If extensions (or modules to document with autodoc) are in another directory, | 
|  | 10 | +# add these directories to sys.path here. If the directory is relative to the | 
|  | 11 | +# documentation root, use os.path.abspath to make it absolute, like shown here. | 
|  | 12 | +# | 
|  | 13 | +# import os | 
|  | 14 | +# import sys | 
|  | 15 | +# sys.path.insert(0, os.path.abspath('.')) | 
|  | 16 | +from docutils import nodes | 
|  | 17 | +from os.path import isdir, isfile, join, basename, dirname | 
|  | 18 | +from os import makedirs, getenv | 
|  | 19 | +from shutil import copyfile | 
|  | 20 | +from pygments.lexers.go import GoLexer | 
|  | 21 | +from sphinx.highlighting import lexers | 
|  | 22 | + | 
|  | 23 | +############# | 
|  | 24 | +# | 
|  | 25 | +# Add a special lexer to add a class to console lexer | 
|  | 26 | +# | 
|  | 27 | +############# | 
|  | 28 | + | 
|  | 29 | +class goLangLexer (GoLexer): | 
|  | 30 | +    name = 'golang' | 
|  | 31 | + | 
|  | 32 | +lexers['golang'] = goLangLexer(startinLine=True) | 
|  | 33 | + | 
|  | 34 | +# -- Project information ----------------------------------------------------- | 
|  | 35 | + | 
|  | 36 | +project = 'Intel® Device Plugins for Kubernetes' | 
|  | 37 | +copyright = '2020, various' | 
|  | 38 | +author = 'various' | 
|  | 39 | + | 
|  | 40 | + | 
|  | 41 | +############################################################################## | 
|  | 42 | +# | 
|  | 43 | +# This section determines the behavior of links to local items in .md files. | 
|  | 44 | +# | 
|  | 45 | +#  if useGitHubURL == True: | 
|  | 46 | +# | 
|  | 47 | +#     links to local files and directories will be turned into github URLs | 
|  | 48 | +#     using either the baseBranch defined here or using the commit SHA. | 
|  | 49 | +# | 
|  | 50 | +#  if useGitHubURL == False: | 
|  | 51 | +# | 
|  | 52 | +#     local files will be moved to the website directory structure when built | 
|  | 53 | +#     local directories will still be links to github URLs | 
|  | 54 | +# | 
|  | 55 | +#  if built with GitHub workflows: | 
|  | 56 | +# | 
|  | 57 | +#     the GitHub URLs will use the commit SHA (GITHUB_SHA environment variable | 
|  | 58 | +#     is defined by GitHub workflows) to link to the specific commit. | 
|  | 59 | +# | 
|  | 60 | +############################################################################## | 
|  | 61 | + | 
|  | 62 | +baseBranch = "master" | 
|  | 63 | +useGitHubURL = True | 
|  | 64 | +commitSHA = getenv('GITHUB_SHA') | 
|  | 65 | +githubBaseURL = "https://github.com/intel/intel-device-plugins-for-kubernetes/" | 
|  | 66 | +githubFileURL = githubBaseURL + "blob/" | 
|  | 67 | +githubDirURL = githubBaseURL + "tree/" | 
|  | 68 | +if commitSHA: | 
|  | 69 | +    githubFileURL = githubFileURL + commitSHA + "/" | 
|  | 70 | +    githubDirURL = githubDirURL + commitSHA + "/" | 
|  | 71 | +else: | 
|  | 72 | +    githubFileURL = githubFileURL + baseBranch + "/" | 
|  | 73 | +    githubDirURL = githubDirURL + baseBranch + "/" | 
|  | 74 | + | 
|  | 75 | +# -- General configuration --------------------------------------------------- | 
|  | 76 | + | 
|  | 77 | +# Add any Sphinx extension module names here, as strings. They can be | 
|  | 78 | +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom | 
|  | 79 | +# ones. | 
|  | 80 | +extensions = ['recommonmark','sphinx_markdown_tables','sphinx_md'] | 
|  | 81 | +source_suffix = {'.rst': 'restructuredtext','.md': 'markdown'} | 
|  | 82 | + | 
|  | 83 | + | 
|  | 84 | +# Add any paths that contain templates here, relative to this directory. | 
|  | 85 | +templates_path = ['_templates'] | 
|  | 86 | + | 
|  | 87 | +# List of patterns, relative to source directory, that match files and | 
|  | 88 | +# directories to ignore when looking for source files. | 
|  | 89 | +# This pattern also affects html_static_path and html_extra_path. | 
|  | 90 | +exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store','_work','cmd/fpga_plugin/pictures'] | 
|  | 91 | + | 
|  | 92 | + | 
|  | 93 | +# -- Options for HTML output ------------------------------------------------- | 
|  | 94 | + | 
|  | 95 | +# The theme to use for HTML and HTML Help pages.  See the documentation for | 
|  | 96 | +# a list of builtin themes. | 
|  | 97 | +# | 
|  | 98 | +html_theme = 'sphinx_rtd_theme' | 
|  | 99 | + | 
|  | 100 | +# Add any paths that contain custom static files (such as style sheets) here, | 
|  | 101 | +# relative to this directory. They are copied after the builtin static files, | 
|  | 102 | +# so a file named "default.css" will overwrite the builtin "default.css". | 
|  | 103 | +#html_static_path = ['_static'] | 
0 commit comments