Commit graph

19 commits

Author SHA1 Message Date
Ludovic Courtès 8c23d7a15e
doc: Remove one use of 'file-append*'.
* doc/build.scm (texinfo-manual-source)[build]: Use 'file-append', not
'file-append*', for 'htmlxref.cnf', to ensure it has the right basename.
2020-05-25 23:00:30 +02:00
Ludovic Courtès e5b495c18f
doc: Inherit md5.scm fix in custom 'guile-lib' variant.
* doc/build.scm (guile-lib/htmlprag-fixed)[source]: Remove.
[arguments]: Add 'fix-htmlprag' phase.
2020-05-18 15:08:58 +02:00
Björn Höfling 7c65fc378c
doc: Fix building the cookbook.
Fixes <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=40803>.
Reported by "operator.name" <operator.name@protonmail.com>.

* doc/build.scm (%languages): Add smaller list for the cookbook.
(syntax-highlighted-html): Adapt regexp for mono-node files to include
the cookbook.
2020-05-02 13:21:42 +02:00
Ludovic Courtès cb26edc8f6
doc: Include *.json files in the source.
This is a followup to c9f321e52a.

* doc/build.scm (texinfo-manual-source)[build]: Add *.json to #$output.
2020-04-21 23:52:19 +02:00
Ludovic Courtès deac7bf6ac
doc: Improve anchor collection.
This allows us to catch "operating_002dsystem-1", for instance.

* doc/build.scm (syntax-highlighted-html)[build](anchor-id->key): Drop
"-1" & co. from ID.
2020-04-13 12:28:41 +02:00
Ludovic Courtès c2480d1042
doc: Avoid invalid 'match' pattern in 'syntax-highlighted-html'.
This is a followup to da9deba13d.

Last-minute modification of the 'match' pattern would lead to an error:

  "multiple ellipsis patterns not allowed at same level"

* doc/build.scm (syntax-highlighted-html)[build](collect-anchors):
Add 'worthy-entry?' procedure and use it instead of the unsupported
pattern for ('dt ...).
2020-04-13 02:12:08 +02:00
Ludovic Courtès da9deba13d
doc: Emit hyperlinks in HTML output for @lisp snippets.
This makes it easier to jump to the definition of a procedure or
variable when looking at a code snippet.  There can be false-positive
because scoping rules are ignored, for example, but it should be a good
approximation.

* doc/build.scm (syntax-highlighted-html)[build](highlights->sxml*): Add
'anchors' parameter.  Add clause for ('symbol text).
(syntax-highlight): Add 'anchors' parameter.  Wrap body in named let and
use it in recursive calls.  Pass ANCHORS to 'highlights->sxml*'.
(underscore-decode, anchor-id->key, collect-anchors, html?): New procedures.
(process-file): Add 'anchors' parameter. and honor it.
Rewrite mono-node and multi-node HTML files separately.
2020-04-13 01:21:49 +02:00
Ludovic Courtès f9e0488c50
doc: Make sure 'htmlxref.cnf' is honored.
Fixes <https://bugs.gnu.org/39060>.
Reported by Tobias Geerinckx-Rice <me@tobias.gr>.

* doc/build.scm (html-manual)[build]: Copy 'htmlxref.cnf' to the current
directory so that 'makeinfo' honors it.
2020-01-12 00:19:10 +01:00
Ludovic Courtès 295c6a7e83
doc: Handle right arrows in 'syntax-highlighted-html'.
* doc/build.scm (syntax-highlighted-html)[build](entity->string): Add "rarr".
2019-11-28 13:30:53 +01:00
Ludovic Courtès 208cc522b9
doc: Use the right title in HTML indices for the cookbook.
* doc/build.scm (html-manual-indexes): Add #:title.
[build]: Replace "GNU Guix Reference Manual" by references to TITLE.
2019-10-22 18:32:52 +02:00
Julien Lepiller 2f000f2ef4
doc: More responsive online manual.
* doc/build.scm (%makeinfo-html-options): Add viewport to all generated
html pages for better mobile device support.
2019-10-21 21:17:01 +02:00
Ludovic Courtès cacb5576cc
doc: Add support for "guix-cookbook.texi" to 'build.scm'.
* doc/build.scm (%manual): New variable.
(html-manual): #:manual now defaults to %MANUAL.
[build]: Define 'language->texi-file-name' and use it.  Filter out items
of LANGUAGES that lack a .texi file.
(pdf-manual, html-manual-indexes, pdf+html-manual): #:manual now
defaults to %MANUAL.
2019-10-21 18:16:16 +02:00
Ludovic Courtès 012c93e916
doc: Support paren matching via CSS hover.
* doc/build.scm (syntax-highlighted-html)[build](pair-open/close)
(highlights->sxml*): New procedures.
(syntax-highlight): Use 'highlights->sxml*'.
2019-09-25 15:46:48 +02:00
Ludovic Courtès 7854bbeb3f
doc: Work around (htmlprag) parser issue.
* doc/build.scm (guile-lib/htmlprag-fixed): New variable.
(syntax-highlighted-html): Use it instead of GUILE-LIB.
2019-09-07 18:42:08 +02:00
Ludovic Courtès f8c143a713
doc: Highlight Scheme syntax in the HTML output.
* doc/build.scm (syntax-highlighted-html): New procedure.
(html-manual): Use it.
2019-09-07 00:36:34 +02:00
Ludovic Courtès e3e9c191ed
doc: Add 'images' directory next to HTML pages.
* doc/build.scm (html-manual): Add images/ symlinks.
2019-07-16 10:37:49 +02:00
Ludovic Courtès e591541d36
doc: Build a top-level index of the manuals.
Suggested by Julien Lepiller.

* doc/build.scm (html-manual-indexes)[build]: Add 'with-extensions'.
(translate): Actually honor DOMAIN.  Add call to 'bindtextdomain' for
ISO-CODES.
(%iso639-languages): New variable.
(language-code->name, top-level-index): New procedures.
Add call to 'write-html' for OUTPUT/index.html.
2019-07-15 12:48:49 +02:00
Ludovic Courtès 21bec78357
doc: Generalize build procedures of HTML indexes.
* doc/build.scm (html-manual-indexes)[build](sxml-index): Generalize;
add a 'title' and a 'body' parameter and honor them.
(language-index): New procedure.
(write-index): Remove.
(write-html): New procedure.
Use 'write-html' and 'language-index'.
2019-07-15 12:48:49 +02:00
Ludovic Courtès ccadafdcef
build: Add 'doc/build.scm' to build on-line copies of the manual.
* doc/build.scm: New file.
* Makefile.am (EXTRA_DIST): Add it.
2019-07-07 15:48:17 +02:00