Changeset 9d566b2 in sasview for docs/sphinx-docs
- Timestamp:
- Jun 13, 2017 12:29:35 PM (7 years ago)
- Branches:
- master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- afca488
- Parents:
- 0e2d287
- Location:
- docs/sphinx-docs
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
docs/sphinx-docs/build_sphinx.py
r0e2d287 r9d566b2 66 66 SPHINX_SOURCE_TEST = os.path.join(SPHINX_SOURCE, "test") 67 67 SPHINX_SOURCE_USER = os.path.join(SPHINX_SOURCE, "user") 68 KATEX_PARENT = os.path.join(SPHINX_SOURCE, "_static") 69 KATEX_PATH = os.path.join(KATEX_PARENT, "katex") 70 KATEX_VERSION = "v0.7.1" # https://github.com/khan/katex/releases 68 71 69 72 BUMPS_DOCS = os.path.join(CURRENT_SCRIPT_DIR, "..", "..", "..", … … 98 101 _remove_dir(SPHINX_BUILD) 99 102 _remove_dir(SPHINX_SOURCE) 103 _remove_dir(KATEX_PATH) 100 104 #_remove_dir(SPHINX_SOURCE_GUIFRAME) 101 105 #_remove_dir(SPHINX_SOURCE_MODELS) … … 326 330 327 331 332 def fetch_katex(version, destination="_static"): 333 from zipfile import ZipFile 334 import urllib2 335 url = "https://github.com/Khan/KaTeX/releases/download/%s/katex.zip" % version 336 cache_path = "katex_%s.zip" % version 337 if not os.path.exists(cache_path): 338 try: 339 fd_in = urllib2.urlopen(url) 340 with open(cache_path, "wb") as fd_out: 341 fd_out.write(fd_in.read()) 342 finally: 343 fd_in.close() 344 with ZipFile(cache_path) as zip: 345 zip.extractall(destination) 346 347 328 348 def retrieve_bumps_docs(): 329 349 """ … … 381 401 retrieve_user_docs() 382 402 retrieve_bumps_docs() 403 fetch_katex(version=KATEX_VERSION, destination=KATEX_PARENT) 383 404 apidoc() 384 405 build() -
docs/sphinx-docs/source/conf.py
r959eb01 r9d566b2 35 35 'sphinx.ext.todo', 36 36 'sphinx.ext.coverage', 37 ' sphinx.ext.mathjax',37 'mathjax', 38 38 'dollarmath', 39 39 'sphinx.ext.viewcode'] 40 41 STATIC_PATH = '../../_static/' 42 mathjax_path = [ 43 STATIC_PATH + 'katex/katex.min.js', 44 STATIC_PATH + 'katex/contrib/auto-render.min.js', 45 STATIC_PATH + 'rendermath.js' 46 ] 47 mathjax_css = STATIC_PATH + 'katex/katex.min.css' 48 40 49 41 50 # Add any paths that contain templates here, relative to this directory.
Note: See TracChangeset
for help on using the changeset viewer.