spf13
1b7f18e391
Making partials context optional for compatibility with template.
...
If not provided, context is nil.
2014-09-03 11:30:08 -04:00
Dave Johnston
13a317b975
Enable header id blackfriday extension
2014-08-30 14:12:53 -04:00
spf13
242d6b4e6b
Adjusting the number of go routines to build the pages in to 4*GOMAXPROCS (from 2) for faster rendering.
2014-08-30 01:15:20 -04:00
Nate Finch
47c91a4ca2
Fix CreatePages
...
This fixes #450 . There are two problems:
1.) We're creating a new goroutine for every page.
2.) We're calling s.Pages = append(s.Pages, page) inside each goroutine.
1 is a problem if in that if you have a ton of pages, that's a ton of goroutines. It's not really useful to have more than a few goroutines at a time, and lots can actually make your code much slower, and, evidently, crash.
2 is a problem in that append is not thread safe. Sometimes it returns a new slice with a larger capacity, when the original slice isn't large enough. This can cause problems if two goroutines do this at the same time.
The solution for 1 is to use a limited number of workers (I chose 2*GOMAXPROCS as a nice guess).
The solution for 2 is to serialize access to s.Pages, which I did by doing it in a single goroutine.
2014-08-30 01:02:35 -04:00
spf13
7e19fa40e7
Making direction optional (and setting defaults) for GroupBy Pages functionality.
2014-08-29 23:51:29 -04:00
spf13
b15eb889e8
Adding .Reverse() to PagesGroup
2014-08-29 23:50:25 -04:00
spf13
41b28462e8
Switch .Data to .Pages in the PageGroup functionality for increased consistency.
2014-08-29 23:48:24 -04:00
spf13
70dc370c08
Making the term "Term" more consistent with Taxonomy usage.
2014-08-29 23:44:39 -04:00
spf13
01caaeba7a
Making the Pages Sorting methods available within a taxonomy term.
2014-08-29 23:43:38 -04:00
spf13
53b7d5b8a1
Inner Shortcodes now treated as markdown. fixed #185
2014-08-28 12:48:31 -04:00
spf13
1b5f59b071
go fmt site.go
2014-08-25 13:13:11 -04:00
spf13
30af267b32
Fix #302 . Links now have trailing slashes.
2014-08-25 12:45:47 -04:00
Nate Finch
a31edb3388
Support subdir in baseurl.
...
Mainly this was a change to helpers.MakePermalink, but to get the local server to run correctly,
we needed to redirect the path of the request from /foo to /. In addition, I added tests for the
server's code for fixing up the base url with different config file & CLI options.
2014-08-25 11:51:51 -04:00
Joel Scoble
4c735a7878
preserve alias case while lowercasing taxonomy
2014-08-25 10:16:59 -04:00
Chase Adams
348e123c9f
Update 404 to be compiled to .html instead of directory
2014-08-25 09:38:08 -04:00
Tatsushi Demachi
50a8c50726
Add page grouping functions
2014-08-25 09:18:52 -04:00
Joel Scoble
c750a95e22
support for futre/draft summary info output
2014-08-20 14:21:15 -04:00
spf13
aae1ff3c92
Adding IsNode & IsPage functions to Page & Node
2014-08-19 21:27:13 -04:00
Tatsushi Demachi
002a5b6756
Add 'where' template function
2014-08-18 11:31:17 -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
Nicholas Whittier
ac99ceccac
Add shortcode template loading from themes directory.
2014-06-30 15:22:18 -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
Andrew Jones
5969315c8f
switch back to master blackfriday; enable footnotes
2014-06-30 15:14:42 -04:00
spf13
4483a6655a
Centralizing the template execution logic in one place
2014-06-06 17:27:31 -04:00
spf13
c297d7451f
Adding 'partial' template function to add theme / local awareness to the partials directory.
2014-06-06 16:15:19 -04:00
spf13
4e99d6b54c
Adding proper error message when view is not found.. fixing #303
2014-06-04 12:33:27 -04:00
spf13
640ab3c72e
fixed #303 . Adding theme support to views
2014-06-03 17:53:00 -04:00
Jake Mitchell
e0ea6b9955
Support embedding <script> tags in markdown pages
2014-06-03 15:14:38 -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
Lorenzo Bolla
e98f0014f2
Allow to use filename in permalinks
2014-05-28 17:59:49 -04:00
spf13
57ad3abe7b
Pre and Post in Menu are type HTML
2014-05-27 18:34:29 -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
Dato Simó
05b76dcb6f
Add a blank line after the front matter when writing back a page.
...
Could also be done in parser.InterfaceToFrontMatter(), but logically the
extra blank line belongs to the page, not the front matter itself.
2014-05-12 15:46:58 -04:00
Vincent Batoufflet
73cbefdbc8
Make template comparison functions handle floats
2014-05-10 15:38:18 -04:00
Vincent Batoufflet
667a047cea
Fix date issue with home page in Sitemap
2014-05-10 15:33:18 -04:00
Vincent Batoufflet
35926dcf37
Add Sitemap testing
2014-05-09 23:11:42 -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
Vincent Batoufflet
179225449c
Add template comparison functions (Go 1.1 compat)
2014-05-09 22:42:28 -04:00
spf13
08c30b6e44
Using new helpers in page.go
2014-05-02 01:04:48 -04:00
spf13
fb7d45e613
permitting empty files again. Fixing some tests to now pass.
2014-05-01 14:11:56 -04:00
spf13
859a78e1bd
Providing the ability to save (write) a content's source file.
2014-05-01 13:21:37 -04:00
spf13
1302ef9f63
Making site page initialization a bit more granular and accessible
2014-05-01 13:20:58 -04:00
spf13
cbd9506c29
moving front matter parsing (and creation) to parse package
2014-05-01 13:20:09 -04:00
tummychow
2e954d8551
Fix permalinks to subdomains
...
If you don't have access to the root domain of your site (eg a GitHub project
page) and you try to generate custom permalinks, they must begin with a slash.
Go's URL resolution library sees the leading slash and thinks "this URL starts
at the root", just like a filesystem - so it discards your subdomain and maps
all custom permalinks from the root of your site. Fine if you control the root
domain, not so useful if you don't.
Removing the check for a leading slash fixes this problem. You can now specify
custom permalinks that do not start with a slash, and they will map safely
regardless of what subdomain you upload the generated site under.
Tests have been updated for this commit so that they continue to function.
2014-04-26 23:01:28 -06: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
aae6fa0b6b
Fix test to not fail when order is different, but slice contents are the same.
2014-04-08 21:57:25 -04:00
spf13
bd022534bc
Adding Params to node for easy template access of page.params without throwing errors.
2014-04-08 21:40:38 -04:00
spf13
c8269d6dbc
Making node.Keywords the correct length
2014-04-08 21:40:03 -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
9a83f7a01b
Fixing all tests to pass with new Viper Config
2014-04-07 11:44:51 -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
Nate Finch
c02a02070f
change golang to go
2014-03-24 14:34:41 -04:00
spf13
6205a16b6e
Fixes #227 by properly scoping the variables within the go routine.
2014-03-13 20:34:47 +01:00
Ruben
eec0e512f9
Add sort pages by Title and by LinkTitle
...
Sorting can now be done on Title and on LinkTitle
2014-03-13 11:39:13 +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
Mike Keesey
2540d884d8
Fixing issues go vet reports.
2014-03-01 09:56:17 -05:00
Ask Bjørn Hansen
0becad727a
Make error message when encountering unrecognized file extensions more helpful
2014-02-28 22:11:41 -05:00
Ask Bjørn Hansen
ea8d0981d5
Make per-page url overrides take precedence over section permalink settings
...
This seems more reasonable to me.
I didn't understand why the pUrl comparision was on len > 2; I changed it to 0.
Closes #212 .
2014-02-28 11:55:37 -05:00
spf13
14227351fa
Reorganization of helpers. Centralized Url/Path logic. Fixed #175 .
2014-02-27 20:33:18 -05:00
spf13
64572d2d60
Shortcode cleanup. Added a ton of tests. Much more flexible with input. Doesn't crash with bad input. Fixed #193
...
Also added the .Get function to short codes and documentation for that function.
2014-02-25 23:57:31 -05:00
Ask Bjørn Hansen
82fdfa2c72
Warn about bad shortcode parameters (and don't crash)
...
closes #193
2014-02-20 06:54:56 -05:00
Ask Bjørn Hansen
ed0fe9ddf7
Make 'read a string' code understand float64 (json) and int (yaml) as well as actual strings
2014-02-18 18:44:56 -05:00
Ask Bjørn Hansen
b41622bc49
Allow 1/0 for true/false in Yaml front-matter
2014-02-18 18:44:47 -05:00
Ask Bjørn Hansen
e4af4f652e
Support ISO8601 date/time format without timezones
2014-02-18 18:44:40 -05:00
Ask Bjørn Hansen
0bfe9276c2
Make the invalid date/time format error message more helpful
2014-02-18 18:44:32 -05:00
Anton Ageev
11ca84f8cb
Add unicode support for aliases, indexes, urlize template filter.
...
Now aliases and indexes are not restricted ASCII letters and can include
any unicode letters.
2014-02-05 11:49:57 -05:00
Anton Ageev
72ba6d633d
Fix permalink bug in uglyurls mode (refs #187 ).
2014-02-02 00:56:01 -05:00
Niels Widger
c1b9380dfd
Add back blackfriday extensions during Markdown conversion
...
Modified markdownRender and markdownRenderWithTOC in hugolib/page.go to
use the same flags and extensions as were previously used when we simply
called blackfriday.MarkdownCommon to convert Markdown to HTML. These
flags/extensions were dropped during the refactor that added the
`.TableOfContents` page variable, and caused features like Markdown
tables to no longer work.
Modified the expected output for TestTableOfContents in page_test.go,
apparently changing the flags/extensions caused an `—` to become
`–`.
2014-01-30 23:04:37 -05:00
Tibor Vass
6dd2e9a49a
gofmt all go code
2014-01-29 18:03:35 -05:00
spf13
1882ffabc6
Adding support for boolean params
2014-01-28 23:24:59 -05:00
spf13
1da3fd039a
Continue with TOC integration and page refactor. Updated a few tests to match new generated output.
2014-01-28 23:11:05 -05:00
spf13
f45c6bc38a
Moved TOC test into page_test. Some general page_test cleanup.
2014-01-28 23:09:24 -05:00
spf13
9666f33e2f
Don’t render short codes on summary twice
2014-01-27 17:32:36 -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
Niels Widger
f62e3e9940
Add new TableOfContents Page variable (Markdown only)
...
Added TableOfContents field to hugolib.Page struct. New function
getTableOfContents is used in convertMarkdown to set the TableOfContents
field.
Added new test file hugolib/page_toc_test.go with a simple test of the
new functionality.
Conflicts:
hugolib/page.go
2014-01-23 17:27:08 -05:00
spf13
3851117c25
renaming MinRead to ReadingTime and adding to documentation.
2014-01-21 20:08:24 -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
ae15ff0968
Fixing test which erroneously checked values and order, rather than just values.
2014-01-18 21:26:34 -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