Skip to content
This repository was archived by the owner on Sep 22, 2022. It is now read-only.

Commit a976bfa

Browse files
committed
если страница не найдена, выводим ошибку в консоль
добавлен стиль маркдаун-таблицам
1 parent 1e6868f commit a976bfa

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

mdserver.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ func load_post(md string) (Post, int, error) {
111111
}
112112

113113
func errorHandler(w http.ResponseWriter, r *http.Request, status int) {
114+
log.Printf("error %d %s %s\n", status, r.RemoteAddr, r.URL.Path)
114115
w.WriteHeader(status)
115116
if err := error_template.ExecuteTemplate(w, "layout", map[string]interface{}{"Error": http.StatusText(status), "Status": status}); err != nil {
116117
log.Println(err.Error())

templates/post.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,6 @@ <h1>{{.Title}}</h1>
2121
<script src="/static/highlight/highlight.pack.js"></script>
2222
<script>hljs.initHighlightingOnLoad();</script>
2323
<script type="text/javascript">
24+
$('table').addClass('table table-striped table-bordered table-condensed');
2425
</script>
2526
{{end}}

0 commit comments

Comments
 (0)