Commit graph

3835 commits

Author SHA1 Message Date
Bjørn Erik Pedersen
01e54609e7
metrics: Reset benchmark timer 2017-10-07 20:41:25 +02:00
Bjørn Erik Pedersen
5800a20a25 metrics: Detect partialCached candidates
This commit adds a "cache potential" column when running `hugo --templateMetrics --templateMetricsHints`.

This is only calculated when `--templateMetricsHints` is set, as these calculations has an negative effect on the other timings.

This gives a value for partials only, and is a number between 0-100 that indicates if `partial` can be replaced with `partialCached`.

100 means that all execution of the same partial resulted in the same output.

You should do  some manual research before going "all cache".
2017-10-07 18:00:07 +02:00
Bjørn Erik Pedersen
e2e8bcbec3
tpl: Rework the partial test and benchmarks 2017-10-07 16:53:01 +02:00
Cameron Moore
66a169a249 Simplify HugoNoGitInfo in magefile 2017-10-07 14:42:54 +02:00
digitalcraftsman
2cc4765670 Add mage installation step to CONTRIBUTING.md 2017-10-05 20:09:21 +02:00
Bjørn Erik Pedersen
856fc445da
Bump Go versions in Travis config 2017-10-05 18:50:36 +02:00
Hallgeir Holien
a6ed645a34 Change last 'make' statements to 'mage' 2017-10-05 17:03:34 +02:00
Steve Divskinsy
23488f874c Minor README changes 2017-10-05 12:44:43 +02:00
Bjørn Erik Pedersen
8d2580f07c Replace make with mage
Fixes #3937
2017-10-05 10:53:02 +02:00
Bjørn Erik Pedersen
06e5633400 Merge commit 'dae5a7c61cceeb0de59f2d755f63e453f71dd9b2' 2017-10-04 09:27:30 +02:00
Bjørn Erik Pedersen
dae5a7c61c Squashed 'docs/' changes from 36d7e22f5..000ab7c42
000ab7c42 Fix `ref` and `relref` shortcode usage patterns
4e7123d20 Add som code fence lang tags
21d4f97d1 Update homepage for ox-hugo tool
668969fc4 Remove superflous back ticks
f78cf6490 Fix code example
05aaee8ce Remove background color from code shortcode
dcb0998d0 Add a Build Performance page draft
50e04593a Document templateMetrics usage
67ad36691 Merge commit 'f66d59b8991c264c3366895b5e148ea810a184cd'
f66d59b89 Squashed 'themes/gohugoioTheme/' changes from ca53082d..cdaa89c8

git-subtree-dir: docs
git-subtree-split: 000ab7c423341bb215d4ccb4a9e54d3d64957e24
2017-10-04 09:27:29 +02:00
Bjørn Erik Pedersen
a58741a172 helpers: Fix broken test 2017-10-04 09:27:15 +02:00
Bjørn Erik Pedersen
d32fd8e328 vendor: Update deps 2017-10-04 08:46:11 +02:00
Jamie Connolly
0859d9dfe6 tplimpl: Output xmlns:xhtml only if there are translations available 2017-10-03 23:46:18 +02:00
Nate Finch
384a6ac4bd Create magefile from Makefile
This commit makes a magefile.go that should be functionally equivalent to
the current Makefile.
2017-10-03 23:23:10 +02:00
Brendan Roy
4fc67fe44a tpl: Add errorf template function
Add template function that will build a string from the given format
string and arguments, then log it to ERROR. This has an intended
side-effect of causing the build to fail, when executed.

Resolves #3817
2017-10-03 07:59:51 +02:00
Cameron Moore
47fdfd5196 Clean up lint in various packages
Changes fall into one of the following:

- gofmt -s
- receiver name is inconsistent
- omit unused 2nd value from range
- godoc comment formed incorrectly
- err assigned and not used
- if block ends with a return statement followed by else
2017-09-29 16:23:16 +02:00
Bjørn Erik Pedersen
d45e358a05 helpers: Fix broken Chroma test 2017-09-29 10:40:56 +02:00
Bjørn Erik Pedersen
24fab99841 hugolib: Fix broken hightlighter smoke test 2017-09-29 10:10:13 +02:00
Bjørn Erik Pedersen
6a986b7c07 vendor: Update dependencies 2017-09-29 09:54:03 +02:00
Bjørn Erik Pedersen
8cf55aff00 vendor: Update Chroma 2017-09-29 09:10:55 +02:00
Brendan Roy
8717a60cc0 Change SummaryLength to be configurable (#3924)
Move SummaryLength into the ContentSpec struct and refactor the
relevant summary functions to be methods of ContentSpec. The new
summaryLength struct member is configurable by the summaryLength config
value, and the default remains 70. Also updates hugolib/page to use the
refactored methods.

Resolves #3734
2017-09-29 09:04:55 +02:00
digitalcraftsman
2818878994 tpl: Add os.fileExists template function
Fixes #3839
2017-09-28 19:52:34 +02:00
Bjørn Erik Pedersen
b6a30283f0 Merge commit '9d68f695e782c6a83c77aff13317c7a22c694c98' 2017-09-28 17:22:55 +02:00
Bjørn Erik Pedersen
9d68f695e7 Squashed 'docs/' changes from 20959c7b..36d7e22f
36d7e22f Document fmt.{print, println} template functions
79a72fce Fix link to page variables
00342ca9 Fix broken link on highlight page
15f44952 Fix link in v0.28 release notes
0100df73 Fix code examples for math.{Ceil, Floor, Round}
a354a69b Fix broken netlify.toml
4995e5df Merge branch 'master' of github.com:gohugoio/hugoDocs
9cdd990a Hugo 0.29
463558f9 Document math.Log template function
588499af Add nohup.out to .gitignore
db8ddcf7 Change name of post files in example to use post prefix
296ec01f Add ox-hugo Emacs package to the tools section
f060d6d1 Fix math.Ceil, Floor, and Round naming
a2262d24 Document strings.TrimPrefix and TrimSuffix template functions
80c1ce63 Document strings.TrimLeft and TrimRight template functions
2921088d Document urls.Parse template function
f0133079 Document math.{ceil, floor, round} template functions
82863808 Fix typo in migration tools section
d5215d61 Add link to syntax hl docs in release notes
541f0686 Update versions
275ce2b4 Update 0.28 release notes
886713a1 Add release notes for 0.28
bed02e5f Merge branch 'next'
8e3b1ac4 Add a note about branches
1662b9d0 Add missing Disqus links in templates/internal.md

git-subtree-dir: docs
git-subtree-split: 36d7e22f5c21c550bd87782d2ddca666178fe1ff
2017-09-28 17:20:10 +02:00
Lucas Jenss
57adc539fc tpl: Add float template function
Add a template function that allows conversion to float. This is
useful, for example, when passing aspect ratios into templates,
which tend to not be integers.

Fixes #3307
2017-09-28 16:53:18 +02:00
Cameron Moore
b277cb33e4 hugolib: Move metrics output to the end of the site build 2017-09-27 21:26:08 +02:00
Cameron Moore
a354d130dc examples: Fix now usage in footer 2017-09-27 08:42:44 +02:00
hugoreleaser
f806e951fd releaser: Prepare repository for 0.30-DEV
[ci skip]
2017-09-26 19:24:34 +00:00
hugoreleaser
524c67107a releaser: Add release notes to /docs for release of 0.29
[ci skip]
2017-09-26 19:23:15 +00:00
hugoreleaser
396759a09b releaser: Bump versions for release of 0.29
[ci skip]
2017-09-26 19:23:15 +00:00
hugoreleaser
e6079a9c04 releaser: Add release notes for 0.29 2017-09-26 21:12:49 +02:00
Bjørn Erik Pedersen
b5e1dc5892 tpl: Set Metrics at creation time 2017-09-26 20:42:40 +02:00
Bjørn Erik Pedersen
d3681f51c0 metrics: Fix sort order
Highest first.
2017-09-26 20:31:40 +02:00
Bjørn Erik Pedersen
4f576e1c08 Revert "vendor: Update Chroma"
This reverts commit cb8eb47260.
2017-09-26 20:06:58 +02:00
Cameron Moore
b4a14c25fe metrics: Add simple template metrics feature 2017-09-26 20:03:04 +02:00
Bjørn Erik Pedersen
cb8eb47260 vendor: Update Chroma 2017-09-26 20:00:39 +02:00
Bjørn Erik Pedersen
e94d4f0177 commands: Make noHTTPCache default false
The other way was a mistake.
2017-09-26 19:59:15 +02:00
Cameron Moore
8a69d23567 tpl: Add math.Ceil, Floor, and Round to method mappings 2017-09-26 08:16:24 +02:00
Thibault Jamet
d9697e275e Split go build in Dockerfile
To maximize the usage of cache, split the govendor get in steps:
- govendor fetch to get the pinned versions of dependencies
- go install to actually build the binary

Doing so allows not to re-download the whole dependencies when changing
lines in hugo repository

The current Dockerfile generates an image of 16.6MB

Signed-off-by: Thibault Jamet <tjamet@users.noreply.github.com>
2017-09-25 10:28:13 -06:00
Thibault Jamet
09d960f173 Update Dockerfile to benefit build cache
Docker has recently introduces buikld-stages (as of version 17.05)

Build stages allows to benefit the docker build cache as well as
reducing the size of the resulting image c.f.
https://docs.docker.com/engine/userguide/eng-image/multistage-build/

This change allows to have faster builds when running `docker build`
several times after changing some little code

Signed-off-by: Thibault Jamet <tjamet@users.noreply.github.com>
2017-09-25 10:28:13 -06:00
Guy Halse
a3a3f5b861 snap: Add git to snap package for GitInfo
Add git into the staged packages, so that the git binary is available
and hugo --enableGitInfo works for users of the snap package.

Fixes gohugoio/hugo#3896
2017-09-25 14:24:51 +02:00
hugoreleaser
404e2994e5 releaser: Prepare repository for 0.29-DEV
[ci skip]
2017-09-25 08:00:38 +00:00
hugoreleaser
2a7f6dda12 releaser: Add release notes to /docs for release of 0.28
[ci skip]
2017-09-25 07:59:12 +00:00
hugoreleaser
9e850c1f64 releaser: Bump versions for release of 0.28
[ci skip]
2017-09-25 07:59:12 +00:00
Bjørn Erik Pedersen
ab86851a1e releaser: Add final 0.28 release notes 2017-09-25 09:56:20 +02:00
hugoreleaser
53b6235bb4 releaser: Add release notes draft for 0.28
Rename to *-ready.md to continue. [ci skip]
2017-09-25 09:53:56 +02:00
Bjørn Erik Pedersen
61c27b58b3 Squashed 'docs/' changes from 1662b9d0..20959c7b
20959c7b Rewrite the syntax highlighter docs etc.
92435459 Add a note about branches
REVERT: 1662b9d0 Add missing Disqus links in templates/internal.md

git-subtree-dir: docs
git-subtree-split: 20959c7b9124341dfc4d139748244818b9cb3641
2017-09-25 09:02:42 +02:00
Bjørn Erik Pedersen
932ae52709 Merge commit '61c27b58b353c73772aae572c7d822fdfdf7791b' 2017-09-25 09:02:42 +02:00
Bjørn Erik Pedersen
30694a133a Squashed 'docs/' changes from 5be6fef0..1662b9d0
1662b9d0 Add missing Disqus links in templates/internal.md

git-subtree-dir: docs
git-subtree-split: 1662b9d0bcb6b8ebdb665f7a477d38c93c5f8faf
2017-09-25 09:02:34 +02:00