1
0
mirror of https://github.com/gohugoio/hugo.git synced 2024-05-11 05:54:58 +00:00

283 Commits

Author SHA1 Message Date
1f61f40328 Use flagChanged in all places 2016-02-27 18:01:01 +01:00
9349a889e2 Do not try to find available port if set by user
He/she probably really meant it.

Fixes #1901
2016-02-27 16:58:42 +01:00
8c84048033 Force full rebuild when site config changes
Fixes #1840
2016-02-14 15:16:55 +01:00
ad176055d9 Export MainSite var
Fixes hacdias/caddy-hugo#46
2016-02-14 13:50:03 +01:00
2d11551c53 Ignore temporary file "4913" created by Vim 2016-02-13 00:03:29 +08:00
1f326ad914 Fix bash-completion for Hugo builder flags such as --theme
by placing their SetAnnotation() calls after their definitions.

See #1824 and 87ca0d0
2016-02-06 23:49:45 +08:00
eebf00f702 Re-export HugoCmd
Caddy depends on it.

Fixes #1827
2016-02-06 12:40:16 +01:00
61197f9f29 Order the hugo comand flag vars 2016-02-05 23:25:07 +01:00
74539dea87 Unexport the remaining vars in hugo command 2016-02-05 22:58:17 +01:00
a89b2f41d6 commands: Get BaseURL from viper in server mode
Fixes #1821
2016-02-05 20:38:02 -06:00
3b596b85d1 Add renderToMemory flag
Only useful for benchmark testing as the rendered content will be ... invisible.
2016-02-05 21:30:48 +01:00
87ca0d0cbe Clean flags
* Reduce the amount of global flags
* Unexport all flag vars and commands vars
* Some other minor flag cleaning
2016-02-05 21:18:45 +01:00
ca0c67dc69 Fix a minor typo discovered by Lintian (Debian) 2016-01-30 16:46:48 +08:00
d158f7e339 Provide more detail on static sync when running with verbose 2016-01-29 16:54:33 -05:00
e8eb618166 Do not call watchConfig() when not in watch mode
See #1772

Also, force DisableLiveReload to true when running "hugo --watch"
(build-only non-server mode) to prevent livereload.ForceRefresh(),
which would end up blocking watchConfig() forever, from being called
because livereload.Initialize() is never called in this case.

This fixes the bug where "hugo --watch" could only reload config.toml
once before it gets stuck for good at livereload.ForceRefresh().

This is also consistent with Hugo's existing behaviour:
Non-server "hugo --watch" has never injected livereload.js
since the inception of the "watch" feature in Hugo v0.12.
2016-01-29 16:21:55 -05:00
c438f45629 Add flag --cleanDestinationDir=false to retain prior behavior 2016-01-29 16:14:23 -05:00
5def6d9aee Make the watch logger less chatty 2016-01-28 15:33:41 +01:00
12876ec991 Fix hugo benchmark
Appending to the site 13 times doesn't sound realistic.
2016-01-27 22:28:05 +01:00
d08e4c87a7 Rewrite commentary on static event handling 2016-01-26 14:56:42 -05:00
b0b4b82165 Permit directory removal during static sync 2016-01-26 14:33:56 -05:00
db18fd1582 Ignore .DS_Store changes (thumbnail cache file on mac) 2016-01-26 14:33:51 -05:00
9413cf8499 Handle self rename operations gracefully 2016-01-26 14:33:08 -05:00
74c90553b4 Static file incremental sync improvements
in tandem with Afero improvements
2016-01-26 14:31:43 -05:00
7e196a8294 Handle remove & rename source operations incrementally 2016-01-26 14:30:28 -05:00
9f3796a31d Read/reread individual source content files
next is incremental conversion
2016-01-26 14:26:23 -05:00
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
f3aa93fa48 Ignore temp files created by IntelliJ when saving 2016-01-25 14:41:47 -05:00
ed3015c350 update server to match latest afero 2016-01-11 21:45:05 -05:00
9a6dc6c791 Add embeded template for robots.txt 2016-01-05 23:36:16 +01:00
6cdb8109cf Allow renaming of sitemap.xml 2016-01-04 12:28:49 -05:00
8f6f13104e Copy static files changed
Fix watcher copy static theme files for
changed files

See #1644 #1559
2016-01-04 10:32:21 -05:00
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
1d6286b094 update to use cobra's sub package doc 2015-12-24 10:31:44 -05:00
a291f3c5d9 Copy only the static files changed
Update on the watcher copy static to copy only the
changed files and add an flag forceSyncStatic to
copy all statics always a static is changed

See #1644 #1559
2015-12-23 18:49:06 -05:00
277425bada Ignore temp files created by IntelliJ when saving 2015-12-23 17:45:39 -05:00
e1af7cb9d0 Use MkdirAll instead of Mkdir in hugo gen doc
Also print a feedback if the path does not exist and needs to be created.
2015-12-19 06:08:01 -07:00
de82404d35 Fix hugo server "Watching for changes" path display
especially when the given `--source` path is a relative directory.

Also, when `--source` is specified, make WorkingDir an absolute path
from the very beginning, to be consistent with the case when `--source`
is not given.  Otherwise, the function name helpers.AbsPathify(), which
prepends WorkingDir to a relative path, does not really make sense.

Fixes #1721
2015-12-19 05:19:31 -07:00
3574304c68 Improve some random feedback messages
Also clean up a couple random comments.
2015-12-16 21:26:51 -07:00
9c39593dee Move cobra.MousetrapHelpText to hugo_windows.go
Fix build error due to Cobra API change, see
spf13/cobra#195: Compile mousetrap only on Windows
2015-12-16 21:26:47 -07:00
c1e134f1c2 Add --source flag back to hugo new command
v0.15 had it, but I removed it inadvertently for 0.16-DEV
in commit 00d04774 in PR #1652.

Also add directory bash-completion for `--source`
for `hugo convert`, `hugo list` and `hugo new`.

See #1624, #1589
2015-12-16 00:00:05 -07:00
d1bec54293 Do not fail on unknown Jekyll file
Fixes #1705
2015-12-14 15:30:58 +01:00
8509727fe8 Add copyright header to that source files that don’t have one.
See #1646
2015-12-10 15:19:38 -07:00
e29ede7055 Fix some of the "new site" tests 2015-12-08 17:38:48 -05:00
56d6c0be5a Turn off failing new site test
Until @spf13 gets some free time in his busy calendar.

See #1680
2015-12-08 19:25:34 +01:00
e445c35d6a Fix copyright headers in source files
Still need to add some missing headers and an AUTHORS file.

See #1646
2015-12-07 19:57:01 +01:00
f6fdfcd429 Added 'themes' as a default new site directory
Fixes #1507
2015-12-04 02:19:53 -07:00
cd062623bd Fix crash with "config", "check" and "benchmark"
The crash was introduced by commit 00d04774 in PR #1652
where access to NoTimes was attempted even though --noTimes
was not defined for the config, check and benchmark commands.

Special thanks to @bep for the heads-up!

See also #1624 - CLI UX: Flags shouldn't be global
2015-12-03 12:02:38 -07:00
c1b5a48f4e Add sanity checks for hugo import jekyll
Also add `--force` flag copied from `hugo new site`.

Fixes #1625
2015-12-03 00:39:00 -07:00
00d04774f0 Change most global flags into local ones
This is to ensure that only the relevant command-line flags
for a certain Hugo subcommand is shown to the end user,
reducing clutter and improving user experience.

Fixes #1624 - CLI UX: Flags shouldn't be global
2015-12-03 00:36:38 -07:00
c9526f6e3f Revise format for "Unable to locate Config file" error 2015-12-03 00:28:09 -07:00