Steve Francia
c4bcdebc59
Merge pull request #44 from cactus/avoid-redirect-with-slugs
...
avoid possible redirects with non-ugly slug urls
2013-08-17 21:04:51 -07:00
Steve Francia
e2744d403c
Merge pull request #43 from hugoduncan/feature/allow-xhtml-aliases
...
Enable aliases from .xhtml paths
2013-08-17 21:04:14 -07:00
Steve Francia
2542836bbc
Merge pull request #41 from rozza/skipStatic
...
Skip Static directory if its in your content directory
2013-08-17 20:59:07 -07:00
Noah Campbell
c713beba4d
Formatting cleanup
2013-08-17 23:52:16 -04:00
Noah Campbell
ec821739bc
Removing the use of slash
...
An oversight on my behalf. The FromSlash method is used when writing
out the public file name. There is one place where the slashes are
required which is setting the output file. I replaced those instances
with filepath.Join which should do the right thing depending on the OS.
2013-08-17 23:46:57 -04:00
Noah Campbell
8eca8f8aa0
Detect missed index from front matter
2013-08-17 23:45:03 -04:00
Noah Campbell
e66ba5d2a7
Return errors when rendering
2013-08-17 23:45:03 -04:00
elij
b9e835b101
avoid handling a redirect from slug to slug/
...
because the url lacks a trailing /, many webservers will issue a
redirect to the canonical url with trailing slash for directory index
w/index.htm(l).
Append a slash to avoid this.
2013-08-16 13:14:20 -07:00
Hugo Duncan
23a98ad05c
Enable aliases from .xhtml paths
...
When redirecting an alias from a .xhtml path, served with default content type,
a redirect only works if the html element has a xmlns attribute. This adds the
attribute when the alias path ends in .xhtml
2013-08-16 00:29:46 -04:00
Ross Lawley
0f143dcf14
Skip Static directory if its in your content directory
...
Allows organisation where all source files are in one directory:
```
`config.yaml`:
contentdir: "source"
staticdir: "source/static"
...
.
└── source
├── post
| ├── firstpost.md // <- http://site.com/post/firstpost.html
| └── secondpost.md // <- http://site.com/post/secondpost.html
└── static
└── css
└── site.css // <- http://site.com/css/site.css
```
2013-08-15 20:05:46 +01:00
spf13
3c3fc45d3c
Merge branch 'master' of github.com:spf13/hugo
2013-08-14 10:19:59 -04:00
spf13
480e01eb15
Further work on path/section stuff. Tests passing now.
2013-08-14 08:57:14 -04:00
Steve Francia
7a51a8a5a3
Merge pull request #38 from noahcampbell/workflow_dotfile
...
Workflow dotfile
2013-08-13 20:03:18 -07:00
spf13
b4bcc591e4
Now support for nested paths. Better section detection.
2013-08-13 19:39:24 -04:00
spf13
6e27239485
Merge branch 'master' of github.com:spf13/hugo
2013-08-13 10:47:58 -04:00
Steve Francia
ca5a94a988
Merge pull request #37 from noahcampbell/master
...
Test GetParam and the various incarnations of frontmatter.
2013-08-13 07:44:43 -07:00
Steve Francia
c661d9803e
Merge pull request #31 from cactus/issue-31
...
sanitizeRegex chopping dots
2013-08-13 07:44:00 -07:00
spf13
ec02fa4bdd
Adding support for a default content type template
...
default template found at layouts/_default/single.html
2013-08-13 09:23:43 -04:00
spf13
8968524900
Adding support for recent content.
2013-08-13 08:43:42 -04:00
Noah Campbell
97eb9225a7
Ignore dotfiles in content directory
...
This supports my personal workflow of using vim which places a temporary file in the same directory as the file I'm editing.
2013-08-12 20:40:52 -07:00
Noah Campbell
5664780cca
gofmt pass
...
Clean up test files.
2013-08-12 20:40:34 -07:00
Noah Campbell
2d11d1bd67
Test GetParam and the various incarnations of frontmatter.
2013-08-12 20:25:32 -07:00
elij
31a1ade1b4
move "dot" in regex to avoid it being part of a range
2013-08-12 19:55:52 -07:00
elij
b13afc4178
fix sanitizeRegex to not strip "dots"
...
sanitizeRegex was stripping dots in permalinks when generating
RenderIndexes (noted during feed/rss generation).
permalink was being set to `.../indexxml` instead of `.../index.xml`.
Adding "dot" to the regex whitelist fixed the issue.
2013-08-12 19:02:43 -07:00
elij
023567b05e
fix bad tab/space due to paste
2013-08-12 19:01:23 -07:00
elij
2f9b582dbe
fix wrong renderlist feed permalink
...
when not using ugly urls, the feed permalink does not end up in the
expected location, and instead always behaves as if using ugly urls.
this fixes that behavior and inserts the feed xml file into the
directory as index.xml.
fixes #32
2013-08-12 19:00:29 -07:00
Noah Campbell
8c03141307
Use / for template names regardless of platform.
...
The path seperator was causing templates to not be loaded on windows.
Now all template names use / internally.
2013-08-12 15:03:06 -07:00
Noah Campbell
3fdcd0ba7c
Support for non-standard formats.
...
Forgot to include existing formats. Integration tests include new
format.
2013-08-12 14:35:39 -07:00
Noah Campbell
0305c82513
Move timezone tests to integration test.
...
Interacting with timezones will result in checks against the filesystem.
This access, by definition, is an integration test. Creating a
*integration_test.go file will signify this change.
When interacting with Travis-ci.org, the ubuntu boxes plus go 1.1 do not
seem to support shortcode timezones, think PST. In this case, the tests
are skipped. This is not ideal, but the IRC #go-nuts channel has
indicated timezone support is still lacking. We should advise users of
hugo that timezone support may be an issue and report any odd behavior.
The workaround is to use numeric timezones (-08:00 for PST, etc.)
2013-08-12 12:04:04 -07:00
Noah Campbell
f610d45cd8
Add additional details to date test cases.
2013-08-12 09:14:30 -07:00
Noah Campbell
dd19d0cc77
Provide better support for various date formats.
...
Fixes #30 as long as the date is well formatted.
2013-08-12 09:14:29 -07:00
VonC
17aafb39dd
Avoid error if no content.
...
The homepage should still be generated.
This is useful especially in the beginning, where you start just with
the homepage.
2013-08-12 14:31:39 +02:00
spf13
0233708907
Started new release notes, added nitro step for aliases
2013-08-10 15:44:22 +01:00
spf13
ac26de205e
Adding correct canonical link to alias pages
2013-08-10 15:41:10 +01:00
spf13
d5518c0966
Adding support for aliases (redirects)
2013-08-10 15:35:34 +01:00
spf13
45ce6e2b30
Merge branch 'redirect' of https://github.com/rozza/hugo into rozza-redirect
...
Conflicts:
hugolib/page.go
2013-08-10 14:08:38 +01:00
spf13
733c0207cb
Merge branch 'master' of github.com:spf13/hugo
...
Conflicts:
hugolib/site.go
2013-08-10 02:07:35 +01:00
Noah Campbell
2bbecc7bc8
Better reporting when the template is missing.
2013-08-09 17:36:32 -07:00
Noah Campbell
309db474c7
Nitro timer is encapsulated.
...
Remove the need for NewSite by relying on appropriate defaults. Renamed
site.c to site.Config to allow Sites to be created outside the package.
2013-08-09 17:36:32 -07:00
Noah Campbell
e26b43f6d9
Adding more test cases
2013-08-09 17:36:32 -07:00
Noah Campbell
e67db666c8
Adding benchmark for parsing pages using unicode.
...
The resulting comparsion is not equal because NewPage reads the file each time where ReadFrom just reads a buffer in memory.
2013-08-09 17:36:32 -07:00
Noah Campbell
085ce15f7c
Adding ability to read from io.Reader
...
This allows for testing without relying on the file system. Parsing algorithm to not read the entire file into memory.
2013-08-09 17:36:32 -07:00
Noah Campbell
274d324c8b
Introduce unit testing for page.go
2013-08-09 17:36:32 -07:00
Noah Campbell
fa55cd9857
Remove unreachable code path.
2013-08-09 17:36:32 -07:00
Noah Campbell
0595f27e6d
Using a composite literal to create a page.
...
Wonder why the need for composite structs. Not sure if my go knowledge is lacking or if this is cruft from other programming language doctrine.
2013-08-09 17:36:32 -07:00
Noah Campbell
19538a1bd6
Support pages without folders
2013-08-09 17:36:31 -07:00
Noah Campbell
fc5e92cc24
Provide better error handling
...
Change the method signatures to follow the check ok pattern.
2013-08-09 17:36:31 -07:00
Ross Lawley
e2a28114d1
Add redirect to page parameters and redirects example
2013-08-09 21:57:22 +01:00
spf13
a870f4d955
Fixing missing trailing slash in baseUrl
2013-08-08 12:30:01 +01:00
Nick Sabine
780e2f311b
Populated page Site metadata. Enables accessing Indexes from Page template.
2013-08-07 14:23:24 -04:00