Skip to content

Commit

Permalink
Added docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ggangliu committed Apr 1, 2024
1 parent 41df94c commit ced8827
Show file tree
Hide file tree
Showing 7 changed files with 152 additions and 0 deletions.
20 changes: 20 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# 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

# 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)
5 changes: 5 additions & 0 deletions docs/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Lumache
=======

**Lumache** (/lu'make/) is a Python library for cooks and food lovers that
creates recipes mixing random ingredients.
35 changes: 35 additions & 0 deletions docs/make.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=source
set BUILDDIR=build

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.https://www.sphinx-doc.org/
exit /b 1
)

if "%1" == "" goto help

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%

:end
popd
28 changes: 28 additions & 0 deletions docs/source/_static/_variables.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// Used to define scss variables, so that the config()-call is used only once (in this file) and
// inside other scss-files.
// Outside this scss-file use the here defined variables.

// Colors
$primary: config('primary', '#961a1a') !default;
$primary-opaque: config('primary-opaque', 'rgba(150, 26, 26, .5)') !default;
$secondary: config('secondary', '#379683') !default;
$cover: config('cover', '#ffffff') !default;
$white: config('white', '#ffffff') !default;
$links: config('links', '#961a1a') !default;

// Images
$cover-bg: config('cover-bg', '#961a1a');
$cover-overlay: config('cover-overlay', 'rgba(0,0,0,0)');

// pdf header content
$top-left-content: config('top-left-content', 'counter(page)') !default;
$top-center-content: config('top-center-content', '') !default;
$top-right-content: config('top-right-content', 'string(heading)') !default;

// pdf footer content
$bottom-left-content: config('bottom-left-content', '') !default;
$bottom-center-content: config('bottom-center-content', '') !default;
$bottom-right-content: config('bottom-right-content', '') !default;

$nocover: theme_option('nocover', false) !default;

Binary file added docs/source/_static/cover-bg.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 44 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# 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 = 'first-riscv'
copyright = '2024, ggangliu'
author = 'ggangliu'
release = '0.01'

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

extensions = []

templates_path = ['_templates']
exclude_patterns = []



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

html_theme = 'sphinx_rtd_theme' #'alabaster'
html_static_path = ['_static']

simplepdf_vars = {
'primary': '#FA2323',
'secondary': '#379683',
'cover': '#ffffff',
'white': '#ffffff',
'links': 'FA2323',
'cover-bg': 'url(cover-bg.jpg) no-repeat center',
'cover-overlay': 'rgba(250, 35, 35, 0.5)',
'top-left-content': 'counter(page)',
'bottom-center-content': '"Custom footer content"',
}

# conf.py
extensions = ['sphinx_simplepdf', 'rst2pdf.pdfbuilder']
pdf_documents = [('index', u'rst2pdf', u'Sample rst2pdf doc', u'ggangliu'),]
20 changes: 20 additions & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
.. first-riscv documentation master file, created by
sphinx-quickstart on Mon Apr 1 09:36:26 2024.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to first-riscv's documentation!
=======================================

.. toctree::
:maxdepth: 2
:caption: Contents:



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

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

0 comments on commit ced8827

Please sign in to comment.