1
0
mirror of https://github.com/golang/go synced 2024-11-05 17:06:13 -07:00
Commit Graph

11 Commits

Author SHA1 Message Date
Agniva De Sarker
8ea45f9674 blog: show a helpful error for invalid template directory
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.

Fixes golang/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>
2018-01-15 07:04:26 +00:00
Alexander Kauer
bd1cf89d8f blog/atom: support atom:link as in RFC4287 4.2.7
Change-Id: Id704a4b1f0deca1e9b090dd1fc21e7b1b55478ec
Reviewed-on: https://go-review.googlesource.com/36281
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-02-04 21:42:09 +00:00
David Symonds
24257c8cd2 tools: add import comments.
Change-Id: Idda6e64580432cb9a731e4ebf4005ee4ceb4202d
Reviewed-on: https://go-review.googlesource.com/1244
Reviewed-by: Andrew Gerrand <adg@golang.org>
2014-12-09 22:42:16 +00:00
Andrew Gerrand
5ebbcd132f go.tools: use golang.org/x/... import paths
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
2014-11-10 08:50:40 +11:00
Andrew Gerrand
50d9adec93 go.tools/blog: strip prefix when serving static content
This fix permits godoc to serve images correctly under /blog/.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/22700043
2013-11-08 13:28:32 +11:00
Brian Gitonga Marete
4a813e4058 blog: Fix atom feed's `updated' time when there's only one article.
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
2013-10-29 15:55:27 +09:00
Brian Gitonga Marete
f3120b161e blog: Make the atom feed title configurable.
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
2013-10-28 10:17:10 +02:00
Tw
da6f00a60b go.tools/blog: replace "\\" with "/" in path string to be compatible with windows platform
Fixes golang/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
2013-10-08 16:55:56 +11:00
Andrew Gerrand
228e3cbbaa go.tools/blog: remove playground package import
This is the responsibility of the godoc or blog binary,
not the blog package.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/14323043
2013-10-03 15:07:29 +10:00
Andrew Gerrand
cc069b6297 go.tools/blog: use atom and present packages from go.tools
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/13244050
2013-09-19 10:58:36 +10:00
Andrew Gerrand
2cac03d805 go.tools/blog/atom: move package from go.blog
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/13368058
2013-09-19 10:58:11 +10:00