Skip to content

Commit c52a269

Browse files
committed
docs/manual: Add some formatting when html files are generated
making it slightly more similar to gtkmm-documentation and libxml++. In Autotools builds, don't distribute the empty manual/README file.
1 parent b43cb23 commit c52a269

File tree

2 files changed

+23
-3
lines changed

2 files changed

+23
-3
lines changed

docs/doc-manual.am

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,22 @@ DOCBOOK_STYLESHEET ?= http://docbook.sourceforge.net/release/xsl/current/html/ch
2020
html_tutorialdir = $(libdocdir)/tutorial/html
2121
dist_html_tutorial_DATA = $(sort manual/html/index.html $(call vpath_listall,manual/html/*.html))
2222

23-
dist_noinst_DATA += manual/README manual/libsigc_manual.xml
23+
dist_noinst_DATA += manual/libsigc_manual.xml
2424

2525
DISTCLEANFILES += $(addprefix manual/libsigc_manual.,dvi pdf ps)
2626
MAINTAINERCLEANFILES += manual/html/*
2727

28+
# Set the use.id.as.filename param so that we don't use the chapter / section
29+
# number as the filename, otherwise the url will change every time anything is
30+
# re-ordered or inserted in the documentation
31+
xslt_params = $(strip \
32+
--param toc.section.depth 1 \
33+
--stringparam chunker.output.indent 'yes' \
34+
--stringparam chunker.output.encoding 'UTF-8' \
35+
--stringparam toc.list.type 'ul' \
36+
--stringparam use.id.as.filename '1' \
37+
)
38+
2839
manual_srcfile = $(srcdir)/manual/libsigc_manual.xml
2940

3041
# Make sure that the documentation will always have been generated before
@@ -34,7 +45,7 @@ reference/html/%: | manual/html/index.html
3445
manual/html/index.html: $(manual_srcfile)
3546
-$(AM_V_at)rm -f manual/html/*
3647
$(AM_V_at)$(MKDIR_P) manual/html
37-
$(AM_V_GEN)xsltproc -o manual/html/ --catalogs '$(DOCBOOK_STYLESHEET)' $(manual_srcfile)
48+
$(AM_V_GEN)xsltproc $(xslt_params) -o manual/html/ --catalogs '$(DOCBOOK_STYLESHEET)' $(manual_srcfile)
3849

3950
manual/libsigc_manual.dvi: $(manual_srcfile)
4051
$(AM_V_GEN)db2dvi -o manual $(manual_srcfile)

tools/tutorial-custom-cmd.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,17 @@ def html():
2020
input_xml_file = sys.argv[2]
2121
output_html_dir = sys.argv[3]
2222

23+
# Set the use.id.as.filename param so that we don't use the chapter / section
24+
# number as the filename, otherwise the url will change every time anything is
25+
# re-ordered or inserted in the documentation.
2326
# For a list of available parameters, see http://docbook.sourceforge.net/release/xsl/current/doc/html/
24-
xslt_params = []
27+
xslt_params = [
28+
'--param', 'toc.section.depth', '1',
29+
'--stringparam', 'chunker.output.indent', 'yes',
30+
'--stringparam', 'chunker.output.encoding', 'UTF-8',
31+
'--stringparam', 'toc.list.type', 'ul',
32+
'--stringparam', 'use.id.as.filename', '1',
33+
]
2534

2635
xslt_stylesheet = 'http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl'
2736

0 commit comments

Comments
 (0)