Skip to content

Commit

Permalink
The document supports en and ja. (#372)
Browse files Browse the repository at this point in the history
* Add an action to publish documentations for GitHub Pages.

* Update the action.

* Update the action.

* Update the action to test a document generation.

* Update the action to generate the document on main branch.

* Add i18n.

* Update an i18n action.

* Add a missed redirect html.

* Move index.html

* Modify the action to check main branch.
  • Loading branch information
tkokada authored Jun 10, 2024
1 parent 724fd09 commit a9b8a17
Show file tree
Hide file tree
Showing 103 changed files with 11,373 additions and 10,516 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/publish_pages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ jobs:
- name: Sphinx build
run: |
sphinx-apidoc -f -o docs/source/ ./aiaccel
- name: Sphinx build
run: |
sphinx-build docs/source/ _build
cd docs
make html
cp index.html build/html/
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/feature/main' }}
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: _build
publish_dir: docs/build/html
force_orphan: true
5 changes: 5 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ help:

.PHONY: help Makefile

html_%:
@$(SPHINXBUILD) -D language="$*" -b html "$(SOURCEDIR)" "$(BUILDDIR)/html/$*" $(0)

html: html_ja html_en

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
Expand Down
1 change: 1 addition & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<meta http-equiv="refresh" content="0; url=./ja/index.html">
88 changes: 88 additions & 0 deletions docs/source/_templates/breadcrumbs.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
{%- if meta is defined and meta is not none %}
{%- set check_meta = True %}
{%- else %}
{%- set check_meta = False %}
{%- endif %}

{%- if check_meta and 'github_url' in meta %}
{%- set display_github = True %}
{%- endif %}

{%- if check_meta and 'bitbucket_url' in meta %}
{%- set display_bitbucket = True %}
{%- endif %}

{%- if check_meta and 'gitlab_url' in meta %}
{%- set display_gitlab = True %}
{%- endif %}

{%- set display_vcs_links = display_vcs_links if display_vcs_links is defined else True %}

{#- Translators: This is an ARIA section label for page links, including previous/next page link and links to GitHub/GitLab/etc. -#}
<div role="navigation" aria-label="{{ _('Page navigation') }}">
<ul class="wy-breadcrumbs">
{%- block breadcrumbs %}
<div>
<select name="lang" onchange="location.href=value;">
{%- for code, display in support_languages.items() %}
<option value="{{ pathto('../' + code + '/', 1) }}{{ pathto(pagename, 0, '.') }}"
{%- if code == language %}
selected
{%- endif %}
>{{ display }}</option>
{%- endfor %}
</select>
</div>
<li><a href="{{ pathto(master_doc) }}" class="icon icon-home" aria-label="Home"></a></li>
{%- for doc in parents %}
<li class="breadcrumb-item"><a href="{{ doc.link|e }}">{{ doc.title }}</a></li>
{%- endfor %}
<li class="breadcrumb-item active">{{ title }}</li>
{%- endblock %}
{%- block breadcrumbs_aside %}
<li class="wy-breadcrumbs-aside">
{%- if hasdoc(pagename) and display_vcs_links %}
{%- if display_github %}
{%- if check_meta and 'github_url' in meta %}
<!-- User defined GitHub URL -->
<a href="{{ meta['github_url'] }}" class="fa fa-github"> {{ _('Edit on GitHub') }}</a>
{%- else %}
<a href="https://{{ github_host|default("github.com") }}/{{ github_user }}/{{ github_repo }}/{{ theme_vcs_pageview_mode or "blob" }}/{{ github_version }}{{ conf_py_path }}{{ pagename }}{{ page_source_suffix }}" class="fa fa-github"> {{ _('Edit on GitHub') }}</a>
{%- endif %}
{%- elif display_bitbucket %}
{%- if check_meta and 'bitbucket_url' in meta %}
<!-- User defined Bitbucket URL -->
<a href="{{ meta['bitbucket_url'] }}" class="fa fa-bitbucket"> {{ _('Edit on Bitbucket') }}</a>
{%- else %}
<a href="https://bitbucket.org/{{ bitbucket_user }}/{{ bitbucket_repo }}/src/{{ bitbucket_version}}{{ conf_py_path }}{{ pagename }}{{ page_source_suffix }}?mode={{ theme_vcs_pageview_mode or "view" }}" class="fa fa-bitbucket"> {{ _('Edit on Bitbucket') }}</a>
{%- endif %}
{%- elif display_gitlab %}
{%- if check_meta and 'gitlab_url' in meta %}
<!-- User defined GitLab URL -->
<a href="{{ meta['gitlab_url'] }}" class="fa fa-gitlab"> {{ _('Edit on GitLab') }}</a>
{%- else %}
<a href="https://{{ gitlab_host|default("gitlab.com") }}/{{ gitlab_user }}/{{ gitlab_repo }}/{{ theme_vcs_pageview_mode or "blob" }}/{{ gitlab_version }}{{ conf_py_path }}{{ pagename }}{{ page_source_suffix }}" class="fa fa-gitlab"> {{ _('Edit on GitLab') }}</a>
{%- endif %}
{%- elif show_source and source_url_prefix %}
<a href="{{ source_url_prefix }}{{ pagename }}{{ page_source_suffix }}">{{ _('View page source') }}</a>
{%- elif show_source and has_source and sourcename %}
<a href="{{ pathto('_sources/' + sourcename, true)|e }}" rel="nofollow"> {{ _('View page source') }}</a>
{%- endif %}
{%- endif %}
</li>
{%- endblock %}
</ul>

{%- if (theme_prev_next_buttons_location == 'top' or theme_prev_next_buttons_location == 'both') and (next or prev) %}
{#- Translators: This is an ARIA section label for sequential page links, such as previous and next page links. -#}
<div class="rst-breadcrumbs-buttons" role="navigation" aria-label="{{ _('Sequential page navigation') }}">
{%- if prev %}
<a href="{{ prev.link|e }}" class="btn btn-neutral float-left" title="{{ prev.title|striptags|e }}" accesskey="p"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> {{ _('Previous') }}</a>
{%- endif %}
{%- if next %}
<a href="{{ next.link|e }}" class="btn btn-neutral float-right" title="{{ next.title|striptags|e }}" accesskey="n">{{ _('Next') }} <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
{%- endif %}
</div>
{%- endif %}
<hr/>
</div>
37 changes: 0 additions & 37 deletions docs/source/api_reference/aiaccel.abci.rst

This file was deleted.

8 changes: 8 additions & 0 deletions docs/source/api_reference/aiaccel.cli.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@ aiaccel.cli.plot module
:undoc-members:
:show-inheritance:

aiaccel.cli.qrsh\-inherit module
--------------------------------

.. automodule:: aiaccel.cli.qrsh-inherit
:members:
:undoc-members:
:show-inheritance:

aiaccel.cli.report module
-------------------------

Expand Down
29 changes: 0 additions & 29 deletions docs/source/api_reference/aiaccel.experimental.mpi.rst

This file was deleted.

18 changes: 0 additions & 18 deletions docs/source/api_reference/aiaccel.experimental.rst

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,33 +1,41 @@
aiaccel.manager.job.model package
===================================
=================================

Submodules
----------

aiaccel.manager.job.model.abci\_model module
----------------------------------------------
--------------------------------------------

.. automodule:: aiaccel.manager.job.model.abci_model
:members:
:undoc-members:
:show-inheritance:

aiaccel.manager.job.model.abstract\_model module
--------------------------------------------------
------------------------------------------------

.. automodule:: aiaccel.manager.job.model.abstract_model
:members:
:undoc-members:
:show-inheritance:

aiaccel.manager.job.model.local\_model module
-----------------------------------------------
---------------------------------------------

.. automodule:: aiaccel.manager.job.model.local_model
:members:
:undoc-members:
:show-inheritance:

aiaccel.manager.job.model.mpi\_model module
-------------------------------------------

.. automodule:: aiaccel.manager.job.model.mpi_model
:members:
:undoc-members:
:show-inheritance:

Module contents
---------------

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
aiaccel.manager.job package
=============================
===========================

Subpackages
-----------
Expand All @@ -13,7 +13,7 @@ Submodules
----------

aiaccel.manager.job.job module
--------------------------------
------------------------------

.. automodule:: aiaccel.manager.job.job
:members:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,52 +1,59 @@
aiaccel.manager package
=========================
=======================

Subpackages
-----------

.. toctree::
:maxdepth: 4

aiaccel.manager.algorithm
aiaccel.manager.job

Submodules
----------

aiaccel.manager.abci\_manager module
----------------------------------------
------------------------------------

.. automodule:: aiaccel.manager.abci_manager
:members:
:undoc-members:
:show-inheritance:

aiaccel.manager.abstract\_manager module
--------------------------------------------
----------------------------------------

.. automodule:: aiaccel.manager.abstract_manager
:members:
:undoc-members:
:show-inheritance:

aiaccel.manager.create module
-------------------------------
-----------------------------

.. automodule:: aiaccel.manager.create
:members:
:undoc-members:
:show-inheritance:

aiaccel.manager.local\_manager module
-----------------------------------------
-------------------------------------

.. automodule:: aiaccel.manager.local_manager
:members:
:undoc-members:
:show-inheritance:

aiaccel.manager.mpi\_manager module
-----------------------------------

.. automodule:: aiaccel.manager.mpi_manager
:members:
:undoc-members:
:show-inheritance:

aiaccel.manager.pylocal\_manager module
-------------------------------------------
---------------------------------------

.. automodule:: aiaccel.manager.pylocal_manager
:members:
Expand Down
37 changes: 0 additions & 37 deletions docs/source/api_reference/aiaccel.master.evaluator.rst

This file was deleted.

Loading

0 comments on commit a9b8a17

Please sign in to comment.