Skip to content

Commit

Permalink
Modernised nltk.org website (#2845)
Browse files Browse the repository at this point in the history
* Added favicon, icon, moved to nltk_theme theme

Also made some small renaming changes and fixed in the .rst files.

* Significant changes to Documentation building

* Now use `better_apidoc` instead of `sphinxcontrib.apidoc`.
* This better apidoc allows for templating. I've added very simple templates for these.
* NLTK News -> Release Notes
* Split up the Table of Contents on the left hand side for more visual clarity.
* Edited some settings, e.g. autodoc_typehints

* Updated footer and TOC

* Add Module Index to TOC tree

* Remove logo, use text there instead

* Separated Team from Contribution

* Improved backticks on install documentation

* Remove nltk.rst

This file shouldn't be pushed to GitHub

* Move to using pip installed nltk_theme

* Set build-dir to 'build'

* Update RELEASE-HOWTO

* Move to using sphinx-build

* Small cleanup

* Clarified importance of creating a new tag
  • Loading branch information
tomaarsen committed Oct 11, 2021
1 parent 9f468d3 commit 03e4b4e
Show file tree
Hide file tree
Showing 12 changed files with 150 additions and 272 deletions.
13 changes: 6 additions & 7 deletions RELEASE-HOWTO.txt
Expand Up @@ -28,25 +28,24 @@ Building an NLTK distribution
- Check that installation instructions are up-to-date
(including the range of Python versions that are supported)
edit web/install.rst setup.py
- Ensure that nltk_theme is installed and updated
pip install -U nltk_theme
- Rebuild the API docs
python setup.py build_sphinx -b man --build-dir build/sphinx
sphinx-build -E ./web ./build
- Publish them
cd nltk.github.com; git pull (begin with current docs repo)
<copy them over from build/sphinx to ../nltk.github.com>
<copy them over from build to ../nltk.github.com>
git add .
git commit -m "updates for version 3.X.Y"
git push origin master

4. Create a new version
- (Optionally do this in a release branch, branching from develop branch
git checkout -b release-3.X.Y develop)
- Tag this version:
git tag -a 3.X.Y -m "version 3.X.Y"
git push --tags
verify that it shows up here: https://github.com/nltk/nltk/releases
- (Optionally merge with master branch
git checkout master
git merge --no-ff release-3.X.Y)
This is important for the website, as the footer will link to the
tag with the version from web/conf.py.

5. Release
- Make the distributions
Expand Down
13 changes: 13 additions & 0 deletions web/_templates/module.rst
@@ -0,0 +1,13 @@
{# The :autogenerated: tag is picked up by breadcrumbs.html to suppress "Edit on Github" link #}
:autogenerated:

{{ fullname }} module
{% for item in range(7 + fullname|length) -%}={%- endfor %}

.. currentmodule:: {{ fullname }}

.. automodule:: {{ fullname }}
:members:
:undoc-members:
:show-inheritance:
:member-order: bysource
34 changes: 34 additions & 0 deletions web/_templates/package.rst
@@ -0,0 +1,34 @@
{# The :autogenerated: tag is picked up by breadcrumbs.html to suppress "Edit on Github" link #}
:autogenerated:

{{ fullname }} package
{% for item in range(8 + fullname|length) -%}={%- endfor %}

.. automodule:: {{ fullname }}
:members:
:undoc-members:
:show-inheritance:

{% if subpackages %}
***********
Subpackages
***********

.. toctree::
:maxdepth: 1
{% for item in subpackages %}
{{ fullname }}.{{ item }}
{%- endfor %}
{%- endif %}

{% if submodules %}
**********
Submodules
**********

.. toctree::
:maxdepth: 1
{% for item in submodules %}
{{ fullname }}.{{ item }}
{%- endfor %}
{%- endif -%}
1 change: 1 addition & 0 deletions web/api/.gitkeep
@@ -0,0 +1 @@
# This file exists to keep this directory from being removed by git.
226 changes: 0 additions & 226 deletions web/api/nltk.rst

This file was deleted.

0 comments on commit 03e4b4e

Please sign in to comment.