From 6be6b4b74e5fd256a1bdfa098ea6541c62b30928 Mon Sep 17 00:00:00 2001 From: isaacs Date: Sat, 12 Apr 2014 22:19:36 -0700 Subject: [PATCH] doc: Add canonical url --- html/dochead.html | 1 + scripts/doc-build.sh | 2 ++ 2 files changed, 3 insertions(+) diff --git a/html/dochead.html b/html/dochead.html index f2c8a6ba..e2f0e83d 100644 --- a/html/dochead.html +++ b/html/dochead.html @@ -3,6 +3,7 @@ @NAME@ + diff --git a/scripts/doc-build.sh b/scripts/doc-build.sh index 849ffce3..cd8d4fa7 100755 --- a/scripts/doc-build.sh +++ b/scripts/doc-build.sh @@ -53,11 +53,13 @@ case $dest in exit $? ;; *.html) + url=${dest/html\//} (cat html/dochead.html && \ ./node_modules/.bin/ronn -f $src && cat html/docfoot.html)\ | sed "s|@NAME@|$name|g" \ | sed "s|@DATE@|$date|g" \ + | sed "s|@URL@|$url|g" \ | sed "s|@VERSION@|$version|g" \ | perl -pi -e 's/

([^\(]*\([0-9]\)) -- (.*?)<\/h1>/

\1<\/h1>

\2<\/p>/g' \ | perl -pi -e 's/npm-npm/npm/g' \