-
Notifications
You must be signed in to change notification settings - Fork 267
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
Changes from 3 commits
cc0cd2f
35193a5
16700ad
59aa6a8
c0dae68
d1708dd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# 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 | ||
python -m pip install sphinx | ||
pip install sphinx-book-theme | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. if we have more dependencies, let's create a requirement.txt to track the dependencies. It would be great to pin the version. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ack |
||
``` | ||
|
||
## Compile html pages | ||
|
||
``` | ||
cd website/docs | ||
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. |
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 |
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, ByteDance InfraLab-Compute' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. -> AIBrix Team |
||
author = 'ByteDance InfraLab-Compute' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. AIBrix Team There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ack |
||
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, | ||
} |
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. |
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. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
.. _installation_section: | ||
|
||
Installation Section | ||
==================== | ||
|
||
This section contains detailed information. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
installation should be consistent? why not directly use
pip
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ack