mirror of
https://github.com/zhigang1992/npm.git
synced 2026-01-12 09:14:05 +08:00
doc: Add canonical url
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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' \
|
||||
|
||||
Reference in New Issue
Block a user