Commit graph

8564 commits

Author SHA1 Message Date
Noah Campbell
9d15262ee5 Test cases for ignoreDotFile
Meant to commit this earlier, but it's a basic unit test.
2013-08-23 14:57:21 -07:00
Noah Campbell
0fabd51ab1 Update .gitignore to ignore *.swo files
For the fellow vim user.
2013-08-23 14:57:21 -07:00
Noah Campbell
7461ed63ae Fix benchmark so the buffer is read each time.
The bytes.Buffer was exhausted after the first read.  Creating a new
reader each invocation catpures the correctly timing.
2013-08-23 14:16:37 -07:00
Noah Campbell
599e6672f7 Removing GetSection
Using GetXXX is not idiomatic to Go.  Also added a bunch of unit testing
around this method.
2013-08-23 14:14:54 -07:00
Noah Campbell
ae7112977d Skip "dot" files in layout
As a vim user, .filename.swp files pop up.  This change prevents hugo
from reading those files.
2013-08-23 13:58:52 -07:00
Steve Francia
eb4288e3cd Merge pull request #53 from hugoduncan/feature/print-error-on-invalid-index
Print error if index value in a page is wrong type
2013-08-20 20:56:33 -07:00
Steve Francia
00839567c7 Merge pull request #52 from rozza/StaticSync
Static changes shouldn't be destructive to existing files
2013-08-20 20:55:56 -07:00
Steve Francia
35b35a7004 Merge pull request #51 from cabello/patch-3
Remove extra quotes from meta data
2013-08-20 20:54:51 -07:00
Steve Francia
6f424175bf Merge pull request #50 from cabello/patch-2
Check .Prev and .Next pointers before using it
2013-08-20 20:54:31 -07:00
Steve Francia
3d0dc1acb1 Merge pull request #49 from cabello/patch-1
Fix broken link to Index page
2013-08-20 20:54:06 -07:00
Hugo Duncan
301d2bafcd Print error if index value in a page is wrong type
This was causing a panic with no information displayed about the
page causing the error.
2013-08-20 16:39:26 -04:00
Ross Lawley
5aa47a7b07 Static changes shouldn't be destructive to existing files
Currently changing css deletes all the site published html when it copies.
Refs #46
2013-08-20 20:32:32 +01:00
Danilo Cabello
8415c5e6c7 Remove extra quotes from meta data 2013-08-20 13:52:51 -04:00
Danilo Cabello
acd5ea0e75 Check .Prev and .Next pointers before using it 2013-08-20 12:13:27 -04:00
Danilo Cabello
8058abd707 Fix broken link to Index page 2013-08-20 11:56:55 -04:00
Steve Francia
eff8457ac9 Merge pull request #46 from rawfalafel/sync_static
Sync files that have changed in the static directory
2013-08-19 05:32:36 -07:00
rawfalafel
2dcdd67378 Watch StaticDir and sync to PublishDir on change
New behavior adds a special case for file changes inside the static directory to fsync PublishDir
2013-08-19 01:17:37 -04:00
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
spf13
8f330626bc Merge branch 'noahcampbell-index_reporting' 2013-08-17 23:53:35 -04: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
spf13
0a79edd48a Removing extra links on homepage 2013-08-17 21:54:39 -04:00
spf13
3ae8078d3a Adding "fork me on github" banner 2013-08-17 21:54:39 -04:00
spf13
8c0ab4def1 Complete overhaul of the docs 2013-08-17 21:54:39 -04:00
Steve Francia
b76b80c564 Merge pull request #40 from VonC/clarify_uglyurls_flag
Clarify uglyurls flag.
2013-08-17 06:35:31 -07: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
VonC
9308cd6a7a Clarify uglyurls flag.
Mention more clearly that, for generating `/filename.html`, you need to
set the `uglyurls` flag to `true`.
2013-08-14 16:47:17 +02: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
Steve Francia
c689d46aa1 Merge pull request #32 from cactus/issue-32
indexes rss.xml has wrong permalinks with ugly urls off
2013-08-12 19:42:44 -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