-
Notifications
You must be signed in to change notification settings - Fork 710
Deploy docs to gh-pages branch from Travis builds #199
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
Conversation
|
I’m doing this because a few days ago I was looking for the generated HarfBuzz documentation and couldn’t find it anywhere online. |
98e93ca to
f7ca168
Compare
|
This is amazing, thanks! Gives us a new hope for actually getting documentation written down. |
|
nice! |
|
May be we can move the relevant bits from http://www.freedesktop.org/wiki/Software/HarfBuzz/ to the gtk-doc documentation, and make harfbuzz.org point to the gh-pages website to give it more visibility and hope for the best. |
I'd love to see that. |
|
OK, if no one beats me to it, I’ll try to figure out how to edit the docs and move the relevant information there. |
|
I moved some parts from FreeDesktop site to the docs, let me know what do you think. |
Build docs in Travis and push them to the gh-pages branch, which makes them available at http://behdad.github.io/harfbuzz/
Use chapter ids instead of numbers, so that we can reorder them, introduce new ones etc. without the numbers becoming out of date.
8d6524b to
d25317f
Compare
Deploy docs to gh-pages branch from Travis builds
|
Khaled, I'm having problems running the travis cli tool. Can you tell me how to fix the token? |
|
Ok, I managed to set this up. Maybe we should set this to only upload on releases? |
|
It should be uploading only on tagged commits now (for tags that start with a digit), that is the closeset I can find to uploading on releases only. |
We should shut down the wiki and include everything in the doc. |
IntroAm I correct to assume that currently, the HarfBuzz docs are generated using GTK-Doc, a rather un-maintained tool which is not very extensible? DoxygenDoxygen seems to be the more-less de facto standard for documenting C++ projects. However, its outputs are not very “pretty”. But Doxygen does support a large number of inline commenting styles and can parse C++ code with those comments, and create XML files, and from them HTML intended for final consumption. SphinxSphinx is a massive project originally developed for Python documentation. It uses reStructuredText (aka reST), which is a bit more complex than Markdown but also more powerful. Sphinx has a number of sophisticated plugins that can aid the production of the documentation, and supports a number of languages. Sphinx is the engine behind the very popular ReadTheDocs site and the popular ReadTheDocs theme can also be used for documentation hosted elsewhere. BreatheThere is a project called Breathe (docs) which takes Doxygen’s XML output files and generates files that can be consumed by Sphinx. PyGObject/PyGIThere are PyGObject Python bindings for GI introspection, and a similar pure-Python implementation called pgi intended mostly for PyPy, the alternative Python interpreter. pgi-docgenThere is a pgi-docgen tool that creates Sphinx documentation for gi modules using Python introspection (either PyGObject or pgi). There already exists a repo with a number of gi-enabled docs, including one for HarfBuzz. pandocThe very mighty pandoc tool is a converter than can, among others, take Markdown input and generate reST output. So...So, I wonder: even if it were a bit awkward, perhaps it might be worth considering:
We could utilize a similar mechanism (without doxygen-breathe) for fontTools and other projects written in Python. |
|
The reason I'm proposing this: each tool is good in its own domain. I don't think authoring XML/SGML a la this is very exciting :) so I doubt we'll see a lot of contributions if hand-editing this XML is required. Doxygen is probably best at outputting API docs for C++, Markdown-in-Github wiki is best for authoring of hand-written narratives, and Sphinx generates the best-looking output. Plus, the Sphinx workflow will be useful for fontTools as well. |
|
You can use (subset of) markdown with gtk-doc for API documentation, https://developer.gnome.org/gtk-doc-manual/stable/documenting_syntax.html.en, so that is probably not the reason no one is writing any. |
|
Imho Github wiki are not as good as a regular github repo with the default
branch a gh-pages branch containing markdown files.
|
|
Dave, I think the Github Wiki is pretty good (though far from perfect of course). It is a regular git repo just like any other Github repo. The web UI is a bit different, but it does include a commit history, both aggregate and per page. By design, the Github Wiki system has less restrictions and is therefore "faster" to edit. It also lacks certain features such as branches. In essence, it's a simplified UI for a git repo with Markdown files (and images, which you can upload via commandline git). The files within a Github repo can be placed in subfolders, though it's best to keep them all in the root folder of the wiki repo. The only "wiki" feature that makes it different from the regular Markdown files is the "dynamic wiki" hyperlinking which, in case of the Github wiki, can be done using the Could you briefly elaborate on why you think the Github Wiki is not as good as a regular wiki with markdown files? |
|
Dude, keep it simple! Whenever someone implements an alternative solution and integrates it with our autotools build system and TravisCI and sends a pull-request, I'll consider it. Until then, I think we have a system in place to deploy docs, and that's already 100 times more motivating than what we had before. If you have had spent writing a page of doc about a page of comment about meta-tools used for generating docs, we would have been one page closer to being doc-complete ;). |
|
Well, I cannot contribute much to the docs proper since I know no C++. I know that my proposal ain't simple. The gist is that there should be two portions: a himan-edited "intro/manual", possibly coverong a few higher-level concepts, plus a machine-generated API docs. These two types of docs are different in nature and often one workflow is better for one type and another workflow for another. :) |
We support both now, in an integrated setting, so let's stick to it and propose people to write docs. You don't need to know C++ to contribute BTW. |
|
Yeah, I know :) I'm working on something ;) |
|
Adam, I understand that github wikis are backed by git, but there are quite For those with direct commit access, the Github website itself has an 'edit Those without direct commit access, markdown files in a real github repo Whereas with a wiki, anyone has direct commit access and there is no |
|
Indeed, that is a fair comparison. A Github wiki has fewer restrictions, has a "spam risk", allows for less control but requires less management and is friendlier towards those who aren't fluent in a git-based workflow, a Github repo with Markdown files requires more management and may be deterrent for those who don't understand e.g. what "rebase" means, but allows more control. I personally think that both can be put into good use, and I think that the right choice can be made after weighing these arguments. |
|
Thanks for the prose.io pointer, I'll check it out! |
|
Fluency with github workflow is like neoliberalism. You will be assimilated.
|
Build docs in Travis and push them to the gh-pages branch, which makes
them available at http://behdad.github.io/harfbuzz/
Behdad, you probably want to change the encrypted token with one og your own after merging this, it can be generated with: