Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
course-discovery
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
course-discovery
Commits
adc85c50
Commit
adc85c50
authored
Jun 26, 2017
by
Renzo Lucioni
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up docs configuration
Eliminates need to install Django when building docs. LEARNER-1399
parent
53e7b0a4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
29 deletions
+17
-29
docs/conf.py
+15
-27
requirements/docs.txt
+2
-2
No files found.
docs/conf.py
View file @
adc85c50
# -*- coding: utf-8 -*-
#
# Course Discovery Service documentation build configuration file, created by
# Course Discovery Service documentation build configuration file, created by
# sphinx-quickstart on Sun Feb 17 11:46:20 2013.
# sphinx-quickstart on Sun Feb 17 11:46:20 2013.
#
#
...
@@ -10,7 +8,6 @@
...
@@ -10,7 +8,6 @@
#
#
# All configuration values have a default; values that are commented out
# All configuration values have a default; values that are commented out
# serve to show the default.
# serve to show the default.
import
datetime
import
datetime
import
os
import
os
import
sys
import
sys
...
@@ -18,23 +15,10 @@ import sys
...
@@ -18,23 +15,10 @@ import sys
# on_rtd is whether we are on readthedocs.org
# on_rtd is whether we are on readthedocs.org
on_rtd
=
os
.
environ
.
get
(
'READTHEDOCS'
,
None
)
==
'True'
on_rtd
=
os
.
environ
.
get
(
'READTHEDOCS'
,
None
)
==
'True'
if
not
on_rtd
:
# only import and set the theme if we're building docs locally
import
sphinx_rtd_theme
html_theme
=
'sphinx_rtd_theme'
html_theme_path
=
[
sphinx_rtd_theme
.
get_html_theme_path
()]
# If extensions (or modules to document with autodoc) are in another directory,
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
# documentation root, use os.path.abspath to make it absolute, like shown here.
# sys.path.insert(0, os.path.abspath('.'))
# sys.path.insert(0, os.path.abspath('.'))
REPO_ROOT
=
os
.
path
.
dirname
(
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
)))
sys
.
path
.
append
(
REPO_ROOT
)
# Specify settings module (which will be picked up from the sandbox)
os
.
environ
.
setdefault
(
'DJANGO_SETTINGS_MODULE'
,
'course_discovery.settings.docs_settings'
)
import
django
django
.
setup
()
# -- General configuration -----------------------------------------------------
# -- General configuration -----------------------------------------------------
...
@@ -43,7 +27,9 @@ django.setup()
...
@@ -43,7 +27,9 @@ django.setup()
# Add any Sphinx extension module names here, as strings. They can be extensions
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions
=
[
'sphinx.ext.autodoc'
,
'sphinx.ext.napoleon'
]
extensions
=
[
'edx_theme'
,
]
# Add any paths that contain templates here, relative to this directory.
# Add any paths that contain templates here, relative to this directory.
templates_path
=
[
'_templates'
]
templates_path
=
[
'_templates'
]
...
@@ -58,7 +44,7 @@ source_suffix = '.rst'
...
@@ -58,7 +44,7 @@ source_suffix = '.rst'
master_doc
=
'index'
master_doc
=
'index'
# General information about the project.
# General information about the project.
project
=
u'
Course
Discovery Service'
project
=
u'
edX
Discovery Service'
copyright
=
u'2015-{year}, edX Inc.'
.
format
(
year
=
datetime
.
date
.
today
()
.
year
)
copyright
=
u'2015-{year}, edX Inc.'
.
format
(
year
=
datetime
.
date
.
today
()
.
year
)
# The version info for the project you're documenting, acts as replacement for
# The version info for the project you're documenting, acts as replacement for
...
@@ -201,8 +187,7 @@ latex_elements = {
...
@@ -201,8 +187,7 @@ latex_elements = {
# Grouping the document tree into LaTeX files. List of tuples
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents
=
[
latex_documents
=
[
(
'index'
,
'course_discovery.tex'
,
u'Course Discovery Service Documentation'
,
(
'index'
,
'course_discovery.tex'
,
'edX Discovery Service'
,
'edX'
,
'manual'
),
u'edX'
,
'manual'
),
]
]
# The name of an image file (relative to this directory) to place at the top of
# The name of an image file (relative to this directory) to place at the top of
...
@@ -231,8 +216,7 @@ latex_documents = [
...
@@ -231,8 +216,7 @@ latex_documents = [
# One entry per manual page. List of tuples
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
# (source start file, name, description, authors, manual section).
man_pages
=
[
man_pages
=
[
(
'index'
,
'Course Discovery Service'
,
u'Course Discovery Service Documentation'
,
(
'index'
,
'edX Discovery Service'
,
'edX Discovery Service'
,
[
'edX'
],
1
)
[
u'edX'
],
1
)
]
]
# If true, show URL addresses after external links.
# If true, show URL addresses after external links.
...
@@ -245,10 +229,15 @@ man_pages = [
...
@@ -245,10 +229,15 @@ man_pages = [
# (source start file, target name, title, author,
# (source start file, target name, title, author,
# dir menu entry, description, category)
# dir menu entry, description, category)
texinfo_documents
=
[
texinfo_documents
=
[
(
'index'
,
'Course Discovery Service'
,
u'Course Discovery Service Documentation'
,
(
u'edX'
,
'Course Discovery Service'
,
'Course Discovery Service'
,
'index'
,
'Miscellaneous'
'edX Discovery Service'
,
),
'edX Discovery Service'
,
'edX'
,
'edX Discovery Service'
,
'edX Discovery Service'
,
'Miscellaneous'
,
),
]
]
...
@@ -261,6 +250,5 @@ texinfo_documents = [
...
@@ -261,6 +250,5 @@ texinfo_documents = [
# How to display URL addresses: 'footnote', 'no', or 'inline'.
# How to display URL addresses: 'footnote', 'no', or 'inline'.
# texinfo_show_urls = 'footnote'
# texinfo_show_urls = 'footnote'
def
setup
(
app
):
def
setup
(
app
):
app
.
add_stylesheet
(
'theme_overrides.css'
)
app
.
add_stylesheet
(
'theme_overrides.css'
)
requirements/docs.txt
View file @
adc85c50
Sphinx==1.4.5
edx-sphinx-theme==1.0.2
sphinx_rtd_theme==0.1.9
Sphinx==1.5.3
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment