Currently, if the blog binary is executed outside the root directory
without any additional flags, it bails out with the following error -
"open template/root.tmpl: no such file or directory"
This CL prints out a more user friendly error which allows the user to
learn that there is a flag with which the template directory can be set.
Fixesgolang/go#22622
Change-Id: I726e7c28f5e5036146769ca01516368f45a6262c
Reviewed-on: https://go-review.googlesource.com/86855
Run-TryBot: Andrew Gerrand <adg@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Andrew Gerrand <adg@golang.org>
Rewrite performed with this command:
sed -i '' 's_code.google.com/p/go\._golang.org/x/_g' \
$(grep -lr 'code.google.com/p/go.' *)
LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/170920043
When computing the time for the "updated" tag of the atom feed, the
current code checks if there is more than one article and if that is
not true, it sets the time to the zero time.Time. This means that
the feed also gets the zero time in this tag when there is exactly one
article.
This trivial patch fixes this so that when there is exactly one
article, the time is set to that article's time.
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/18420044
The blog code is quite generic and with the replacement of template and
static files, it can be re-used. But the atom feed title is hard-coded
into the code. This patch adds a field to set the atom feed title to
the Config structure and uses it in the code where the title was
previously hard-coded.
A CL sent separately will set this Config field in the main package in
the go.blog sub-repository. (See CL 16850043 for that other patch).
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/16830043
Fixesgolang/go#6539
The problem happens on my win7,
for example, the path is "/content\\foo.article".
It leads to the wrong link in generated html page.
So I think we should replace all"\\" with "/" in path string at first.
R=golang-dev, dsymonds, mirtchovski, dave, adg, alex.brainman
CC=golang-dev
https://golang.org/cl/14023043