Commit graph

165 commits

Author SHA1 Message Date
Chase Adams
348e123c9f Update 404 to be compiled to .html instead of directory 2014-08-25 09:38:08 -04:00
Joel Scoble
c750a95e22 support for futre/draft summary info output 2014-08-20 14:21:15 -04:00
Billie H. Cleek
aa42f4309c allow site to be built with empty content
Build the site even if there isn't anything in the content directory.
2014-06-30 15:28:18 -04:00
Nicholas Whittier
78962a14f8 Allows 404 templates from themes/THEME directories. 2014-06-30 15:22:52 -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
c502f078bc Add handling for publishDates (which will be ignored if in the future). Fixed #260 2014-05-29 00:48:40 -04:00
Rinat Abdullin
4ebaec8906 Include Section Taxonomy into SiteInfo
This allows to build more complex pages, like :
http://martinfowler.com/tags/
2014-05-28 19:31:50 -04:00
spf13
35a605976e SiteInfo is now a pointer on the Node 2014-05-28 19:11:54 -04:00
spf13
4076d77029 Simplifying the siteInfo handling 2014-05-28 18:37:59 -04:00
Phil Pennock
280df4e380 Fix Viperized .Site.Params
git bisect identified 62dd1d4 as the breaking commit; when
github.com/spf13/viper was introduced, the Params field was always
empty.

Given a map in YAML in Viper, the return type is
`map[interface{}]interface{}`, _not_ `map[string]interface{}`, even if
`.SetDefault()` has been called with an item of
`map[string]interface{}{}` so the cast assertion on the `.Get("Params")`
always failed.
2014-05-28 18:15:23 -04:00
spf13
be1ee22032 Proper integration of live reload with automatic injection 2014-05-16 17:49:27 -04:00
spf13
a4a1e39a51 Fixing issue when two menu items have the same name. 2014-05-14 18:08:11 -04:00
spf13
4f75ec985d Homepage renders with _default/list.html or then _default/single.html when index.html is not present. 2014-05-13 17:07:50 -04:00
Dato Simó
025a37df2f Fix permalink functionality, which was broken in 62dd1d4.
Viper stores Permalinks as a map[string]interface{}, so the type assertion
to PermalinkOverrides (map[string]PathPattern) will always fail.

We can, however, get Permalinks as a map[string]string, and convert each
value to a PathPattern.
2014-05-12 15:47:52 -04:00
Vincent Batoufflet
667a047cea Fix date issue with home page in Sitemap 2014-05-10 15:33:18 -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
1302ef9f63 Making site page initialization a bit more granular and accessible 2014-05-01 13:20:58 -04:00
spf13
bdf7cd9f9d Creating site menu configuration and have the docs site use it 2014-04-24 16:11:08 -06:00
spf13
4f813c09ea Fixing some bugs introduced in prior few commits. Tests now pass. 2014-04-24 10:18:47 -06:00
spf13
9ecf58e29b new menus system including active link & nesting 2014-04-23 02:59:19 -04:00
spf13
69c1944f1f Add handling of deeply nested front matter 2014-04-23 02:55:43 -04:00
spf13
4a8de8ea46 Add Disqus support out of the box. Move template/bundle into hugolib. 2014-04-23 02:53:12 -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
bb9bcdcf30 Add more information to the siteInfo (and configuration options) for better RSS generation. 2014-04-09 17:15:52 -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
ad34be9d77 strip trailing baseurl slash. Added a new template function "sanitizeurl" which ensures no double slashes. Fixed #221 2014-04-07 22:02:08 -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
6205a16b6e Fixes #227 by properly scoping the variables within the go routine. 2014-03-13 20:34:47 +01:00
spf13
3dfb475136 Parallelizing the largest build processes (templates, pages, indexes). Seeing 300%+ improvement of total build time. 2014-03-05 23:48:42 -05:00
spf13
14227351fa Reorganization of helpers. Centralized Url/Path logic. Fixed #175. 2014-02-27 20:33:18 -05:00
Tibor Vass
6dd2e9a49a gofmt all go code 2014-01-29 18:03:35 -05:00
spf13
d0825a211a Big refactor of pages code. Changed TOC code to only parse when actually used 2014-01-27 17:20:20 -05:00
spf13
f0634ec059 fixed #171. RSSlink is now RSSLink (and matches existing docs).
Added backwards compatibility accessor for existing templates.
2014-01-18 22:16:19 -05:00
spf13
44186c6af1 Extending rss item limit to 50… can reduce further in template with ‘first N’ functionality. 2014-01-18 21:18:54 -05:00
spf13
cb04053385 RSS improvements, now limit to 15 items and provide accurate date. fixed #172 2014-01-18 11:05:50 -05:00
Phil Pennock
438c219892 Add canonifyurls config option.
Be able to inhibit AbsURL canonicalization of content, on a site
configuration basis. Advantages of being able to inhibit this include
making it easier to rendering on other hostnames, and being able to
include resources on http or https depending on how this page was
retrieved, avoiding mixed-mode client complaints without adding latency
for plain http.
2014-01-13 10:06:12 -05:00
spf13
70745e8cb5 Complete refactor of indexes, move (and rewrite) page sorting to page.go, add tests 2013-12-20 09:10:05 -05:00
Caleb Spare
6da23f7449 Gofmt
Command: `gofmt -l -s -w .`
2013-12-16 17:40:10 -05:00
spf13
0e04b9a029 Moving processing short codes to the page 2013-12-06 23:57:24 -05:00
spf13
f432b187a0 render shortcodes prior to converting to html 2013-12-06 23:32:00 -05:00
spf13
44d57fdc0c Reorganize helpers 2013-12-05 09:29:41 -05:00
Phil Pennock
07978e4a49 configurable permalinks support
A sample config.yaml for a site might contain:

```yaml
permalinks:
  post: /:year/:month/:title/
```

Then, any article in the `post` section, will have the canonical URL
formed via the permalink specification given.

Signed-off-by: Noah Campbell <noahcampbell@gmail.com>
2013-11-18 13:32:56 -08:00
spf13
ad2c0b5616 Homepage now has all content available, use sorting and first to control rendering 2013-11-14 09:37:58 -05:00
Phil Pennock
40d05f12a7 Truncated; .Site.Params; First function
* 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 <noahcampbell@gmail.com>
2013-11-12 22:49:54 +00:00
Noah Campbell
86233c00a0 Remove the hugo-nav function
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-05 22:28:06 +00:00
Noah Campbell
1cebce12ad Adding RSS test case.
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-05 07:03:02 +00:00