Am 29.07.2014 00:04, schrieb w0rp:
On Sunday, 27 July 2014 at 16:32:15 UTC, Sönke Ludwig wrote:
Am 27.07.2014 00:54, schrieb w0rp:
http://w0rp.com:8010/library/index.html


Since the site is running with vibe.d anyway, I'd think about using
registerApiDocs() instead of generating individual HTML files. This
gives much nicer URLs and also avoids potential issues with file
systems that are case insensitive. See http://vibed.org/api/ for an
example.

I have just been playing with this during this evening by learning from
the source for the vibed.org website. I managed to integrate serving the
documentation pages from /library/ just fine. This is a definite
improvement. Thank you for the suggestion. At the very, very least, the
URLs are cleaner this way. If this is paired with some automatic
recompliation of Diet templates too, then it could be much more
convenient to work with.

I set up the ddoc macros by calling the setDefaultDdocMacroFiles and
setOverrideDdocMacroFiles functions, which sets them in the global
scope. This could be better, but I couldn't figure out if there was a
way to provide the .ddoc macros to use per Package object or similar.
This doesn't matter too much right now, but it might be nice in future
to provide documentation for historical D language versions too in
future, like on the vibe.d site.

The DocGroupContext class currently returns null for its overrideMacroDefinitions and defaultMacroDefinitions properties. This would just have to be extended so that it becomes possible to inject custom values. I've added a ticket for that:
https://github.com/rejectedsoftware/ddox/issues/51


You can see some running examples on the site now.

http://w0rp.com:8010/library/std.parallelism/

Obviously if it stays that way, some 301 redirects will have to be set
up pointing from the old URLs to the new ones. I've been setting up a
few as I go already.

There is also a pending change for the current documentation that changes the current link style (balancedParens.html) to lowercase underscore notation (balanced_parens.html), so there will be a bunch of redirects already. One issue with this is that the new style will sometimes have ambiguous redirects to the canonical style (balancedParens) because it removes the case information, but I don't really see a way around that.


I'll look at playing with the style of the documentation pages some more
another evening. I've had a few ideas for improvements, and I obviously
still need to include syntax highlighting. Is this the library which is
being used on the live site now for that?

https://code.google.com/p/google-code-prettify/

That plus some modifications to add D support. But my plan was to use server side highlighting using Brian Schott's lexer in the future.

Reply via email to