Skip to content

Commit

Permalink
doc: Write installation and small usage
Browse files Browse the repository at this point in the history
  • Loading branch information
attakei committed Mar 23, 2024
1 parent d6b168f commit 08b51dd
Show file tree
Hide file tree
Showing 9 changed files with 112 additions and 20 deletions.
4 changes: 0 additions & 4 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
===========
Change logs
===========

v0.0.0
======

Expand Down
5 changes: 4 additions & 1 deletion doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ BUILDDIR = _build
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile
.PHONY: help Makefile dev

dev:
sphinx-autobuild -b dirhtml $(SOURCEDIR) $(BUILDDIR)/dirhtml $(O)

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
Expand Down
13 changes: 13 additions & 0 deletions doc/changelogs/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
==========
Changelogs
==========

.. include:: ../../CHANGES.rst

.. toctree::
:glob:
:reversed:
:maxdepth: 1
:caption: Old changes

*
1 change: 1 addition & 0 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
# -- General configuration
extensions = [
"sphinx.ext.todo",
"sphinx_tabs.tabs",
]
templates_path = ["_templates"]
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
Expand Down
23 changes: 8 additions & 15 deletions doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,15 @@
atsphinx-mini18n
================

Overview
========

.. todo:: Write it

Installation
============
.. toctree::
:maxdepth: 1

.. todo:: Write it
usage/index
changelogs/index

Usage
=====

.. todo:: Write it
Overview
========

Configuration
=============
This is sphinx extension to build simple i18n website.

.. todo:: Write it
It is useful to deploy documentation into single deployment entrypoint (ex: GitHub Pages).
15 changes: 15 additions & 0 deletions doc/usage/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
=====
Usage
=====

Please read to use ``atsphinx-mini18n`` on your documentation.

.. warning::

This might not work with old Sphinx.

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

setup
55 changes: 55 additions & 0 deletions doc/usage/setup.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
=====
Setup
=====

To first build, you should runs two step.

Install
=======

.. warning:: After publish first version package.

This is published on PyPI.
You can install by ``pip`` command or your package management tools.

.. tabs::

.. tab:: pip-command

.. code:: console
pip install atsphinx-mini18n
.. tab:: pyproject.toml

.. code:: toml
[project]
dependencies = [
"atsphinx-mini18n",
]
Configuration
=============

At first, register extension into your ``conf.py`` of documentation.

.. code-block:: python
:name: conf.py
extensions = [
"atsphinx.mini18n",
]
First build
===========

After setup, documentation has new builder ``i18n-html`` and ``i18n-dirhtml``.

Please build document by new builders.

.. code:: console
$ make i18n-html
$ ls _build/i18n-html
index.html en
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ managed = true
dev-dependencies = [
"pytest ==7.*",
"esbonio~=0.16.4",
"sphinx-tabs~=3.4.5",
"sphinx-autobuild~=2021.3.14",
]

[tool.rye.scripts]
Expand Down
14 changes: 14 additions & 0 deletions requirements-dev.lock
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,11 @@ certifi==2024.2.2
# via requests
charset-normalizer==3.3.2
# via requests
colorama==0.4.6
# via sphinx-autobuild
docutils==0.20.1
# via sphinx
# via sphinx-tabs
esbonio==0.16.4
exceptiongroup==1.2.0
# via cattrs
Expand All @@ -38,6 +41,8 @@ iniconfig==2.0.0
# via pytest
jinja2==3.1.3
# via sphinx
livereload==2.6.3
# via sphinx-autobuild
lsprotocol==2023.0.1
# via pygls
markupsafe==2.1.5
Expand All @@ -53,18 +58,25 @@ pygls==1.3.0
# via esbonio
pygments==2.17.2
# via sphinx
# via sphinx-tabs
pyspellchecker==0.8.1
# via esbonio
pytest==7.4.4
pytz==2024.1
# via babel
requests==2.31.0
# via sphinx
six==1.16.0
# via livereload
snowballstemmer==2.2.0
# via sphinx
sphinx==7.1.2
# via atsphinx-mini18n
# via esbonio
# via sphinx-autobuild
# via sphinx-tabs
sphinx-autobuild==2021.3.14
sphinx-tabs==3.4.5
sphinxcontrib-applehelp==1.0.4
# via sphinx
sphinxcontrib-devhelp==1.0.2
Expand All @@ -79,6 +91,8 @@ sphinxcontrib-serializinghtml==1.1.5
# via sphinx
tomli==2.0.1
# via pytest
tornado==6.4
# via livereload
typing-extensions==4.10.0
# via cattrs
urllib3==2.2.1
Expand Down

0 comments on commit 08b51dd

Please sign in to comment.