Fabrizio (Misto) Milo
aae409d6c4
abstract html/template dependency
2013-09-01 10:56:31 -07:00
Fabrizio (Misto) Milo
c14fe9e505
use s everywhere for consistency
2013-09-01 10:51:21 -07:00
Mark Sanborn
6c8e7edbb4
The <!--more--> (summary divider) now works even if it is on the same line as content
...
Signed-off-by: Noah Campbell <noahcampbell@gmail.com>
2013-09-01 07:44:29 -07:00
Noah Campbell
4349216deb
Small code cleanup
2013-08-31 20:00:57 -07:00
Noah Campbell
0fdea0c2c2
Return an error with WritePublic
2013-08-30 21:24:25 -07:00
Noah Campbell
097b782a80
Removing site.Directories.
...
Please revert if this is used somewhere.
2013-08-30 21:13:50 -07:00
Noah Campbell
b14b61af37
Externalize the writing of content to a target
...
Introducing the target module in hugo. This provides the simple
interface for writing content given a label (filename) and a io.Reader
containing the content to be written.
If site.Target is not set, it defaults back to the original behavior of
writing to file system.
In hugolib/site_url_test.go I have an InMemoryTarget for testing
purposes and use it to see if the final output of a render matches.
2013-08-30 20:45:42 -07:00
Noah Campbell
c32f401b15
Revert "Return errors when rendering"
...
This reverts commit e66ba5d2a7
.
Fixed #69
2013-08-30 20:08:13 -07:00
Noah Campbell
a792ec09ce
Cleanup formatting - go fmt ./...
...
Remember to run go fmt ./... before committing. Looks sternly in mirror
2013-08-30 14:39:12 -07:00
Mark Sanborn
4ed43e8076
Fixed bug where Url specified in front matter as pretty url wouldnt render
...
Signed-off-by: Noah Campbell <noahcampbell@gmail.com>
2013-08-30 14:39:11 -07:00
Ross Lawley
1bb00b8c19
Refactored added RenderThingOrDefault and tests
...
Signed-off-by: Noah Campbell <noahcampbell@gmail.com>
Conflicts:
hugolib/site.go
2013-08-27 12:40:53 -07:00
Hugo Duncan
1de1992664
Return any error reported by RenderHomePage
...
Signed-off-by: Noah Campbell <noahcampbell@gmail.com>
2013-08-23 16:55:40 -07:00
Ross Lawley
7b1f0960e3
Add 404.html for gh-pages
...
Signed-off-by: Noah Campbell <noahcampbell@gmail.com>
2013-08-23 16:38:35 -07:00
Noah Campbell
f28a8fa0c2
RenderThing test cases
...
Provide unit test support RenderThing.
One observation is that creating the site.Tmpl variable is a one time
event. site.Tmpl doesn't like additional templates with the same name.
This means that updating a template while in --watch mode requires
throwing away the entire Site object and creating a new one. Not that
this is a bad idea, but it is something I discovered while working on
these unit tests.
2013-08-23 16:21:28 -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
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
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
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
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
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
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
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
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
fc5e92cc24
Provide better error handling
...
Change the method signatures to follow the check ok pattern.
2013-08-09 17:36:31 -07: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
spf13
783f0d6154
fixing badlink on homepage
2013-08-06 01:06:59 +02:00
spf13
6789b6c5ce
removing erroneous debugging output
2013-08-06 01:05:50 +02:00
spf13
dff86cb22c
Renaming indexes template to indexes.html
2013-08-03 03:29:24 -04:00