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
Modernised nltk.org website #2845
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Also made some small renaming changes and fixed in the .rst files.
* 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
This file shouldn't be pushed to GitHub
…/nltk into feature/website-update
@tomaarsen: wonderful! I say we go with this and continue to make incremental changes. I like your suggestion to merge this, release 3.6.5, and build the updated docs from here. |
@dannysepler thanks for your glowing review. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello!
Pull request overview
better_apidoc
instead ofsphinxcontrib.apidoc
, as the former allows templates, which proved quite useful.contribute.rst
into a separate file calledteam.rst
.Example page on the new website's documentation
The core
First things first, you can check out the new website, as generated with code from this PR, on the GitHub Pages of my nltk.github.com fork: https://tomaarsen.github.io/nltk.github.com/
This website was generated by running the following command on the root directory of nltk:
This command uses
Sphinx
(version 4.2.0) to look in theweb
folder for a config and more, while outputting the build in abuild
folder. Thisbuild
folder was then copied to themodernised
branch of https://github.com/nltk/nltk.github.com. Note that in order to be able to execute this command, a new dependency ofnltk_theme
must be downloaded:See https://github.com/tomaarsen/nltk_theme for more information on the newly made theme.
Something to keep in mind is that the website links to the source code at a particular tag in the footer. With other words, if the website is built for e.g. NLTK 3.6.5 (which doesn't exist yet), and there's no tag with that name, then this link will 404. So, when a new website is being built, ensure that there is also a tag for that version.
Further changes
Using
better_apidoc
instead ofsphinxcontrib.apidoc
The generated Table of Content trees would have a redundant layer in their tree called "Submodules" or "Subpackages", which only adds extra confusion to the website. Something similar can be seen in this SO: https://stackoverflow.com/questions/29385564/customize-templates-for-sphinx-apidoc.
As a result, I switched to using
better_apidoc
. I made simple templates for modules and packages where the "Submodules" and "Subpackages" will no longer be included in TOC trees.The remainder of the further changes are smaller, and mostly speak for themselves in the PR overview.
Feedback
At this point, I'm most interested in how users perceive the usability of the website, and how easy they consider it to find what they're after in the documentation. If you have any comments on that, I'd love to hear them.
Beyond that, I welcome any feedback on the fonts, page title, structure, layout, colors, content, the footer content, anything.
Future Changes
This PR is by no means a complete overhaul of the website, but we are due one! There are plenty of small tasks left to work on. I've enumerated some below:
news.rst
ought to be updated. Instead of having two spaces at the start of each update, we should have a*
. That way, we get a nice bulleted list in news.html.What now?
Alongside this PR I've also created nltk/nltk.github.com#18, within which I've pushed the website built for NLTK version 3.6.3. I've mostly done this so I can use the GitHub pages from my own fork of nltk.github.com to launch the website here. I will create a PR there too.
However, it seems smart to first merge this and release NLTK 3.6.5. That way, we can use the develop branch to generate the website for the new version 3.6.5, without having to do something complicated like checking out tag 3.6.3, and then copying in the
web
folder from this PR, and then generating the website.I'd love to hear your thoughts on this.