Merge pull request #2080 from pallets/sphinx_theme
Before adoption: this commit came in with the history the project adopted, so no landing records it.
switch to packaged sphinx theme
authored by Kenneth Reitz · committed by GitHub · parents 31174fe, 08d6de7 · Browse files · 4 files·+4 added−99 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
4 files+4 added−99 removed
- other:+4 added−99 removed
Provenance
- Commit
4eca29f- Tree
b63d19f- Author
Kenneth Reitz <me@kennethreitz.org>- Committer
GitHub <noreply@github.com>- Parent 1
31174fe- Parent 2
08d6de7
4 files changed+4 added−99 removed
deleted:docs/_themesnot shown
Its text is not shown, deleted.
modified:docs/conf.py+4 added-10 removed
20 unmodified lines21 22 # If extensions (or modules to document with autodoc) are in another directory,23 # add these directories to sys.path here. If the directory is relative to the24 # documentation root, use os.path.abspath to make it absolute, like shown here.25-sys.path.append(os.path.join(os.path.dirname(__file__), '_themes'))25 sys.path.append(os.path.dirname(__file__))26 27 # -- General configuration -----------------------------------------------------28 90 unmodified lines119 # documentation.120 # html_theme_options = {}121 122 # Add any paths that contain custom themes here, relative to this directory.124-html_theme_path = ['_themes']123+# html_theme_path = ['_themes']124 125 # The name for this set of Sphinx documents. If None, it defaults to126 # "<project> v<release> documentation".127 #html_title = None144 unmodified lines272 'blinker': ('https://pythonhosted.org/blinker/', None)273 }274 275 try:277- __import__('flask_theme_support')278- pygments_style = 'flask_theme_support.FlaskyStyle'276+ __import__('flask_sphinx_themes')277 html_theme = 'flask'278 html_theme_options = {279 'touch_icon': 'touch-icon.png'280 }281 except ImportError:284- print('-' * 74)285- print('Warning: Flask themes unavailable. Building with default theme')286- print('If you want the Flask themes, run this command and build again:')287- print()288- print(' git submodule update --init')289- print('-' * 74)282+ print('Flask theme unavailable; using the default theme.')283+ print('Install using `pip install Flask-Sphinx-Themes`.')284 285 286 # unwrap decorators287 def unwrap_decorators():17 unmodified linesdeleted:docs/flaskext.py-86 removed
1-# flasky extensions. flasky pygments style based on tango style2-from pygments.style import Style3-from pygments.token import Keyword, Name, Comment, String, Error, \4- Number, Operator, Generic, Whitespace, Punctuation, Other, Literal5-6-7-class FlaskyStyle(Style):8- background_color = "#f8f8f8"9- default_style = ""10-11- styles = {12- # No corresponding class for the following:13- #Text: "", # class: ''14- Whitespace: "underline #f8f8f8", # class: 'w'15- Error: "#a40000 border:#ef2929", # class: 'err'16- Other: "#000000", # class 'x'17-18- Comment: "italic #8f5902", # class: 'c'19- Comment.Preproc: "noitalic", # class: 'cp'20-21- Keyword: "bold #004461", # class: 'k'22- Keyword.Constant: "bold #004461", # class: 'kc'23- Keyword.Declaration: "bold #004461", # class: 'kd'24- Keyword.Namespace: "bold #004461", # class: 'kn'25- Keyword.Pseudo: "bold #004461", # class: 'kp'26- Keyword.Reserved: "bold #004461", # class: 'kr'27- Keyword.Type: "bold #004461", # class: 'kt'28-29- Operator: "#582800", # class: 'o'30- Operator.Word: "bold #004461", # class: 'ow' - like keywords31-32- Punctuation: "bold #000000", # class: 'p'33-34- # because special names such as Name.Class, Name.Function, etc.35- # are not recognized as such later in the parsing, we choose them36- # to look the same as ordinary variables.37- Name: "#000000", # class: 'n'38- Name.Attribute: "#c4a000", # class: 'na' - to be revised39- Name.Builtin: "#004461", # class: 'nb'40- Name.Builtin.Pseudo: "#3465a4", # class: 'bp'41- Name.Class: "#000000", # class: 'nc' - to be revised42- Name.Constant: "#000000", # class: 'no' - to be revised43- Name.Decorator: "#888", # class: 'nd' - to be revised44- Name.Entity: "#ce5c00", # class: 'ni'45- Name.Exception: "bold #cc0000", # class: 'ne'46- Name.Function: "#000000", # class: 'nf'47- Name.Property: "#000000", # class: 'py'48- Name.Label: "#f57900", # class: 'nl'49- Name.Namespace: "#000000", # class: 'nn' - to be revised50- Name.Other: "#000000", # class: 'nx'51- Name.Tag: "bold #004461", # class: 'nt' - like a keyword52- Name.Variable: "#000000", # class: 'nv' - to be revised53- Name.Variable.Class: "#000000", # class: 'vc' - to be revised54- Name.Variable.Global: "#000000", # class: 'vg' - to be revised55- Name.Variable.Instance: "#000000", # class: 'vi' - to be revised56-57- Number: "#990000", # class: 'm'58-59- Literal: "#000000", # class: 'l'60- Literal.Date: "#000000", # class: 'ld'61-62- String: "#4e9a06", # class: 's'63- String.Backtick: "#4e9a06", # class: 'sb'64- String.Char: "#4e9a06", # class: 'sc'65- String.Doc: "italic #8f5902", # class: 'sd' - like a comment66- String.Double: "#4e9a06", # class: 's2'67- String.Escape: "#4e9a06", # class: 'se'68- String.Heredoc: "#4e9a06", # class: 'sh'69- String.Interpol: "#4e9a06", # class: 'si'70- String.Other: "#4e9a06", # class: 'sx'71- String.Regex: "#4e9a06", # class: 'sr'72- String.Single: "#4e9a06", # class: 's1'73- String.Symbol: "#4e9a06", # class: 'ss'74-75- Generic: "#000000", # class: 'g'76- Generic.Deleted: "#a40000", # class: 'gd'77- Generic.Emph: "italic #000000", # class: 'ge'78- Generic.Error: "#ef2929", # class: 'gr'79- Generic.Heading: "bold #000080", # class: 'gh'80- Generic.Inserted: "#00A000", # class: 'gi'81- Generic.Output: "#888", # class: 'go'82- Generic.Prompt: "#745334", # class: 'gp'83- Generic.Strong: "bold #000000", # class: 'gs'84- Generic.Subheading: "bold #800080", # class: 'gu'85- Generic.Traceback: "bold #a40000", # class: 'gt'86- }deleted:.gitmodules-3 removed
1-[submodule "docs/_themes"]2- path = docs/_themes3- url = https://github.com/mitsuhiko/flask-sphinx-themes.git