support 404 page
This commit is contained in:
parent
35669e7100
commit
d08c19b44e
24
template/404.html
Normal file
24
template/404.html
Normal file
@ -0,0 +1,24 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-eqiv="content-type" content="text/html;charset=utf-8">
|
||||
<title>Go by Example: Not Found</title>
|
||||
<link rel=stylesheet href="site.css">
|
||||
</head>
|
||||
<script type="text/javascript">
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-34996217-1']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
</script>
|
||||
<body>
|
||||
<div id="intro">
|
||||
<h2>Go by Example</h2>
|
||||
<p>Sorry, we couldn't find that!</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -239,6 +239,7 @@ func main() {
|
||||
ensureDir(siteDir)
|
||||
copyFile("template/site.css", siteDir+"/site.css")
|
||||
copyFile("template/favicon.ico", siteDir+"/favicon.ico")
|
||||
copyFile("template/404.html", siteDir+"/404.html")
|
||||
chapters := parseChapters()
|
||||
renderIndex(chapters)
|
||||
renderChapters(chapters)
|
||||
|
Loading…
x
Reference in New Issue
Block a user