Skip to content

Commit 5fa5993

Browse files
committed
[Docs] New docs theme based on ESP-IDF style (#6512)
1 parent 60c4eea commit 5fa5993

File tree

90 files changed

+148
-179
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+148
-179
lines changed

Diff for: .github/workflows/docs.yml

+20-8
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: ReadTheDocs CI
1+
name: Docs CI
22

33
on:
44
push:
@@ -15,8 +15,8 @@ on:
1515

1616
jobs:
1717

18-
build-docs:
19-
name: Build ReadTheDocs
18+
deploy-preview-docs:
19+
name: Deploy Preview Docs
2020
runs-on: ubuntu-latest
2121
defaults:
2222
run:
@@ -28,11 +28,23 @@ jobs:
2828
- uses: actions/setup-python@v2
2929
with:
3030
python-version: '3.x'
31-
- name: Build
31+
- name: Deploy Preview
32+
env:
33+
DOCS_BUILD_DIR: "./docs/_build/"
34+
DOCS_DEPLOY_PRIVATEKEY: ${{ secrets.DOCS_DEPLOY_KEY }}
35+
DOCS_DEPLOY_SERVER: ${{ secrets.DOCS_PREV_SERVER }}
36+
DOCS_DEPLOY_SERVER_USER: ${{ secrets.DOCS_PREV_SERVER_USER }}
37+
DOCS_DEPLOY_PATH: ${{ secrets.DOCS_PREV_PATH }}
38+
DOCS_DEPLOY_URL_BASE: ${{ secrets.DOCS_PREV_URL }}
3239
run: |
3340
sudo apt update
3441
sudo apt install python3-pip python3-setuptools
35-
# GitHub CI installs pip3 and setuptools outside the path.
36-
# Update the path to include them and run.
37-
PATH=/home/runner/.local/bin:$PATH pip3 install --user -r ./docs/requirements.txt
38-
cd ./docs && PATH=/home/runner/.local/bin:$PATH SPHINXOPTS="-W" make html
42+
source ./docs/utils.sh
43+
add_doc_server_ssh_keys $DOCS_DEPLOY_PRIVATEKEY $DOCS_DEPLOY_SERVER $DOCS_DEPLOY_SERVER_USER
44+
export GIT_VER=$(git describe --always)
45+
echo "PIP install requirements..."
46+
pip3 install --user -r ./docs/requirements.txt
47+
echo "Building the Docs..."
48+
cd ./docs && build-docs -l en
49+
echo "Deploy the Docs..."
50+
deploy-docs

Diff for: .gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ boards.sloeber.txt
2323
# Ignore docs build (Sphinx)
2424
docs/build
2525
docs/source/_build
26+
docs/__pycache__/
27+
docs/_build/
2628

2729
# Test log files
2830
*.log

Diff for: docs/Makefile

-28
This file was deleted.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

Diff for: docs/conf_common.py

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
from esp_docs.conf_docs import * # noqa: F403,F401
2+
3+
languages = ["en"]
4+
5+
# link roles config
6+
github_repo = "espressif/arduino-esp32"
7+
8+
# context used by sphinx_idf_theme
9+
html_context["github_user"] = "espressif"
10+
html_context["github_repo"] = "arduino-esp32"
11+
12+
html_static_path = ["../_static"]
13+
14+
# Conditional content
15+
16+
extensions += ['sphinx_copybutton',
17+
'sphinx_tabs.tabs',
18+
'esp_docs.esp_extensions.dummy_build_system',
19+
]
20+
21+
ESP32_DOCS = [
22+
"index.rst",
23+
]
24+
25+
# Extra options required by sphinx_idf_theme
26+
project_slug = "arduino-esp32"

Diff for: docs/source/api/i2c.rst renamed to docs/en/api/i2c.rst

+2-2

Diff for: docs/source/api/wifi.rst renamed to docs/en/api/wifi.rst

+2-2

Diff for: docs/source/boards/ESP32-C3-DevKitM-1.rst renamed to docs/en/boards/ESP32-C3-DevKitM-1.rst

+1-1

Diff for: docs/source/boards/ESP32-DevKitC-1.rst renamed to docs/en/boards/ESP32-DevKitC-1.rst

+1-1

Diff for: docs/source/boards/ESP32-S2-Saola-1.rst renamed to docs/en/boards/ESP32-S2-Saola-1.rst

+1-1

Diff for: docs/source/boards/boards.rst renamed to docs/en/boards/boards.rst

+2-2
File renamed without changes.

Diff for: docs/en/conf.py

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# -*- coding: utf-8 -*-
2+
#
3+
# English Language RTD & Sphinx config file
4+
#
5+
# Uses ../conf_common.py for most non-language-specific settings.
6+
7+
# Importing conf_common adds all the non-language-specific
8+
# parts to this conf module
9+
10+
import datetime
11+
12+
try:
13+
from conf_common import * # noqa: F403,F401
14+
except ImportError:
15+
import os
16+
import sys
17+
18+
sys.path.insert(0, os.path.abspath("../"))
19+
from conf_common import * # noqa: F403,F401
20+
21+
# General information about the project.
22+
project = "Arduino-ESP32"
23+
copyright = "2016 - {}, Espressif Systems (Shanghai) Co., Ltd".format(
24+
datetime.datetime.now().year
25+
)
26+
27+
# The language for content autogenerated by Sphinx. Refer to documentation
28+
# for a list of supported languages.
29+
language = "en"

Diff for: docs/source/faq.rst renamed to docs/en/faq.rst

Diff for: docs/source/getting_started.rst renamed to docs/en/getting_started.rst

+5-5

Diff for: docs/source/guides/docs_contributing.rst renamed to docs/en/guides/docs_contributing.rst

+1-1

Diff for: docs/source/guides/tools_menu.rst renamed to docs/en/guides/tools_menu.rst

+1-1

Diff for: docs/source/index.rst renamed to docs/en/index.rst

-1

Diff for: docs/source/installing.rst renamed to docs/en/installing.rst

+15-15

Diff for: docs/source/make.rst renamed to docs/en/make.rst

0 commit comments

Comments
 (0)