[35199] trunk/doc-new/Makefile

simon at macports.org simon at macports.org
Thu Mar 20 06:32:50 PDT 2008


Revision: 35199
          http://trac.macosforge.org/projects/macports/changeset/35199
Author:   simon at macports.org
Date:     2008-03-20 06:32:48 -0700 (Thu, 20 Mar 2008)

Log Message:
-----------
doc-new: Convert all sections (h1-h9) to links so it's easy to link to subsections which are not in the table of contents.

Modified Paths:
--------------
    trunk/doc-new/Makefile

Modified: trunk/doc-new/Makefile
===================================================================
--- trunk/doc-new/Makefile	2008-03-20 13:18:12 UTC (rev 35198)
+++ trunk/doc-new/Makefile	2008-03-20 13:32:48 UTC (rev 35199)
@@ -58,6 +58,11 @@
 	$(CP) $(GUIDE)/resources/images/* $(GUIDE-RESULT)/
 	$(XSLTPROC) --xinclude $(STRINGPARAMS) --output $(GUIDE-RESULT)/index.html \
 	    $(GUIDE-XSL) $(GUIDE-SRC)/guide.xml
+	# Convert all sections (h1-h9) to a link so it's easy to link to them.
+	# If someone knows a better way to do this please change it.
+	$(SED) -i "" -E \
+	    's|(<h[0-9] [^>]*><a id="([^"]*)"></a>)([^<]*)(</h[0-9]>)|\1<a href="#\2">\3</a>\4|g' \
+	    $(GUIDE-RESULT)/index.html
 
 # Generate the man pages using DocBook from the xml source in $(MAN-SRC).
 # The portfile-*.xml files in $(GUIDE-SRC) are copied to $(MAN-TMP) and

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080320/11fb483b/attachment.html 


More information about the macports-changes mailing list