Bjørn Erik Pedersen
3d9c4f513b
parser: Add BenchmarkFrontmatterTags
...
The list handling is surprisingly expensive:
```
▶ go test -run="NONE" -bench="BenchmarkFrontmatterTags" -test.benchmem=true ./parser | prettybench
PASS
benchmark iter time/iter bytes alloc allocs
--------- ---- --------- ----------- ------
BenchmarkFrontmatterTags/JSON:1-4 1000000 2039.00 ns/op 912 B/op 20 allocs/op
BenchmarkFrontmatterTags/JSON:11-4 300000 5202.00 ns/op 1640 B/op 44 allocs/op
BenchmarkFrontmatterTags/JSON:21-4 200000 7993.00 ns/op 2392 B/op 65 allocs/op
BenchmarkFrontmatterTags/YAML:1-4 200000 9359.00 ns/op 5928 B/op 66 allocs/op
BenchmarkFrontmatterTags/YAML:11-4 100000 21218.00 ns/op 8408 B/op 140 allocs/op
BenchmarkFrontmatterTags/YAML:21-4 50000 32852.00 ns/op 10920 B/op 211 allocs/op
BenchmarkFrontmatterTags/TOML:1-4 100000 21505.00 ns/op 9231 B/op 173 allocs/op
BenchmarkFrontmatterTags/TOML:11-4 20000 82919.00 ns/op 19808 B/op 625 allocs/op
BenchmarkFrontmatterTags/TOML:21-4 10000 141847.00 ns/op 31200 B/op 1106 allocs/op
ok github.com/spf13/hugo/parser 17.890s
```
See #3464
2017-06-03 08:53:56 +02:00
Bjørn Erik Pedersen
250ebc1db5
hugolib: Add some more tags to benchmark
2017-06-02 18:40:10 +02:00
Bjørn Erik Pedersen
b37d959408
hugolib: Bump leaktest timeout to 30 seconds
...
To try to make it less flaky.
2017-06-02 16:50:44 +02:00
Bjørn Erik Pedersen
4e00bb7fdd
Write CPU and mem profiles from site benchmark script
2017-06-02 09:38:09 +02:00
Bjørn Erik Pedersen
fdcfccedcb
hugolib: Fix tag calculation in benchmark test
2017-06-02 09:13:45 +02:00
Ryan Watters
4d0b6653ee
Fix typo on Hawksworth's tweet for homepage
2017-06-01 22:42:38 -05:00
Ryan Watters
bdacc320d8
Move tweet data file to project dir from theme
...
Also update the data file with May 2017 tweets.
2017-06-01 17:47:55 -05:00
Ryan Watters
c940f08f84
Remove duplicate custom output pages
2017-06-01 17:27:41 -05:00
Ryan Watters
59c1bdc5a3
Move custom outputs from CM to templates section
2017-06-01 16:49:14 -05:00
Ryan Watters
0e363fe7b9
Remove theme-showcase.md => removing from global nav as well
2017-06-01 13:54:56 -05:00
Bjørn Erik Pedersen
213ea74929
hugolib: Add number of tags as a benchmark know
2017-06-01 18:51:51 +02:00
Bjørn Erik Pedersen
08a10e5d14
hubolib: Make the site benchmark output more compact
...
So you can do and get:
```
▶ ./benchSite.sh "YAML,num_pages=10"
Running with BenchmarkSiteBuilding/YAML,num_pages=10
BenchmarkSiteBuilding/YAML,num_pages=10-4 1000 1611261 ns/op 730749 B/op 6458 allocs/op
PASS
ok github.com/spf13/hugo/hugolib 8.168s
```
2017-06-01 12:00:47 +02:00
Anthony Fok
d83c53a8a6
Replace "Github" with "GitHub"
...
See PR rdwatters/hugo-docs-concept#126
2017-05-31 13:16:01 -05:00
Bjørn Erik Pedersen
9fa71c945e
hubolib: Add 10k pages as a benchmark variant
2017-05-31 14:48:49 +03:00
Bjørn Erik Pedersen
d25d89e653
hugolib: Increase leaktest timeout
...
To try to less flaky test.
2017-05-31 13:23:22 +03:00
Bjørn Erik Pedersen
8969701967
hugolib: Break early from sitemap disabled check
...
See #3544
2017-05-31 12:55:51 +03:00
Bjørn Erik Pedersen
69d92dc49c
hugolib: Respect disableKinds=["sitemap"]
...
Fixes #3544
2017-05-31 10:57:19 +03:00
Bjørn Erik Pedersen
d74452cfe8
Add benchSite.sh
...
And change site benchmark separator to comma to make it Bash and regexp friendly, example:
./benchSite.sh "frontmatter=YAML,num_root_sections=1,num_pages=.*,tags_per_page=20,shortcodes=false,render=false"
2017-05-31 10:35:02 +03:00
Bjørn Erik Pedersen
978951cf52
vendor: Update go-toml
...
Slightly better:
```
benchmark old ns/op new ns/op delta
BenchmarkSiteBuilding/frontmatter=TOML|num_root_sections=1|num_pages=1000|tags_per_page=20|shortcodes=false|render=false-4 204522447 200702508 -1.87%
benchmark old allocs new allocs delta
BenchmarkSiteBuilding/frontmatter=TOML|num_root_sections=1|num_pages=1000|tags_per_page=20|shortcodes=false|render=false-4 1943677 1784437 -8.19%
benchmark old bytes new bytes delta
BenchmarkSiteBuilding/frontmatter=TOML|num_root_sections=1|num_pages=1000|tags_per_page=20|shortcodes=false|render=false-4 102665182 100925773 -1.69%
```
2017-05-30 21:39:57 +03:00
Ryan Watters
00ea027e39
Clean up shortcode description on homepage and remove extra "to"
2017-05-30 12:37:23 -05:00
Ryan Watters
f96df8f2cc
Remove outdated developer tools
...
Closes rdwatters/hugo-docs-concept#112
See PR gohugoio/hugo#3498
2017-05-30 12:26:21 -05:00
Bud Parr
f2ede42abe
Make minor tweaks to home page and news layout
...
* Move description into params + update copy
* Fix in theme for news page
See PR rdwatters/hugo-docs-concept#124
2017-05-30 12:22:51 -05:00
Bjørn Erik Pedersen
4aff2b6e74
source: Cache language config
...
```
benchmark old ns/op new ns/op delta
BenchmarkSiteBuilding/frontmatter=YAML|num_root_sections=1|num_pages=5000|tags_per_page=0|shortcodes=false|render=false-4 552742744 501838152 -9.21%
benchmark old allocs new allocs delta
BenchmarkSiteBuilding/frontmatter=YAML|num_root_sections=1|num_pages=5000|tags_per_page=0|shortcodes=false|render=false-4 3047393 2957378 -2.95%
benchmark old bytes new bytes delta
BenchmarkSiteBuilding/frontmatter=YAML|num_root_sections=1|num_pages=5000|tags_per_page=0|shortcodes=false|render=false-4 356533864 354291924 -0.63%
```
2017-05-30 19:29:55 +03:00
Bjørn Erik Pedersen
2342df4d2d
hugolib: Add TOML/YAML switch to benchmark
2017-05-30 18:10:48 +03:00
Bjørn Erik Pedersen
828427ef52
hugolib: Adjust timeout for leaktest
2017-05-30 16:38:10 +03:00
Bjørn Erik Pedersen
ce624cc7d3
hugolib: Add slightly more realistic tag distribution to benchmark
2017-05-30 15:33:37 +03:00
Bjørn Erik Pedersen
8930e259d7
hugolib: Add site building benchmarks
...
To run a subset of these benchmark, one can do something like this:
```
go test -run="NONE" -bench="BenchmarkSiteBuilding/tags_per_page=0.*shortcodes=true.*render=false" -test.benchmem=true ./hugolib
```
Which will run without any tags, with shortcodes, but will skip rendering.
Fixes #3535
2017-05-30 14:30:30 +03:00
digitalcraftsman
8c53afdb53
Move assets used in content files into images/ subfolder
2017-05-28 20:56:57 +02:00
Ryan Watters
0d9ce4819c
Add _headers file for cross-origin issues with SVGs
2017-05-28 13:42:45 -05:00
Bud Parr
fede945dfd
Add home page to hugoDocs
...
* Add news content
* Switch to new home page
* Move docs home page to a new page
* Switch to home page content
* Adjust global menu: remove showcase
* Remove unneeded portion of the front matter
* Remove old theme
* Update content for new theme
* Fix content to new theme
* Move layouts into theme
* Move classes to config
* [WIP] theme
* [WIP] inline critical CSS
* Add some notes on the [WIP] critical CSS feature
* Make theme changes for themes site
* Import theme updates from themes site
* [WIP] theme prev/next links
* Revert critical CSS tests
Didn't move the needle on a 20kb (gzipped) stylesheet.
First view speed index is 1008 without CSS.
* Not using docsnav data file
* Backdate these articles so we keep them but they don't show up on top
* Change Twitter handle to work with Hugo's internal templates
plus a few minor clean-ups
* Update theme (change Twitter handle in Follow link)
See PR rdwatters/hugo-docs-concept#120
2017-05-28 12:57:00 -05:00
digitalcraftsman
f4c1efc601
Make assets used in content files theme independent
...
Assets like screenshots are used in content files such as
tutorials. This commit moves these assets out of the theme
into the static folder in the root directory.
This way the theme and content files become independent from
each other.
See PR rdwatters/hugo-docs-concept#123
2017-05-28 12:41:12 -05:00
Albert Nigmatzianov
3b78344d61
docs: Update overview/usage
2017-05-28 12:10:16 +02:00
Albert Nigmatzianov
710300cb76
docs: Update overview/usage
2017-05-28 12:10:16 +02:00
Bjørn Erik Pedersen
93cab620d7
Update snapcraft.yaml
...
Bump to latest Go version.
2017-05-28 00:38:14 +03:00
Ryan Watters
b68758a9fe
Update _index.md to show more intuitive link titles
2017-05-26 14:51:57 -05:00
Bud Parr
7fd64f19c8
Merge bp/theme-design branch containing Bud Parr's new design
...
It's a beautiful thing. A thousand thanks, Bud.
See PR rdwatters/hugo-docs-concept#118
2017-05-26 14:25:22 -05:00
Bjørn Erik Pedersen
19de4476d8
hubolib: Remove the regular page restriction from .Site.GetPage
...
See #2844
2017-05-26 21:31:45 +03:00
Bryan Klein
066e17464d
docs: Fix parameter name in YouTube shortcode section
...
Since 'autostart' is not the correct name of the parameter, I changed the words to make this section more clear.
2017-05-26 15:05:19 +03:00
Bryan Klein
37e378773f
docs: Fix parameter name in YouTube shortcode section
...
Since 'autostart' is not the correct name of the parameter, I changed the words to make this section more clear.
2017-05-26 15:05:19 +03:00
Bjørn Erik Pedersen
b5b41c4468
hugolib: Refine allKindsInPages
2017-05-26 10:51:17 +03:00
Bjørn Erik Pedersen
bde807bd1e
travis: Update Go versions
2017-05-26 10:49:40 +03:00
Bjørn Erik Pedersen
612f6e3afe
hugolib: Fix ref/relref issue with duplicate base filenames
...
This commit also makes that function 80x faster.
Fixes #2507
2017-05-26 10:42:45 +03:00
Bjørn Erik Pedersen
50d11138f3
hugolib: Add a cache to GetPage
...
Looks to be slightly slower with the low number of section pages, but the 1000 regular pages seem to add value.
```
benchmark old ns/op new ns/op delta
BenchmarkGetPage-4 97.7 145 +48.41%
BenchmarkGetPageRegular-4 7933 161 -97.97%
benchmark old allocs new allocs delta
BenchmarkGetPage-4 0 0 +0.00%
BenchmarkGetPageRegular-4 0 0 +0.00%
benchmark old bytes new bytes delta
BenchmarkGetPage-4 0 0 +0.00%
BenchmarkGetPageRegular-4 0 0 +0.00%
```
2017-05-26 10:42:45 +03:00
Bjørn Erik Pedersen
e0c2e79820
hugolib: Support regular pages in .Site.GetPage
...
Fixes #2844
2017-05-26 10:42:45 +03:00
Bjørn Erik Pedersen
87203139c3
cache: Add a simple partitioned lazy cache
2017-05-26 10:42:45 +03:00
Ryan Watters
ccf1fcb05b
Remove single.html references from homepage template
...
Closes rdwatters/hugo-docs-concept#117
2017-05-25 15:59:53 -05:00
Mahmud Ridwan
3a28d40d83
docs: Add furqansoftware.com to the showcase
2017-05-25 14:32:47 +02:00
Mahmud Ridwan
a91c2705c7
docs: Add furqansoftware.com to the showcase
2017-05-25 14:32:47 +02:00
Albert Nigmatzianov
d4f7985f05
docs: Delete brew update from docs
...
Fix #3518
2017-05-25 13:31:38 +02:00
Albert Nigmatzianov
99412bfe45
docs: Delete brew update from docs
...
Fix #3518
2017-05-25 13:31:38 +02:00