Skip to content
This repository has been archived by the owner on May 2, 2023. It is now read-only.

Commit

Permalink
doc: Add canonical url
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacs committed Apr 13, 2014
1 parent fa0fa8c commit 6be6b4b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions html/dochead.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<title>@NAME@</title>
<meta http-equiv="content-type" value="text/html;utf-8">
<link rel="stylesheet" type="text/css" href="../../static/style.css">
<link rel="canonical" href="https://www.npmjs.org/@URL@">
<script async=true src="../../static/toc.js"></script>

<body>
Expand Down
2 changes: 2 additions & 0 deletions scripts/doc-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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' \
Expand Down

0 comments on commit 6be6b4b

Please sign in to comment.