Commit graph

936 commits

Author SHA1 Message Date
Austin Ziegler
c07b10bba9 Output a timestamp with hugo server --watch
Per a [discussion][thread] on discuss, I have implemented one possible
way to do this.

[thread]: http://discuss.gohugo.io/t/output-a-timestamp-with-hugo-watch/213
2014-11-02 00:29:11 -04:00
Joel Scoble
8e368e25b1 540: add support for build information output to version command 2014-11-01 22:56:48 -04:00
bep
8cb435f1f4 Fix redirect-loop for Hugo server
An extra slash was added to the path if baseUrl had a sub-directory, causing infinite redirect loop in Go's HTTP server.

Fixes #510
2014-11-01 22:49:26 -04:00
Marcelo Glezer
2b412d4ac7 fixed server reporting Web Server is available at https://localhost:1313 when server always serve http 2014-11-01 22:33:43 -04:00
spf13
141f3e19e0 Migrating Hugo to Afero for filesystem calls. 2014-11-01 11:57:29 -04:00
spf13
20467e36b4 Improved error message when config file not found. 2014-10-16 20:20:39 -04:00
spf13
5dfc1dedb8 Big refactor of how source files are used. Also added default destination extension option. 2014-10-16 20:20:09 -04:00
Mantas
fb82f00f9d handle https prefixes in baseUrl 2014-10-07 17:18:45 -04:00
Oscar Bolmsten
b98c2088f8 Minor fix to error message when copying static files 2014-10-07 17:17:51 -04:00
Austin Ziegler
e68e7ef96f Configure footnote rendering.
- The config file can provide FootnoteAnchorPrefix, which will be used
  by blackfriday when rendering to HTML. A value of `q:` has the effect
  of making the anchor for a footnote `[^footie]` be `fn:q:footie`. The
  default is `""`.

- The config file can provide FootnoteReturnLinkContents, which will be
  used by blackfriday when rendering to HTML. A value of `^` has the
  effect of making the return link be `^` instead of `[return]`.
2014-10-07 16:43:33 -04:00
Kartik Singhal
1614b82452 Correct desc for hugo new command 2014-10-02 13:47:25 -04:00
Kartik Singhal
879e90dca7 Switch to new hompage 2014-10-02 13:39:59 -04:00
spf13
26e44506e9 adding memstat option to server 2014-09-22 09:45:05 -04:00
bep
df489b4712 Enable soft livereload of CSS and images
Prior to this commit a dummy JavaScript filename was sent to LiveReload when changing a static file (CSS, image etc.), forcing a full browser reload of the page.

This commit fixes this by sending the relative file path of the changed static resource, enabling partial live reloading for CSS- and image-changes. If more than one static file happens to end up in the same changeevent-batch, it will fall back to do a full refresh. To enable this logic, the change events with names ending with ".goutputstream*" is now filtered out as temporary.

Changes in dynamic content behaves like before.

Issue #490
2014-09-11 16:58:06 -04:00
Tatsushi Demachi
d9964451a5 More error messages at syncing static contents 2014-09-08 11:57:06 -04:00
spf13
7b3df2386d Bumping Version to 0.13-DEV 2014-09-03 11:28:40 -04:00
spf13
1363128962 Bumping Version 2014-09-01 10:05:05 -04:00
spf13
4281cbfa34 LiveReloadDisabled works with Watching properly. Fixed #335. 2014-08-25 13:49:53 -04:00
Nate Finch
a31edb3388 Support subdir in baseurl.
Mainly this was a change to helpers.MakePermalink, but to get the local server to run correctly,
we needed to redirect the path of the request from /foo to /.  In addition, I added tests for the
server's code for fixing up the base url with different config file & CLI options.
2014-08-25 11:51:51 -04:00
Joel Scoble
b10dea2955 added evaluation for toml for metadataformat date handling 2014-08-18 12:01:50 -04:00
Franklin Wise
5ae2832713 errors not propagating 2014-08-18 11:43:55 -04:00
Kevin Burke
657e4a46e8 it's/its 2014-07-26 23:43:21 -07:00
spf13
bf9595aa24 Fixed #328. Config file set appropriately. 2014-07-01 10:59:58 -04:00
Kristoffer Grönlund
35d04671d3 Add PluralizeListTitles option (default true) to allow disabling use of the inflect package 2014-06-30 15:21:09 -04:00
spf13
ca18cfef24 Setting new version 2014-06-03 14:39:46 -04:00
spf13
2b90779f0f Actually bumping the version 2014-05-29 18:45:21 -04:00
spf13
b9bba2b977 Updating Convert to handle dates properly for yaml and json
Fix bug with YAML & JSON with handling dates with 'new' and 'convert'
2014-05-29 18:45:19 -04:00
spf13
c502f078bc Add handling for publishDates (which will be ignored if in the future). Fixed #260 2014-05-29 00:48:40 -04:00
spf13
7a8b754cad Fixed #301. LiveReload works on any port now. 2014-05-28 19:01:24 -04:00
spf13
aeb06c7bcc Rename chrome to partials (in builder) 2014-05-27 18:30:25 -04:00
spf13
9173022ea7 Set verbose to Info level 2014-05-27 18:29:55 -04:00
spf13
e799100395 Fix bug so watch works on theme directories as well 2014-05-27 18:29:15 -04:00
spf13
6b8244ba67 new site works in an empty directory now 2014-05-19 09:16:40 -04:00
spf13
be1ee22032 Proper integration of live reload with automatic injection 2014-05-16 17:49:27 -04:00
spf13
60ed5bda2b Live reloading is working! Still need to incorporate cleanly. 2014-05-16 11:48:59 -04:00
spf13
296d218e67 Better handling of when the specified port is already in use 2014-05-15 17:41:03 -04:00
Dato Simó
0053be979a Correctly print server URL when base-url is specified in the command line
When running hugo server like:

    $ hugo server -s docs -b myhostname

the printed output now directs to http://myhostname:1313 instead of
(invariably) http://localhost:1313.

As per server(), BaseUrl is never empty, and the required value is always
found in Viper.
2014-05-09 23:27:21 -04:00
LK4D4
2194cc77de Add pygmentsstyle and pygmentsuseclasses options
Fixes #204

Conflicts:
	commands/hugo.go
2014-05-09 23:20:11 -04:00
Vincent Batoufflet
6049c3a10c Update Sitemap default value syntax 2014-05-09 23:11:37 -04:00
Vincent Batoufflet
2a902bbca6 Add Sitemaps config values handling 2014-05-09 23:11:33 -04:00
Vincent Batoufflet
f8e675d064 Add base Sitemap support 2014-05-09 23:11:27 -04:00
spf13
6b9d4a93da Adding new commands (new site [path], new theme [name]) 2014-05-08 18:30:58 -04:00
spf13
28ffb92b36 Adding the new command and the create package 2014-05-02 01:06:01 -04:00
spf13
ef2ad4d91f More feedback where errors happen during metadata conversion 2014-05-02 01:02:49 -04:00
spf13
3395e1cb92 Adding a command that enables converting site to a different metadata format.
Doing this revealed some bugs in the encoding functionality in some of the underlying libraries.
Please backup before using.
2014-05-01 13:23:32 -04:00
spf13
41adafbc3e Updated to work with the latest viper 2014-04-10 14:24:18 -04:00
spf13
8afff8c7c4 Preliminary Theme Support 2014-04-10 08:10:12 -04:00
spf13
c0a046cbfb Added internal rss.xml template and config option to turn off rss creation 2014-04-09 17:45:34 -04:00
spf13
93bcddebb3 Renamed Indexes to Taxonomies. Old template and config parameters still work. 2014-04-09 17:15:04 -04:00
spf13
af1acfbce7 writing indexes under more configuration conditions 2014-04-07 23:29:35 -04:00
spf13
9a83f7a01b Fixing all tests to pass with new Viper Config 2014-04-07 11:44:51 -04:00
spf13
62dd1d45c1 Hugo config abstracted into a general purpose config library called "Viper".
Hugo casting now in own library called "cast"
2014-04-05 01:40:33 -04:00
spf13
e50b9d8ac1 Adding support for logging & verbose logging. Consolidation of error handling. Integration of jWalterWeatherman library. Fixed #137 2014-03-31 13:23:34 -04:00
spf13
3a0ab5a3dd Bumping version to v0.11-dev 2014-03-04 22:03:31 -05:00
spf13
0a775650b5 bumping version for 0.10 2014-03-01 11:55:05 -05:00
Mike Keesey
2540d884d8 Fixing issues go vet reports. 2014-03-01 09:56:17 -05:00
spf13
dc068ccb87 Fix imports so hugo builds on darwin 2014-02-21 18:33:46 -05:00
mattn
8ebb85f1f7 Fix build 2014-02-18 18:40:55 -05:00
spf13
75c260fa1c Only change rLimit on OSX (where it is needed). Fixed #194 2014-02-06 00:12:05 -05:00
spf13
3e87d7a86e Automatically increase the process ulimit to maximum available. fixes #168. 2014-02-01 12:51:11 -05:00
spf13
ae9cc09b04 Adding the ability to check the system limit on open files (important for watching large sites) 2014-02-01 12:50:17 -05:00
Tibor Vass
6dd2e9a49a gofmt all go code 2014-01-29 18:03:35 -05:00
Vincent Batoufflet
ff9f6e1b2a Fix panic with HTTP serve initialization problems. 2014-01-28 23:44:43 -05:00
Krisztián Szabó
5550c4148e Added append-port flag 2013-12-28 22:01:36 -05:00
William King
e5aa08ff0c If baseurl is set then print that on the command line, else leave as default of localhost
Conflicts:
	commands/server.go
2013-12-28 14:02:10 -05:00
Egon Elbre
8d80f9b39e Added batching behavior for page building.
Quite often file watcher gets many changes and each change triggered a
build. One build per second should be sufficient. Also added tracking for
new folders.
2013-12-28 13:46:52 -05:00
Egon Elbre
e46148f948 Fix static file change detection on Windows.
Fixed windows uses different filepath separator. The filepath.ToSlash
shouldn't be used, because it can cause errors in filepath suffix and prefix
testing since "c:\a" isn't a prefix of "c:/a/b/c".
2013-12-28 13:45:38 -05:00
Caleb Spare
6da23f7449 Gofmt
Command: `gofmt -l -s -w .`
2013-12-16 17:40:10 -05:00
Matt Way
1abc2f0b86 properly use non-localhost BaseUrl in server command 2013-12-16 17:39:59 -05:00
spf13
aedfa6a2c4 Version bump 0.9 2013-11-15 21:43:46 -05:00
Michael D. Johas Teener
50d9046b64 remove initialization loop error from compile
copied HugoCmd to a local var, initialize that variable in the init
func, and then use the local var in the InitializeConfig func.
2013-11-12 17:36:23 -06:00
spf13
6017599a3c restored behavior of respecting config values unless set by command flags. fixed #116 2013-11-12 09:38:43 -05:00
Noah Campbell
23a5711d26 Fix benchmark panic
Need to initialize the Config with InitializeConfig().
2013-11-01 20:36:11 -07:00
spf13
23a711a29a Hugo updated to work with latest cobra 2013-11-01 18:43:41 -04:00
Noah Campbell
789aa6ad76 Removing check for directory: static, layouts
Removed these checks so a single file in content can generate a site.

For example, given a site with a content directory and an index.html,
running hugo -s dir will generate a project without any more input.
2013-10-31 16:06:24 -07:00
spf13
b580a25d1f Better error handling when rendering error found when in watch mode
In watch mode it should continue to watch for changes, in any other mode it should exit with a -1 error code so can check for success when scripting
2013-10-25 18:03:14 -04:00
spf13
cd71eb7389 Watching doesn't built site 2x on write (ignores rename events). Also ignores temporary files written by editors. 2013-10-24 16:45:24 -07:00
spf13
f5fda80486 simplified buildSite & better error handling around it 2013-10-09 19:14:26 -04:00
spf13
0318f7c149 Clean up server & build site logic. Fixed #94 2013-10-09 18:53:46 -04:00
spf13
e6ace71fec server command now builds prior to serving 2013-10-09 18:24:40 -04:00
spf13
be7ba0e98f server defaults to localhost unless overridden by command line flags 2013-10-04 16:03:13 -04:00
spf13
dcfcbac589 Enabling Nitro ('--stepAnalysis') again. Fix #58 2013-10-03 09:44:45 -04:00
spf13
18f2b82658 Switching to the rjson library which is more friendly to human generated json. 2013-10-01 22:45:24 -04:00
spf13
48e1068e3e fixed #85 2013-09-30 22:40:15 -04:00
spf13
3ae8dda203 Restoring build and watch functionality 2013-09-30 22:38:32 -04:00
spf13
94d7fe52f8 Change the interface to use commands and flags instead of just flags.
Better organization of main (controller style) code.
2013-09-29 02:10:29 -04:00