Skip to content

Commit a33a2cf

Browse files
committed
readthedocs: hack to fetch git-lfs objects
Signed-off-by: Luís Ferreira <[email protected]>
1 parent ce896d1 commit a33a2cf

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

conf.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,15 @@
77
# http://www.sphinx-doc.org/en/master/config
88

99
import os
10+
import sys
1011
from recommonmark.parser import CommonMarkParser
1112

13+
# PYTHONPATH = docs/source
14+
DOC_SOURCES_DIR = os.path.dirname(os.path.abspath(__file__))
15+
PROJECT_ROOT_DIR = os.path.dirname(os.path.dirname(DOC_SOURCES_DIR))
16+
sys.path.insert(0, DOC_SOURCES_DIR)
17+
print('PROJECT_ROOT_DIR', PROJECT_ROOT_DIR)
18+
1219
# -- Project information -----------------------------------------------------
1320

1421
project = 'Aurora Learning Platform'
@@ -74,6 +81,13 @@
7481
#
7582
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
7683

84+
# Hack for lacking git-lfs support ReadTheDocs
85+
if on_rtd:
86+
print('Fetching files with git_lfs')
87+
from git_lfs import fetch
88+
fetch(PROJECT_ROOT_DIR)
89+
90+
7791
import sphinx_rtd_theme
7892
html_theme = 'sphinx_rtd_theme'
7993
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]

requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
sphinx-tabs
1+
sphinx-tabs
2+
git-lfs

0 commit comments

Comments
 (0)