Sven Dowideit
22683a3b66
Make alias redirect output URL's relative
...
Closes #2093
2016-04-22 08:14:19 +02:00
Anthony Fok
9ddf52021b
Update import path of fsnotify
...
Rename "gopkg.in/fsnotify.v1" to "github.com/fsnotify/fsnotify"
per upstream recommendation.
See https://github.com/fsnotify/fsnotify/issues/108 for rationale.
2016-04-20 22:28:26 +08:00
Bjørn Erik Pedersen
c0cf1a7e37
Fix section menus for lazy blogger
...
IsMenuCurrent was always returning false for the top level entries.
Fixes #2065
2016-04-10 13:49:32 +02:00
digitalcraftsman
b7efbdc12f
hugolib: Add option to disable rendering of 404 page
...
Fixes #1889
Closes #2037
2016-04-09 20:25:59 +02:00
nitoyon
72bda5ad26
Move section initialization to Site.assembleSections
...
Closes #1527
2016-04-09 20:13:35 +02:00
Bjørn Erik Pedersen
f2ff77f3ac
Make Hugo build without Mercurial
...
By creating a fork of the Bitbucket inflect repo. It hasn't changed since 2013,
so it must be considered pretty stable.
Fixes #2062
2016-04-08 21:11:44 +02:00
Bjørn Erik Pedersen
1c3c148b38
hugolib: Un-export internal Site-methods
...
These are obviously internal and for the most part undocumented, creating lots of GoLint warnings.
See #1160
See #2014
2016-04-08 17:55:23 +02:00
Sven Dowideit
1648e327c0
Document and clean SourceRelativeLinksEval code
2016-04-07 20:10:38 +02:00
Bjørn Erik Pedersen
54750b0780
Do not create robots.txt by default
...
Meny people, including me, have a custom robots.txt in static.
Also remove that option from the command line; it doesn't feel
important enough.
Fixes ##2049
2016-04-05 22:20:39 +02:00
Bjørn Erik Pedersen
b678e90db7
Use to most specific interface in WriteDestPage
2016-04-02 00:04:08 +02:00
Bjørn Erik Pedersen
4f66f790b1
Add readFile template func
...
This also includes a refactor of the hugofs package and its usage.
The motivation for that is:
The Afero filesystems are brilliant. Hugo's way of adding a dozen of global variables for the different filesystems was a mistake. In readFile (and also in some other places in Hugo today) we need a way to restrict the access inside the working dir. We could use ioutil.ReadFile and implement the path checking, checking the base path and the dots ("..") etc. But it is obviously better to use an Afero BasePathFs combined witha ReadOnlyFs. We could create a use-once-filesystem and handle the initialization ourselves, but since this is also useful to others and the initialization depends on some other global state (which would mean to create a new file system on every invocation), we might as well do it properly and encapsulate the predefined set of filesystems. This change also leads the way, if needed, to encapsulate the file systems in a struct, making it possible to have several file system sets in action at once (parallel multilanguage site building? With Moore's law and all...)
Fixes #1551
2016-03-31 21:24:18 +02:00
Bjørn Erik Pedersen
8aec5ee2dd
hugolib: Some more unexports
2016-03-25 03:12:31 +01:00
Bjørn Erik Pedersen
fa1a9653e5
hugolib: Taxonomy GoDoc cleanup
2016-03-24 16:01:25 +01:00
Bjørn Erik Pedersen
faf2e50685
Do some minor code cleaning of Site
...
* Unexport some methods/fields
* Add some godoc
Still plenty to do here.
2016-03-23 09:43:04 +01:00
Bjørn Erik Pedersen
dc7d8a9eac
Spring cleaning of the menu code
2016-03-23 00:29:39 +01:00
Bjørn Erik Pedersen
de8fc8761a
Re-render shortcode on template or data file change
...
Fixes #1971
2016-03-21 21:09:25 -04:00
Bjørn Erik Pedersen
3529152efe
Return early from appendThemeTemplates
2016-03-17 23:36:11 +01:00
Bjørn Erik Pedersen
70739c972e
Remove unnecessary type conversions
2016-03-14 20:35:50 +01:00
Bjørn Erik Pedersen
dea185aa9b
hugolib: Remove unused code
2016-03-14 15:41:03 +01:00
Ján Koščo
be3519fac0
Use default sitemap configuration for homepage
...
Fixes #1304
2016-03-10 11:02:00 +01:00
Bjørn Erik Pedersen
973393c99e
Create template clone for late template execution
...
Fixing some breaking blogs on Go 1.6
Fixes #1879
2016-03-09 14:37:58 +01:00
Bjørn Erik Pedersen
c7acc318b5
Add some missing resets on rebuild
...
Fixes #1928
Fixes #1929
2016-03-06 16:33:32 +01:00
Bjørn Erik Pedersen
023992abad
Unexport the target handlers
...
These are of no interest outside the package.
2016-03-05 20:56:38 +01:00
Bjørn Erik Pedersen
27f8d8f963
Allow URL with extension in frontmatter
...
Fixes #1923
2016-03-05 20:50:53 +01:00
Bjørn Erik Pedersen
ccd2f4c32b
Prevent capitalized taxonomy labels
...
Fixes #1880
2016-03-03 21:54:23 +01:00
Bjørn Erik Pedersen
6b922750f3
Revert "Create template clone for late template execution"
...
This reverts commit 93b04e67f6
.
2016-02-28 12:15:33 +01:00
Bjørn Erik Pedersen
93b04e67f6
Create template clone for late template execution
...
Fixing some breaking blogs on Go 1.6
Fixes #1879
2016-02-28 11:51:51 +01:00
Bjørn Erik Pedersen
804603155f
Check for the presence of pages before setting dates
...
See #1903
2016-02-27 23:25:41 +01:00
Bjørn Erik Pedersen
75cf324322
Set Date and Lastmod for main home page
...
Fixes #1903
2016-02-27 23:21:07 +01:00
Tatsushi Demachi
e9853642e5
Listen channel before sending values to it
...
The 'results' channel is not listend before sending error values in a
loop checking IsRenderable or not. This fixes it.
2016-02-20 14:03:06 +09:00
Bjørn Erik Pedersen
50182cd06b
Remove superfluous Errorf
2016-02-16 02:05:59 +01:00
Derek Perkins
bac1ba4655
Fix spelling and go vet errors
2016-02-13 19:08:48 +08:00
Tatsushi Demachi
68e2e63d92
Fix Hugo hang up with empty content directory
...
Site.ReadPagesFromSource returns nil chan error value when a site
content directory is empty but its receiver expects to be passed
something error values via the channel.
This fixes it by returning a channel which will be immediately closed.
Fix #1797
2016-02-03 08:19:02 +09:00
Anthony Fok
57eebbf243
Use FEEDBACK instead of ERROR for empty home page warning
...
jww.ERROR.Println() seems to have become too verbose,
making the warning message intended for new users
a lot less readable.
2016-01-30 17:39:17 +08:00
Bjørn Erik Pedersen
5def6d9aee
Make the watch logger less chatty
2016-01-28 15:33:41 +01:00
Steve Francia
9413cf8499
Handle self rename operations gracefully
2016-01-26 14:33:08 -05:00
Steve Francia
7e196a8294
Handle remove & rename source operations incrementally
2016-01-26 14:30:28 -05:00
Steve Francia
e01c340915
A single file can be replaced in site.Files
2016-01-26 14:29:37 -05:00
Steve Francia
45e5091428
Process only the source content that has changed
2016-01-26 14:28:53 -05:00
Steve Francia
9f3796a31d
Read/reread individual source content files
...
next is incremental conversion
2016-01-26 14:26:23 -05:00
Steve Francia
ca6ca4f4fc
Separate handling content, data and template changes
...
Data & Templates reading independently
Need to work on page source reading and other source files
2016-01-26 14:25:39 -05:00
Steve Francia
bcc42c0549
Separate reading source and processing source operations
2016-01-25 14:41:47 -05:00
Bjørn Erik Pedersen
3526afc773
Fix some Go vet errors
2016-01-16 00:28:48 +01:00
Ivan Fraixedes
9a6dc6c791
Add embeded template for robots.txt
2016-01-05 23:36:16 +01:00
Daniel Martí
7c5a1fd16b
Replace *bytes.Buffer with io.Writer in rendering
...
Found via github.com/mvdan/interfacer.
2016-01-05 23:32:03 +01:00
Alexandre Bourget
dcad066025
Small refactor: don't call p.Permalink()
for all aliases, call it only
...
once and only if necessary.
2016-01-04 12:41:06 -05:00
Gerben Castel
6cdb8109cf
Allow renaming of sitemap.xml
2016-01-04 12:28:49 -05:00
Sven Dowideit
0f6b334b67
Source file based relative linking
...
ala GitHub repository markdown for both md files and non-md files
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2016-01-01 15:23:11 -05:00
digitalcraftsman
47587321d9
Add themesDir option to configuration
...
themesDir can be used to change the default
path of the themes folder.
Fixes 1556
2016-01-01 14:46:40 -05:00
Bjørn Erik Pedersen
8cea428802
Fix data race in non-renderable pages
...
Fixes #1601
2015-12-18 11:24:35 +01:00