Skip to content

Commit c2f4d7a

Browse files
authored
[Docs] New docs theme based on ESP-IDF style (#6512)
* Rebase with master * [Docs] Changes on the docs build command * [Docs] Changes on the docs build * [Docs] ESP-DOCS version updated to 0.2.1 * [Docs] Downgrade to Jinja2 3.0.2 * Added page redirect file * Removed the target build for esp-docs v1.0.2 * Removed contents caption from index.rst * Removed TARGETS and VERSIONS * Removed versions file * Added ddocs deploy job * Added ddocs deploy job - build and deploy * Added ddocs deploy job - env vars added * Added ddocs deploy job - env vars added * Added ddocs deploy job - deploy url added * Added ddocs deploy job - deploy new vars added * Added new emv vars for production server * Added new emv vars for production server * Added secret keys env vars * Added secret keys env vars 2
1 parent 60c4eea commit c2f4d7a

File tree

90 files changed

+189
-174
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

+189
-174
lines changed

Diff for: .github/workflows/docs.yml

+61-3
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:
@@ -16,7 +16,7 @@ on:
1616
jobs:
1717

1818
build-docs:
19-
name: Build ReadTheDocs
19+
name: Build Docs
2020
runs-on: ubuntu-latest
2121
defaults:
2222
run:
@@ -35,4 +35,62 @@ jobs:
3535
# GitHub CI installs pip3 and setuptools outside the path.
3636
# Update the path to include them and run.
3737
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
38+
cd ./docs && PATH=/home/runner/.local/bin:$PATH build-docs -l en
39+
40+
deploy-docs:
41+
name: Deploy Docs
42+
runs-on: ubuntu-latest
43+
defaults:
44+
run:
45+
shell: bash
46+
steps:
47+
- uses: actions/checkout@v2
48+
with:
49+
submodules: true
50+
- uses: actions/setup-python@v2
51+
with:
52+
python-version: '3.x'
53+
- name: Deploy Production
54+
env:
55+
DOCS_BUILD_DIR: "./docs/_build/"
56+
DOCS_DEPLOY_PRIVATEKEY: ${{ secrets.DOCS_DEPLOY_KEY }}
57+
DOCS_DEPLOY_SERVER: ${{ secrets.DOCS_PROD_SERVER }}
58+
DOCS_DEPLOY_SERVER_USER: ${{ secrets.DOCS_PROD_SERVER_USER }}
59+
DOCS_DEPLOY_PATH: ${{ secrets.DOCS_PATH }}
60+
DOCS_DEPLOY_URL_BASE: ${{ secrets.DOCS_URL }}
61+
run: |
62+
PATH=/home/runner/.local/bin:$PATH pip install -r ./docs/requirements.txt --prefer-binary
63+
PATH=/home/runner/.local/bin:$PATH source ./docs/utils.sh
64+
PATH=/home/runner/.local/bin:$PATH add_doc_server_ssh_keys $DOCS_DEPLOY_PRIVATEKEY $DOCS_DEPLOY_SERVER $DOCS_DEPLOY_SERVER_USER
65+
PATH=/home/runner/.local/bin:$PATH export GIT_VER=$(git describe --always)
66+
cd ./docs && PATH=/home/runner/.local/bin:$PATH build-docs -l en
67+
PATH=/home/runner/.local/bin:$PATH deploy-docs
68+
69+
deploy-preview-docs:
70+
name: Deploy Preview Docs
71+
runs-on: ubuntu-latest
72+
defaults:
73+
run:
74+
shell: bash
75+
steps:
76+
- uses: actions/checkout@v2
77+
with:
78+
submodules: true
79+
- uses: actions/setup-python@v2
80+
with:
81+
python-version: '3.x'
82+
- name: Deploy Preview
83+
env:
84+
DOCS_BUILD_DIR: "./docs/_build/"
85+
DOCS_DEPLOY_PRIVATEKEY: ${{ secrets.DOCS_DEPLOY_KEY }}
86+
DOCS_DEPLOY_SERVER: ${{ secrets.DOCS_PREV_SERVER }}
87+
DOCS_DEPLOY_SERVER_USER: ${{ secrets.DOCS_PREV_SERVER_USER }}
88+
DOCS_DEPLOY_PATH: ${{ secrets.DOCS_PREV_PATH }}
89+
DOCS_DEPLOY_URL_BASE: ${{ secrets.DOCS_PREV_URL }}
90+
run: |
91+
PATH=/home/runner/.local/bin:$PATH pip install -r ./docs/requirements.txt --prefer-binary
92+
PATH=/home/runner/.local/bin:$PATH source ./docs/utils.sh
93+
PATH=/home/runner/.local/bin:$PATH add_doc_server_ssh_keys $DOCS_DEPLOY_PRIVATEKEY $DOCS_DEPLOY_SERVER $DOCS_DEPLOY_SERVER_USER
94+
PATH=/home/runner/.local/bin:$PATH export GIT_VER=$(git describe --always)
95+
cd ./docs && PATH=/home/runner/.local/bin:$PATH build-docs -l en
96+
PATH=/home/runner/.local/bin:$PATH 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

0 commit comments

Comments
 (0)