aboutsummaryrefslogtreecommitdiffhomepage
path: root/hugolib
AgeCommit message (Collapse)Author
2013-11-14Homepage now has all content available, use sorting and first to control ↵spf13
rendering
2013-11-12Truncated; .Site.Params; First functionPhil Pennock
* Add `.Truncated` bool to each page; will be set true if the `.Summary` is truncated and it's worth showing a "more" link of some kind. * Add `Params` to the site config, defining `.Site.Params` accessible to each page; this lets the site maintainer associate arbitrary data with names, on a site-wide basis. * Provide a `First` function to templates: * Use-case: `{{range First 5 .Site.Recent}}` or anything else which is a simple iterable provided by hugolib * Tests by me for `.Truncated` and `First` Also @noahcampbell contributed towards this: * Add UnitTest for `.Site.Params`: > Digging into this test case a bit more, I'm realizing that we need > to create a param test case to ensure that for each type we render > (page, index, homepage, rss, etc.) that the proper fields are > represented. This will help us refactor without fear in the > future. Sample config.yaml: ```yaml title: "Test site" params: Subtitle: "More tests always good" AuthorName: "John Doe" SidebarRecentLimit: 5 ``` Signed-off-by: Noah Campbell <[email protected]>
2013-11-05Remove the hugo-nav functionNoah Campbell
Remove the hugo-nav since it relied on a slow library. The current build reimplements the absurl functionality based on string replace. Discovered that my prior implementation missed the requirement for making absolute paths (/path) absolute with the host, whereas a relative path is left untouched. Updated the test cases to support this if this is reimplemented.
2013-11-05Adding RSS test case.Noah Campbell
Checks to make sure the xml document starts with <?xml. Previously, the html translate package would write additional details into the document that caused it to fail.
2013-11-05Fix Test NameNoah Campbell
2013-11-05Buffers instead of pipesspf13
2013-11-01Improve rendering timeNoah Campbell
50% speedup. Fix #91 to run the benchmark: go test -test.run=NONE -bench=".*" -test.benchmem=true ./transform/ > new.txt to compare the results: /usr/local/go/misc/benchcmp baseline.txt new.txt Speedup and memory improvements benchmark old ns/op new ns/op delta BenchmarkChain 101219 50453 -50.15% BenchmarkTransform 51625 45531 -11.80% benchmark old allocs new allocs delta BenchmarkChain 222 103 -53.60% BenchmarkTransform 135 106 -21.48% benchmark old bytes new bytes delta BenchmarkChain 23919 10998 -54.02% BenchmarkTransform 11858 10665 -10.06%
2013-10-31Removing check for directory: static, layoutsNoah Campbell
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-31More work on indexesspf13
2013-10-26Flipping around weight order. higher weight at the bottom. use negative to ↵spf13
pin to top.
2013-10-25Big index overhaul. Now supporting ordering tokens by count or ↵spf13
alphabetically. Also made full indexes available to the Site variable.
2013-10-25Adding support for linkTitlesspf13
2013-10-25Better error handling when rendering error found when in watch modespf13
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-24Adding support for ordering content in indexes by other than date (weighted ↵spf13
indexes)
2013-10-24Adding support for date field in front matter as date (as TOML provides)spf13
2013-10-24Adding support for more front matter types (int, float & date)spf13
2013-10-18Add support for weighted pagesspf13
Now pages can be sorted by other than date
2013-10-17Adding preliminary support for weighted indexes (for ordering by other than ↵spf13
date)
2013-10-15Adding support for MinRead. Closed #106spf13
2013-10-15Wordcount restored. fixed #92spf13
2013-10-09fixed #95, fixed #93spf13
2013-10-09simplified buildSite & better error handling around itspf13
2013-10-08Permalink to include multiple directories levelsNoah Campbell
2013-10-08Test case for permalink functionalityNoah Campbell
2013-10-08Refactor layout selection codeNoah Campbell
The render code path would use a fallback if there was an exception. This change instead relies on explicit declaration of the layout to use and includes a check to see if the layout indeed exists before attempting to render it.
2013-10-08Add support for Relative PermalinksNoah Campbell
2013-10-08Refactor Permalink to private functionNoah Campbell
This will allow for reuse of this particular function.
2013-10-08Change transformer orderNoah Campbell
2013-10-08Moving transformation on a per-page levelNoah Campbell
2013-10-08Better handle missing layoutsNoah Campbell
Panic is too extreme. Instead the library will write out a message in verbose mode.
2013-10-08Use io.Pipe for chaning render tasks.Noah Campbell
Also clean up logic for finding layouts.
2013-10-08Move writing next to renderingNoah Campbell
All render(Thing) calls have a WritePublic call directly after it. This refactor creates one function that makes the specific call sequence.
2013-10-08Reducing scope of RenderThing*Noah Campbell
2013-10-08Move in memory target into target module.Noah Campbell
2013-10-08Change the order of Apply to be more UnixyNoah Campbell
Typically the destination is on the left and the src is on the right.
2013-10-08Rename Transform to AbsURLNoah Campbell
2013-10-07Proper handling of 404 page return valuespf13
2013-10-07Fixing bug where RSS for site was rendered in wrong locationspf13
2013-10-07Fixing bug where only the first index list was created.spf13
2013-10-04Summary can now contain short codes when using <!--more--> to define end of ↵spf13
summary.
2013-10-04Restoring former snippet behavior & adding test to ensure future behaviorspf13
2013-10-03Enabling Nitro ('--stepAnalysis') again. Fix #58spf13
2013-10-01Switching to the rjson library which is more friendly to human generated json.spf13
2013-09-29go fmt so codespf13
2013-09-29Better error message when no source content is found.spf13
2013-09-24Support index.html indexes in content directoryNoah Campbell
If a file named index.html exists in a directory, or root, it will be rendered as if ugly urls are turned on. This allows for top level content to not need a supporting layout file and content in content. This change should not affect anyone who is using the perscribed way. I also cleaned up a bunch of one off functions in site.go.
2013-09-24Fixes #80 - Homepage now renders correctlyNoah Campbell
I mistakenly make RenderHomePage a NOP. Bad programmer.
2013-09-20Create a TargetPath() method that provides OutFileNoah Campbell
Moved the generation of the target path to the page breaking all dependecies on Site.
2013-09-20Section is determined by the source, not the urlNoah Campbell
This change allows for top level html content to exists.
2013-09-18Fix fragments being AbsUrlified in final htmlNoah Campbell
Found that fragments were getting the BaseURL applied creating a proper anchor url and redirecting off the page.