diff --git a/.github/workflows/compile_docs.yml b/.github/workflows/compile_docs.yml index 9e6d11f6d..98ca4e677 100644 --- a/.github/workflows/compile_docs.yml +++ b/.github/workflows/compile_docs.yml @@ -39,7 +39,7 @@ jobs: run: sudo apt-get install doxygen texlive-xetex texlive-binaries texlive-lang-english latexmk fonts-freefont-otf - name: Install requirements run: | - pip install --upgrade --upgrade-strategy eager Sphinx==3.5.4 breathe==4.30.0 recommonmark==0.6.0 commonmark==0.9.1 sphinx-rtd-theme==0.5.2 sphinx-markdown-tables==0.0.15 sphinx-sitemap==2.2.0 + pip install -r docs/requirements.txt - name: Setup Emscripten cache id: cache-system-libraries uses: actions/cache@v2 diff --git a/.gitignore b/.gitignore index ebdfb3f26..0286e4ad6 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,7 @@ docs/xml docs/out_latex docs/_static/built_lv_examples docs/LVGL.pdf +docs/env out_html __pycache__ /emscripten_builder diff --git a/README.md b/README.md index 2c09b40c2..09922f859 100644 --- a/README.md +++ b/README.md @@ -161,3 +161,4 @@ lv.scr_load(scr) LVGL is an open project and contribution is very welcome. There are many ways to contribute from simply speaking about your project, through writing examples, improving the documentation, fixing bugs to hosing your own project under in LVGL. For a detailed description of contribution opportunities visit the [Contributing](https://docs.lvgl.io/latest/en/html/contributing/index.html) section of the documentation. + diff --git a/docs/_static/css/custom.css b/docs/_static/css/custom.css index 72e083dd4..a5e2c2532 100644 --- a/docs/_static/css/custom.css +++ b/docs/_static/css/custom.css @@ -51,6 +51,7 @@ code.sig-name } .wy-side-nav-search>div.version { color: #333; + display: none; /*replaced by dropdown*/ } diff --git a/docs/_templates/layout.html b/docs/_templates/layout.html new file mode 100644 index 000000000..d3c25f081 --- /dev/null +++ b/docs/_templates/layout.html @@ -0,0 +1,31 @@ +{% extends "!layout.html" %} + +{%- block extrahead %} +{{ super() }} + + + +{% endblock %} + +{% block footer %} +{{ super() }} +
+{% endblock %} diff --git a/docs/_templates/page.html b/docs/_templates/page.html new file mode 100644 index 000000000..713f58496 --- /dev/null +++ b/docs/_templates/page.html @@ -0,0 +1,45 @@ +{% extends "!page.html" %} + +{% block footer %} + + + + +{% endblock %} diff --git a/docs/build.py b/docs/build.py index 9b094bc3a..32e71c90a 100755 --- a/docs/build.py +++ b/docs/build.py @@ -37,9 +37,11 @@ os.system("sed -i \"s|html_baseurl = .*|" + base_html +"|\" conf.py") clean = 0 trans = 0 +skip_latex = False args = sys.argv[1:] if len(args) >= 1: if "clean" in args: clean = 1 + if "skip_latex" in args: skip_latex = True lang = "en" print("") @@ -55,14 +57,17 @@ print("Running doxygen") cmd("cd ../scripts && doxygen Doxyfile") # BUILD PDF -# Silly workarond to include the more or less correct PDF download link in the PDF -#cmd("cp -f " + lang +"/latex/LVGL.pdf LVGL.pdf | true") -cmd("sphinx-build -b latex . out_latex") +if not skip_latex: + # Silly workarond to include the more or less correct PDF download link in the PDF + #cmd("cp -f " + lang +"/latex/LVGL.pdf LVGL.pdf | true") + cmd("sphinx-build -b latex . out_latex") -# Generate PDF -cmd("cd out_latex && latexmk -pdf 'LVGL.tex'") -# Copy the result PDF to the main directory to make it avaiable for the HTML build -cmd("cd out_latex && cp -f LVGL.pdf ../LVGL.pdf") + # Generate PDF + cmd("cd out_latex && latexmk -pdf 'LVGL.tex'") + # Copy the result PDF to the main directory to make it avaiable for the HTML build + cmd("cd out_latex && cp -f LVGL.pdf ../LVGL.pdf") +else: + print("skipping latex build as requested") # BULD HTML cmd("sphinx-build -b html . ../out_html") diff --git a/docs/conf.py b/docs/conf.py index 345932b03..8a14efc7b 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -232,5 +232,5 @@ def setup(app): 'enable_auto_toc_tree': 'True', }, True) app.add_transform(AutoStructify) - app.add_stylesheet('css/custom.css') - app.add_stylesheet('css/fontawesome.min.css') + app.add_css_file('css/custom.css') + app.add_css_file('css/fontawesome.min.css') diff --git a/docs/requirements.txt b/docs/requirements.txt new file mode 100644 index 000000000..2603401e3 --- /dev/null +++ b/docs/requirements.txt @@ -0,0 +1,34 @@ +alabaster==0.7.12 +Babel==2.9.1 +breathe==4.30.0 +certifi==2020.12.5 +chardet==4.0.0 +commonmark==0.9.1 +docutils==0.16 +idna==2.10 +imagesize==1.2.0 +importlib-metadata==4.0.1 +Jinja2==2.11.3 +Markdown==3.3.4 +MarkupSafe==1.1.1 +packaging==20.9 +Pygments==2.9.0 +pyparsing==2.4.7 +pytz==2021.1 +recommonmark==0.6.0 +requests==2.25.1 +six==1.16.0 +snowballstemmer==2.1.0 +Sphinx==4.0.1 +sphinx-markdown-tables==0.0.15 +sphinx-rtd-theme==0.5.2 +sphinx-sitemap==2.2.0 +sphinxcontrib-applehelp==1.0.2 +sphinxcontrib-devhelp==1.0.2 +sphinxcontrib-htmlhelp==1.0.3 +sphinxcontrib-jsmath==1.0.1 +sphinxcontrib-qthelp==1.0.3 +sphinxcontrib-serializinghtml==1.1.4 +typing-extensions==3.10.0.0 +urllib3==1.26.4 +zipp==3.4.1