Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
M-ichae-l committed Aug 22, 2024
1 parent 0615240 commit e9360bf
Show file tree
Hide file tree
Showing 9 changed files with 153 additions and 1 deletion.
36 changes: 36 additions & 0 deletions .github/workflows/build-check-html.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Build Documentation

on:
push:
branches:
- main # Replace with your default branch
pull_request:
branches:
- main # Replace with your default branch

jobs:
build-:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x' # Specify the Python version used by RTD

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt # Install Sphinx and other dependencies
- name: Build documentation
run: |
make html # Build the HTML documentation
# - name: Trigger Read the Docs build
# run: |
# curl -X POST -d "" https://readthe.org/api/v2/projects/ameba-arduino-pro2-doc/versions/latest/build/ \
# -H "Authorization: token ${{ secrets.RTD_API_TOKEN }}"
32 changes: 32 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the OS, Python version and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.11"
# You can also specify other tool versions:
# nodejs: "19"
# rust: "1.64"
# golang: "1.19"

# Build documentation in the "docs/" directory with Sphinx
sphinx:
configuration: source/conf.py

# Optionally build your docs in additional formats such as PDF and ePub
formats:
- pdf
# - epub

# Optional but recommended, declare the Python requirements required
# to build your documentation
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
install:
- requirements: requirements.txt
21 changes: 21 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = source
BUILDDIR = build
SPHINXOPTS = -W

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
# ameba-docs
Ameba documents homepage
## Ameba documents homepage

https://ameba-docs-homepage.readthedocs.io/en/latest/index.html
3 changes: 3 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
sphinx-markdown-tables==0.0.17
sphinx-rtd-theme==2.0.0rc2
recommonmark
Binary file added source/_static/Realtek_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/_static/Realtek_logo_bak.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
43 changes: 43 additions & 0 deletions source/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = 'Ameba Documentation Homapage'
copyright = '2024 Realtek Semiconductor Corp. All rights reserved'
author = 'REALTEK SG'
release = 'v1.0'

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = [
'recommonmark',
'sphinx_markdown_tables',
'sphinx.ext.intersphinx'
]

templates_path = ['_templates']
exclude_patterns = []

# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_context = {
"display_github": True,
"github_user": "Ameba-AIoT",
"github_repo": "ameba-docs",
"github_version": "main",
"conf_py_path": "/source/",
}

html_logo = '_static/Realtek_logo.png'
html_theme = 'sphinx_rtd_theme'
html_static_path = ['_static']
html_css_files = [
'custom.css',
]
numfig = True
15 changes: 15 additions & 0 deletions source/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Welcome to Ameba Documentation Homepage!
===========================================

Documentation page
------------------

* `AmebaPro2 freertos <https://ameba-rtos-pro2-doc.readthedocs.io/en/latest/index.html>`_
* `AmebaPro2 arduino <https://ameba-arduino-pro2-doc.readthedocs.io/en/latest/index.html>`_

Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`

0 comments on commit e9360bf

Please sign in to comment.