Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using sphinx to generate html pages for our project static site #153

Merged
merged 6 commits into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
17 changes: 17 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Using Sphinx to build html web pages for AIBrix

## Environment setup
Make sure that your python conda environment is setup correctly. The following installs sphinx package and necessary templates.

```bash
pip install sphinx==8.0.2
pip install sphinx-book-theme==1.1.3
```

## Compile html pages

```
make html
```

Now the html paged should be generated at "website/docs/build/html/index.html". You can open this html page with your web browser as our project front page.
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
Binary file added docs/source/aibrix_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 35 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# 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 = 'AIBrix'
copyright = '2024, AIBrix Team'
author = 'AIBrix Team'
release = '0.1.0'

# -- 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_book_theme'
html_static_path = ['_static']



html_theme_options = {
'navigation_depth': 4,
}
6 changes: 6 additions & 0 deletions docs/source/getstarted/quickstart.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.. _quickstart_section:

Quickstart Section
==================

This section contains how to do a quickstart.
57 changes: 57 additions & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
.. AIBrix documentation master file, created by
sphinx-quickstart on Thu Aug 8 15:07:35 2024.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.

Welcome to AIBrix
=================

.. image:: aibrix_icon.png
:width: 400
:alt: Alternative text

AIBrix is a high-performant and easy-to-use library for LLM inference.

AIBrix is high-performant at

* This is a bulleted list.
* It has two items, the second
item uses two lines.


AIBrix is easy-to-use with

1. This is a numbered list.
2. It has two items too.
#. This is a numbered list.
#. It has two items too.

Documentation
=============

Get Started
-----------

.. toctree::
:caption: Chapter 1
:titlesonly:


getstarted/quickstart




.. toctree::
:caption: Chapter 2
:titlesonly:

serving/installation
External Link <https://www.sphinx-doc.org>






This is an example of a simple Sphinx project using the Sphinx Book Theme.
6 changes: 6 additions & 0 deletions docs/source/serving/installation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.. _installation_section:

Installation Section
====================

This section contains detailed information.
Loading