15 Commits

Author SHA1 Message Date
Dave Borowitz
bface279ab Set file encoding on replace_macros.py
Change-Id: I33c7a0de6ea5cf71df5993f0116f329884323dfd
2016-05-19 16:24:11 -04:00
Yuxuan 'fishy' Wang
4f5ad9d313 Use buck rule for ReleaseNotes instead of Makefile
This eliminates the last Makefile in our code base.

Also change the section style within ReleaseNotes from asciidoc style to
asciidoctor style.

Also I feel that put images/link.png under ReleaseNotes and deal with
all the resource packing is too stupid, so I used the unicode emoji
instead of the picture ("🔗"). If this is too crazy, we can also use "#"
instead :) This also affects documentation rendering.

Other side effects:

1. The css of release notes switched from default asciidoc css into
default asciidoctor css.
2. The section anchors for ReleaseNotes/index.html changed from "2_13"
to "s2_13", because asciidoctorj is unhappy with anchors without
letters.

Change-Id: I4adf2ce090385cc6b699445012f10a009892aaac
2016-05-17 23:23:31 +00:00
Saša Živkov
0b6f8feec2 Use default asciidoctor CSS style instead of doc.css
We tried building Gerrit's documentation using the asciidoctor's
standard CSS style and for many people the result looks better
than Gerrit's default doc.css.

The search box is rendered with fixed position now.  With the
asciidoctor default style sheet the "position:absolute" attribute no
longer worked as intended, because there are other elements in the
page with a "position" attribute. So the search box was placed randomly
somewhere next to a section header and screwed up the text layout
completely.

Test Plan:
$ buck build Documentation:html
$ open buck-out/gen/Documentation/html__tmp/Documentation/index.html

Change-Id: Ia276aeb5c79b9fbd9589db444a83c084f07aee40
Also-by: Michael Ochmann <michael.ochmann@sap.com>
2016-04-07 08:39:02 +00:00
Björn Pedersen
c357cebdae tools: use python on path
Use the canonical syntax to specify the python executable to use.

Avoids a fatal error if /usr/bin/python is a too old version (< 2.7).

Change-Id: I3e8affb52be993d35c0dcf90774d962a59ef5635
2015-06-18 17:10:11 +02:00
David Pursehouse
d3591cde50 Merge branch 'stable-2.10'
* stable-2.10:
  Show link on hover for h4 headings in documentation
  Update ReleaseNotes-2.10
  Do not include project watchers on new draft changes
  Fix missing return after %submit is rejected

Change-Id: I04836a9001a829b78e682ffbc62ebbdcba682f3f
2014-12-12 20:25:48 +09:00
Edwin Kempin
e55cf28de7 Show link on hover for h4 headings in documentation
E.g. in cmd-stream-events.txt we use h4 headings for the different
events and it would be nice to be able to link to them.

Change-Id: I1aaf496852a1793b34f1c694a2b2d486af0a028e
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
2014-12-11 17:09:45 +01:00
Edwin Kempin
93a17f6e1c Show link on hover for headings and anchors in documentation
For supporting users it is often useful to send them links to a
certain section in the documentation. The Gerrit documenation contains
a lot of anchors, but they are not easily accessible. If the section
is linked from the TOC the link to the section can be gained by
clicking on the link in the TOC. To link to other elements it is often
needed to check the HTML source code to find out the link target.

Make the links to section headings and anchors easier accessible by
displaying a link icon when the mouse is hovered over the heading or
anchor. By clicking on the link icon the page anchor is set and the
link can be copied from the address bar of the browser.

Having this functionality for anchors is especially useful for linking
to certain configuration parameters in the config-gerrit.html page.

The link icon is taken from the 'Freebie: Application Icon Set' [1]
which is licensed under the Creative Commons Attribution 3.0 Unported
License [2].

[1] http://tympanus.net/codrops/2012/10/02/freebie-application-icon-set-png-psd-csh/
[2] http://creativecommons.org/licenses/by/3.0/deed.en_US

Change-Id: I4377ea23ad76143fd4caa78afc30b82690e533ff
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
(cherry picked from commit a92861fb0126238014fc603257da65748efb05ca)
2014-12-09 01:14:32 +00:00
Edwin Kempin
a92861fb01 Show link on hover for headings and anchors in documentation
For supporting users it is often useful to send them links to a
certain section in the documentation. The Gerrit documenation contains
a lot of anchors, but they are not easily accessible. If the section
is linked from the TOC the link to the section can be gained by
clicking on the link in the TOC. To link to other elements it is often
needed to check the HTML source code to find out the link target.

Make the links to section headings and anchors easier accessible by
displaying a link icon when the mouse is hovered over the heading or
anchor. By clicking on the link icon the page anchor is set and the
link can be copied from the address bar of the browser.

Having this functionality for anchors is especially useful for linking
to certain configuration parameters in the config-gerrit.html page.

The link icon is taken from the 'Freebie: Application Icon Set' [1]
which is licensed under the Creative Commons Attribution 3.0 Unported
License [2].

[1] http://tympanus.net/codrops/2012/10/02/freebie-application-icon-set-png-psd-csh/
[2] http://creativecommons.org/licenses/by/3.0/deed.en_US

Change-Id: I4377ea23ad76143fd4caa78afc30b82690e533ff
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
2014-11-18 01:30:46 +00:00
Yuxuan 'fishy' Wang
537664ad70 Add searchbox option to replace_macros.py.
Search boxes in documentation are useful when search feature is
available, but it's useless when we host the documentation statically.
Add this option so we can generate search-free version of the
documentation.

Change-Id: I35aadee989ae04b7bbcffd67011634cd0dd085c1
2014-09-05 14:19:15 -07:00
Yuxuan 'fishy' Wang
61698b14e0 Use the new section title style in Asciidoctor.
We previous use the section title style like:

Section level 1
===============

Section level 2
---------------

Which have a problem in Asciidoctor that the number of "="s or "-"s must match
the number of characters in the header exactly, as a result it's easy to make
mistakes while changing the titles. Asciidoctor provides a better style like:

= Section level 1

== Section level 2

So we switched to this style.

Also fixed a bug in replace_macros.py, which will not cause any problem in the
old style.

Change-Id: I811dd7238735d98f662767c17086152cd69aea02
2013-12-20 12:55:51 -08:00
Yuxuan 'fishy' Wang
99cb68dec4 Added searchbox to documentation.
This provides the entry point of the documentation search feature.

Change-Id: Iea2b707995c0e042829db509927384dcec7aaf43
2013-11-05 12:49:43 -08:00
Yuxuan 'fishy' Wang
0fed98e0bf Upgrade asciidoctor to 0.1.4
Change-Id: If9edc39c3f41ef265276c076db01b04b68a56767
2013-10-08 10:27:08 -07:00
Yuxuan 'fishy' Wang
71acd111f4 Added handler of title in get:: macro.
This fixes part of issue 2159.

Change-Id: I32cba156b0e981ae259d610cc60e515ef83b571b
2013-10-02 12:45:14 -07:00
David Pursehouse
6c25ea8fdd Fix a few coding style nits in Buck build Python scripts
- Prefix regex strings with `r`
- Remove unused imports
- Rename variables and parameters to avoid redefinition of
  built-in types `dir` and `type`

Change-Id: Ia21667b89631c751f241dd6499a2e460e3435697
2013-09-26 16:50:07 +09:00
Yuxuan 'fishy' Wang
e6cbae9ef6 Remove asciidoc.conf
Asciidoctor doesn't support the conf file, so we remove it, do the macro
replacing ourselves, and put all the attributes into the command line
parameters.

Change-Id: I21b49e5a2d75ff0f9b52f26fccaae42fcbaa0837
2013-09-04 21:31:03 -07:00