Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2014-04-13 09:19:36 +0400
committerisaacs <i@izs.me>2014-04-13 09:19:36 +0400
commit6be6b4b74e5fd256a1bdfa098ea6541c62b30928 (patch)
treec4644f4c0c7cd0c3782121ad57e72166cd79762a /scripts
parentfa0fa8cc9a8fb1356924c924dad2a4ece0d29e87 (diff)
doc: Add canonical url
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/doc-build.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/doc-build.sh b/scripts/doc-build.sh
index 849ffce3f..cd8d4fa77 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/<h1>([^\(]*\([0-9]\)) -- (.*?)<\/h1>/<h1>\1<\/h1> <p>\2<\/p>/g' \
| perl -pi -e 's/npm-npm/npm/g' \