Commit graph

410 commits

Author SHA1 Message Date
Bjørn Erik Pedersen
3c405f5172 all: Document the Output Formats feature
This commit also adds a new command, docshelper, with some utility funcs that adds a JSON datafiles to /docs/data that would be a pain to create and maintain by hand.

Fixes #3242
2017-04-07 10:52:16 +02:00
Bjørn Erik Pedersen
c4a1165587 all: Handle all errors
As reported by `errcheck`.
2017-04-06 20:35:26 +02:00
Bjørn Erik Pedersen
a883948c4f Register all media types when in server mode
Fixes #3274
2017-04-04 18:05:19 +02:00
Bjørn Erik Pedersen
04d80e6e87 commands, helpers: Add correct verbose log level to the global loggers
We still use those in some cases.
2017-04-04 15:12:30 +02:00
Bjørn Erik Pedersen
ee4a33b14f commands: Fix broken commandeer 2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen
15b64d51da all: Propagate baseURL error to the callers 2017-03-27 15:43:56 +02:00
Albert Nigmatzianov
9f0b02b898 commands: Fix case of createpath in new.go 2017-03-24 22:19:03 +01:00
Eamonn
559b4007f7 commands: Keep "." directories on cleanDestinationDir
Fixes #3208
2017-03-21 13:10:31 +01:00
Stefan Buynov
9dfb9c1445 Case insensitive translation of the 'more' tag when importing from Jekyll 2017-03-18 16:16:25 +01:00
Anthony Kong
62efcdfed4 commands: Improve jekyll import date format
Allow both yyyy-mm-dd and yyyy-m-d formats in jekyll markdown
file names.
2017-03-13 12:50:57 +01:00
Bjørn Erik Pedersen
5f443bd45b commands: t.Error => t.Errorf 2017-03-11 19:07:32 +01:00
Cameron Moore
f039e3be9e parser: Refactor frontmatter parser and add tests
Lots of cleanups here:

- Refactor InterfaceToConfig and InterfaceToFrontMatter to use io.Writer.
- Simplify InterfaceToFrontMatter by wrapping InterfaceToConfig.
- Export FrontmatterType since we return it in DetectFrontMatter.
- Refactor removeTOMLIdentifier to avoid blindly replacing "+++".
- Update HandleJSONMetaData to return an empty map on nil input.
- Updates vendored goorgeous package and test for org-mode frontmatter.
- Add tests and godoc comments.

Coverage for parser package increased from 45.2% to 85.2%.
2017-03-11 17:52:25 +01:00
Albert Nigmatzianov
48120ccfd2 all: Fix some govet complaints 2017-03-09 14:18:12 +01:00
Bjørn Erik Pedersen
3669015f56 Handle Hugo version strings with patch level
Fixes #3025
2017-03-01 15:49:07 +01:00
Bjørn Erik Pedersen
a1741f192c Update versions to 0.19 release 2017-02-27 10:49:35 +01:00
bogem
7934db9169 commands: Cache logFile in createLogger 2017-02-21 15:08:45 +01:00
bogem
c7535b9c25 commands: Remove flagChanged from commandeer 2017-02-21 15:08:45 +01:00
Bjørn Erik Pedersen
2320c5682c commands: Make sure build error is logged in watch mode
See #3062
2017-02-21 09:46:56 +01:00
Bjørn Erik Pedersen
41857d036d utils: Use local logger 2017-02-21 09:41:56 +01:00
Bjørn Erik Pedersen
6d2281c8ea hugolib: Add disableKinds option
Fixes #2534
2017-02-18 22:53:23 +01:00
Bjørn Erik Pedersen
93ca7c9e95 all: Refactor to nonglobal Viper, i18n etc.
This is a final rewrite that removes all the global state in Hugo, which also enables
the use if `t.Parallel` in tests.

Updates #2701
Fixes #3016
2017-02-17 17:15:26 +01:00
Bjørn Erik Pedersen
c71e1b106e all: Refactor to nonglobal file systems
Updates #2701
Fixes #2951
2017-02-04 11:37:25 +07:00
digitalcraftsman
99fd7c684f cmd: Remove empty tags/features strings in theme.toml template 2017-01-20 23:44:40 +07:00
Bjørn Erik Pedersen
92ba7219dc commands: Fix newly broken server flag handling 2017-01-11 18:54:27 +01:00
Bjørn Erik Pedersen
45e3ed517a all: Refactor to non-global logger
Note that this looks like overkill for just the logger, and that is correct,
but this will make sense once we start with the template handling etc.

Updates #2701
2017-01-07 17:06:35 +01:00
Cameron Moore
3286b24fce commands: Show OS and ARCH in version output 2017-01-06 11:54:53 +01:00
Bjørn Erik Pedersen
c60c41e051 commans: Remove unneeded build constraint
Fixes #2886
2017-01-05 15:45:25 +01:00
Bjørn Erik Pedersen
1b46d2cfee commands, vendor: Remove log level setting in Jekyll command
And update the JWW lib.
2017-01-05 11:58:11 +01:00
Bjørn Erik Pedersen
c344b1901f commands, helpers, vendor: Update to the latest jww logger
Updates #2701
2017-01-03 16:57:43 +01:00
bogem
4352156a27 commands, helpers: Fix docs 2017-01-02 17:01:58 +01:00
bogem
52976da0ec commands: Fix case in default config variable 2017-01-02 17:01:12 +01:00
bogem
6fb4f048e1 commands: Fix case in names of some methods 2017-01-02 17:01:12 +01:00
Cameron Moore
8b0c3b9b27 helpers: Remove "no theme set" warning
Fixes #2821
2016-12-23 19:48:50 +01:00
avi
b2687ab1f7 command: Add themesDir command argument to specify themes directory 2016-12-22 09:33:08 +01:00
Bjørn Erik Pedersen
3d6fdb8ed3 Bump to 0.18 release version 2016-12-19 15:35:20 +01:00
Cameron Moore
971d1baf13 commands: Add noChmod option to disable perm sync
Includes updates to docs.

Fixes #2749
2016-11-30 08:35:30 +01:00
Bjørn Erik Pedersen
4c72eb12dc commands: Simplify 2016-11-23 18:55:51 +01:00
Bjørn Erik Pedersen
ff2498ee89 Remove ShowPlan
It is out of sync with reality, has some disabled tests, and the cost
of getting it up-to-date is too high to be worth it.
2016-11-23 16:35:49 +01:00
bogem
713f577a27 commands, hugolib: Unify case of config variable names 2016-11-22 23:43:55 +01:00
bogem
dec1706ae0 commands, hugolib, parser, tpl: Use errors.New instead of fmt.Errorf 2016-11-22 23:43:55 +01:00
bogem
1f130fd692 commands, hugolib, source, target, tpl: Get rid of some fmt statements 2016-11-22 23:43:55 +01:00
bogem
120f6b0cf2 all: Use jww instead of fmt for printing
This is an attempt to unify method for printing.
2016-11-22 22:06:48 +01:00
Bjørn Erik Pedersen
88972b0d5b node to page: Refactor the build process
To make it easier to follow and understand.

Both building and rebuilding now follow a four step flow:

1. Init
2. Process
3. Assemble
4. Render

And now there are only one Build method, used for both builds and rebuilds.

Updates #2297
2016-11-22 09:57:03 +01:00
Albert Nigmatzianov
29fda0e683 commands: Make benchmark command more useful
* Add information about average time, memory consumption and
allocations.
* Fix situation, when user provides memprofile and cpuprofile, but
cpuprofile will not created.

Fixes #2432
2016-11-19 00:06:54 +01:00
Albert Nigmatzianov
85a2d81e3c commands, tpl: Get rid of repeating viper accesses
* all: Delete some blank lines
* commands, tpl: Get rid of repeating viper accesses
2016-11-07 00:10:32 +01:00
Albert Nigmatzianov
3a86aba517 commands: Move initialization of flags in separate function
And clean up flag variables.
2016-11-03 11:33:53 +01:00
Bjørn Erik Pedersen
e8380e612f Add GitInfo
This commit adds a `GitInfo` object to `Page` if `EnableGitInfo` is set.

It then also sets `Lastmod` for the given `Page` to the author date provided by Git.

The Git integrations should be fairly performant, but it adds "some time" to the build, somewhat depending on the Git history size.

If you want, you can run without during development and turn it on when deploying to the live server: `hugo --enableGitInfo`.

Fixes #2102
2016-11-01 23:04:12 +01:00
Albert Nigmatzianov
f21e2f25c9 all: Unify case of config variable names
All config variables starts with low-case and uses camelCase.

If there is abbreviation at the beginning of the name, the whole
abbreviation will be written in low-case.
If there is abbreviation at the end of the name, the
whole abbreviation will be written in upper-case.
For example, rssURI.
2016-10-24 20:56:00 +02:00
Bjørn Erik Pedersen
d0d24b4337 commands: Do not print error on missing unknown dirs
See #2602
2016-10-19 20:08:57 +02:00
Bjørn Erik Pedersen
f0af80753c commands: Only watch relevant themes dir
The same behavior as for the root project.

Fixes #2602
2016-10-19 20:00:51 +02:00