<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="../assets/xml/rss.xsl" media="all"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Mariano Guerra's Log (Posts about docs)</title><link>http://marianoguerra.org/</link><description></description><atom:link href="http://marianoguerra.org/categories/docs.xml" rel="self" type="application/rss+xml"></atom:link><language>en</language><lastBuildDate>Mon, 18 Nov 2024 17:56:22 GMT</lastBuildDate><generator>Nikola (getnikola.com)</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>Improving Official Erlang Documentation</title><link>http://marianoguerra.org/posts/improving-official-erlang-documentation/</link><dc:creator>Mariano Guerra</dc:creator><description>&lt;p&gt;Many times I've heard people complaining about different aspects of the
Official Erlang documentation, one thing that I find interesting is the fact
that the Erlang documentation is really complete and detailed, so I decided to
dedicate some time to other parts, to get familiar with it I decided to start
with an "easy" one, it's presentation.&lt;/p&gt;
&lt;p&gt;So I downloaded erlang/otp:&lt;/p&gt;
&lt;pre class="literal-block"&gt;git clone https://github.com/erlang/otp.git&lt;/pre&gt;
&lt;p&gt;And did a build:&lt;/p&gt;
&lt;pre class="literal-block"&gt;# to avoid having dates formated in your local format
export LC_ALL="en_US.utf-8"
cd otp
./otp_build setup
make docs&lt;/pre&gt;
&lt;p&gt;Then I installed the result in another folder to see the result:&lt;/p&gt;
&lt;pre class="literal-block"&gt;mkdir ../erl-docs
make release_docs RELEASE_ROOT=../erl-docs&lt;/pre&gt;
&lt;p&gt;And served them to be able to navidate them:&lt;/p&gt;
&lt;pre class="literal-block"&gt;cd ../erl-docs
python3 -m http.server&lt;/pre&gt;
&lt;p&gt;If you want to give it a try you need to install the following deps on debian
based systems:&lt;/p&gt;
&lt;pre class="literal-block"&gt;sudo apt install build-essential fop xsltproc autoconf libncurses5-dev&lt;/pre&gt;
&lt;p&gt;With the docs available I started looking around, the main files to modify are:&lt;/p&gt;
&lt;dl class="simple"&gt;
&lt;dt&gt;lib/erl_docgen/priv/css/otp_doc.css&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;The stylesheet for the docs&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;lib/erl_docgen/priv/xsl/db_html.xsl&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;An &lt;a class="reference external" href="https://en.wikipedia.org/wiki/XSLT"&gt;XSLT&lt;/a&gt; file to transform xml docs
into html&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;p&gt;The problem I found at first was that to see the results of my changes to
db_html.xsl I had to do a clean and build from scratch, which involved
recompiling erlang itself, taking a lot of time.&lt;/p&gt;
&lt;p&gt;Later I found a way to only build the docs again by forcing a rebuild:&lt;/p&gt;
&lt;pre class="literal-block"&gt;make -B docs&lt;/pre&gt;
&lt;p&gt;But this still involves building the pdf files which is the part that takes the
most time, I haven't found a target that will only build the html files, if you
know how or want to try to add it in the make file it would be great.&lt;/p&gt;
&lt;p&gt;With this knowledge I started improving the docs, I will cover the main things
I changed.&lt;/p&gt;
&lt;p&gt;You can see all my chages in the &lt;a class="reference external" href="https://github.com/marianoguerra/otp/commits/improve-docs-style"&gt;improve-docs-style branch&lt;/a&gt;.&lt;/p&gt;
&lt;section id="small-styling-changes"&gt;
&lt;h2&gt;Small styling changes&lt;/h2&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;Don't use full black and white&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Set font to sans-serif&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use mono as code font&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Improve link colors&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Improve title and description markup on landing page&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Update menu icons (the folder and document icons)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Improve panel and horizontal separator styles&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Align left panel's links to the left&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="improve-code-box-color-border-and-spacing"&gt;
&lt;h2&gt;Improve code box color, border and spacing&lt;/h2&gt;
&lt;figure class="align-center"&gt;
&lt;img alt="/galleries/misc/otp-old-2.png" src="http://marianoguerra.org/galleries/misc/otp-old-2.png" style="width: 80%;"&gt;
&lt;figcaption&gt;
&lt;p&gt;Old Code Examples&lt;/p&gt;
&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;figure class="align-center"&gt;
&lt;img alt="/galleries/misc/otp-new-2.png" src="http://marianoguerra.org/galleries/misc/otp-new-2.png" style="width: 80%;"&gt;
&lt;figcaption&gt;
&lt;p&gt;New Code Examples&lt;/p&gt;
&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;/section&gt;
&lt;section id="improve-warning-and-info-boxes-color-border-and-spacing"&gt;
&lt;h2&gt;Improve warning and info boxes' color, border and spacing&lt;/h2&gt;
&lt;figure class="align-center"&gt;
&lt;img alt="/galleries/misc/otp-old-3.png" src="http://marianoguerra.org/galleries/misc/otp-old-3.png" style="width: 80%;"&gt;
&lt;figcaption&gt;
&lt;p&gt;Old Warning Dialog&lt;/p&gt;
&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;figure class="align-center"&gt;
&lt;img alt="/galleries/misc/otp-new-3.png" src="http://marianoguerra.org/galleries/misc/otp-new-3.png" style="width: 80%;"&gt;
&lt;figcaption&gt;
&lt;p&gt;New Warning Dialog&lt;/p&gt;
&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;figure class="align-center"&gt;
&lt;img alt="/galleries/misc/otp-old-4.png" src="http://marianoguerra.org/galleries/misc/otp-old-4.png" style="width: 80%;"&gt;
&lt;figcaption&gt;
&lt;p&gt;Old Info Dialog&lt;/p&gt;
&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;figure class="align-center"&gt;
&lt;img alt="/galleries/misc/otp-new-4.png" src="http://marianoguerra.org/galleries/misc/otp-new-4.png" style="width: 80%;"&gt;
&lt;figcaption&gt;
&lt;p&gt;New Info Dialog&lt;/p&gt;
&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;/section&gt;
&lt;section id="logo-improvements"&gt;
&lt;h2&gt;Logo Improvements&lt;/h2&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;Remove drop shadows from logo&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Center Erlang logo on left panel&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Erlang logo is a link to the docs' main page&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Put section description after logo and before links in left panel&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;figure class="align-center"&gt;
&lt;img alt="/galleries/misc/otp-old-1.png" src="http://marianoguerra.org/galleries/misc/otp-old-1.png" style="width: 80%;"&gt;
&lt;figcaption&gt;
&lt;p&gt;Old Landing Page&lt;/p&gt;
&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;figure class="align-center"&gt;
&lt;img alt="/galleries/misc/otp-new-1.png" src="http://marianoguerra.org/galleries/misc/otp-new-1.png" style="width: 80%;"&gt;
&lt;figcaption&gt;
&lt;p&gt;New Landing Page&lt;/p&gt;
&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;/section&gt;
&lt;section id="semantic-improvements"&gt;
&lt;h2&gt;Semantic Improvements&lt;/h2&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;Use title tags for titles&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Remove usage of &amp;lt;br/&amp;gt; and empty &amp;lt;p&amp;gt;&amp;lt;/p&amp;gt; to add vertical spacing&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use lists for link lists&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Title case section titles instead of uppercase&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Add semantic markup and classes to section titles and bodies&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Add classes to all generated markup&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The ones I couldn't figure out a semantic class I added a generic one to
help people spot them in the xsl document by inspecting the generated files&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Clicable titles for standard sections with anchors for better linking&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="improve-table-styling"&gt;
&lt;h2&gt;Improve table styling&lt;/h2&gt;
&lt;figure class="align-center"&gt;
&lt;img alt="/galleries/misc/otp-old-5.png" src="http://marianoguerra.org/galleries/misc/otp-old-5.png" style="width: 80%;"&gt;
&lt;figcaption&gt;
&lt;p&gt;Old Tables&lt;/p&gt;
&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;figure class="align-center"&gt;
&lt;img alt="/galleries/misc/otp-new-5.png" src="http://marianoguerra.org/galleries/misc/otp-new-5.png" style="width: 80%;"&gt;
&lt;figcaption&gt;
&lt;p&gt;New Tables&lt;/p&gt;
&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;/section&gt;
&lt;section id="improve-applications-page"&gt;
&lt;h2&gt;Improve applications page&lt;/h2&gt;
&lt;figure class="align-center"&gt;
&lt;img alt="/galleries/misc/otp-old-7.png" src="http://marianoguerra.org/galleries/misc/otp-old-7.png" style="width: 80%;"&gt;
&lt;figcaption&gt;
&lt;p&gt;Old Applications List&lt;/p&gt;
&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;figure class="align-center"&gt;
&lt;img alt="/galleries/misc/otp-new-7.png" src="http://marianoguerra.org/galleries/misc/otp-new-7.png" style="width: 80%;"&gt;
&lt;figcaption&gt;
&lt;p&gt;New Applications List&lt;/p&gt;
&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;/section&gt;
&lt;section id="improve-modules-page"&gt;
&lt;h2&gt;Improve modules page&lt;/h2&gt;
&lt;figure class="align-center"&gt;
&lt;img alt="/galleries/misc/otp-old-8.png" src="http://marianoguerra.org/galleries/misc/otp-old-8.png" style="width: 80%;"&gt;
&lt;figcaption&gt;
&lt;p&gt;Old Modules List&lt;/p&gt;
&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;figure class="align-center"&gt;
&lt;img alt="/galleries/misc/otp-new-8.png" src="http://marianoguerra.org/galleries/misc/otp-new-8.png" style="width: 80%;"&gt;
&lt;figcaption&gt;
&lt;p&gt;New Modules List&lt;/p&gt;
&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;/section&gt;
&lt;section id="add-progressive-enhanced-syntax-highlighting"&gt;
&lt;h2&gt;Add "progressive enhanced" syntax highlighting&lt;/h2&gt;
&lt;p&gt;At the bottom of the page there's a javascript file loaded, if successful it
will load the syntax highlighter module and css and then style all the code
blocks in the page, if it fails to load, is blocked or no js is enabled then
the code blocks will have a default styling provided by CSS.&lt;/p&gt;
&lt;p&gt;The markup was not modified in any way to add this feature.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="make-code-tokens-easier-to-differentiate-from-standard-text"&gt;
&lt;h2&gt;Make code tokens easier to differentiate from standard text&lt;/h2&gt;
&lt;p&gt;The previous style for inline code was a really light italic font, I changed it
to monospace but it was hard to distinguish, so I got some inspiration from
slack and surrounded the inline code words in a light box to make them stand
out.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="indent-exports-and-data-types-section-bodies"&gt;
&lt;h2&gt;Indent Exports and Data Types' section bodies&lt;/h2&gt;
&lt;figure class="align-center"&gt;
&lt;img alt="/galleries/misc/otp-old-6.png" src="http://marianoguerra.org/galleries/misc/otp-old-6.png" style="width: 80%;"&gt;
&lt;figcaption&gt;
&lt;p&gt;Old Data Types and Exports Sections&lt;/p&gt;
&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;figure class="align-center"&gt;
&lt;img alt="/galleries/misc/otp-new-6.png" src="http://marianoguerra.org/galleries/misc/otp-new-6.png" style="width: 80%;"&gt;
&lt;figcaption&gt;
&lt;p&gt;New Data Types and Exports Sections&lt;/p&gt;
&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;This is all for now, I have some other ideas for future improvements but they
involve changes to the documentation so I will submit them separatedly.&lt;/p&gt;
&lt;p&gt;If you have any feedback please let me know!&lt;/p&gt;
&lt;/section&gt;</description><category>docs</category><category>erlang</category><guid>http://marianoguerra.org/posts/improving-official-erlang-documentation/</guid><pubDate>Sun, 23 Oct 2016 21:55:49 GMT</pubDate></item><item><title>mozilla rhino 1.7R3 javadocs apidocs mirror</title><link>http://marianoguerra.org/posts/201112mozilla-rhino-17r3-javadocs-apidocs/</link><dc:creator>Mariano Guerra</dc:creator><description>&lt;p&gt;hasta que los muchachos de mozilla arreglen sus links rotos y suban de nuevo los javadocs de mozilla rhino este humilde servidor las postea aca&lt;br&gt;&lt;br&gt;&lt;a href="http://marianoguerra.com.ar/docs/rhino-1-7R3/index.html"&gt;http://marianoguerra.com.ar/docs/rhino-1-7R3/index.html&lt;/a&gt;&lt;br&gt;&lt;br&gt;PD: SEO friendly title :P&lt;/p&gt;</description><category>1.7</category><category>1.7R3</category><category>api</category><category>apidocs</category><category>docs</category><category>java</category><category>javadocs</category><category>javascript</category><category>js</category><category>mozilla</category><category>rhino</category><guid>http://marianoguerra.org/posts/201112mozilla-rhino-17r3-javadocs-apidocs/</guid><pubDate>Thu, 01 Dec 2011 12:38:00 GMT</pubDate></item></channel></rss>