10185 Commits

Author SHA1 Message Date
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
fa6b172f87 Add redirect to page parameters and redirects example 2013-08-09 21:57:22 +01:00
Ross Lawley
e2a28114d1 Add redirect to page parameters and redirects example 2013-08-09 21:57:22 +01:00
Steve Francia
4f17ad69a7 Merge pull request #22 from nsabine/master
Added examples to indexes.md
2013-08-09 02:16:10 -07:00
Steve Francia
694248ba56 Merge pull request #22 from nsabine/master
Added examples to indexes.md
2013-08-09 02:16:10 -07:00
Steve Francia
7a13434dd9 Merge pull request #21 from duncanbeevers/master
Added .Content variable to docs
2013-08-09 02:15:50 -07:00
Nick Sabine
a8b3e1537f Added examples to indexes.md 2013-08-09 00:10:35 -04:00
Nick Sabine
a75577acac Added examples to indexes.md 2013-08-09 00:10:35 -04:00
Duncan Beevers
c8469dfba0 Added .Content variable to docs 2013-08-08 16:13:03 -07:00
Duncan Beevers
04a0dbbf73 Added .Content variable to docs 2013-08-08 16:13:03 -07:00
Steve Francia
6a5e4b363a Merge pull request #20 from VonC/version
Make sure hugo --version prints the version and does *nothing* else.
2013-08-08 15:52:50 -07:00
VonC
49b8ac5fbc Make sure hugo --version prints the version and does *nothing* else.
Any program, when asks to print their version, only prints that, and then
stops.
hugo checks the config (and prints a warning message if not found), and
proceeds to generate the site!
Yet, the user just wanted to check the version.

This patch makes sure hugo stops after printing the version.
2013-08-08 22:21:56 +02:00
spf13
a870f4d955 Fixing missing trailing slash in baseUrl 2013-08-08 12:30:01 +01:00
Steve Francia
d89c7ec7a2 Merge pull request #19 from nsabine/master
Populated page Site metadata.  Enables accessing Indexes from Page template.
2013-08-07 14:05:07 -07:00
Nick Sabine
780e2f311b Populated page Site metadata. Enables accessing Indexes from Page template. 2013-08-07 14:23:24 -04:00
Steve Francia
23f6512bcc Merge pull request #15 from hhatto/update-doc
update document for content directory
2013-08-06 08:05:18 -07:00
Steve Francia
42de9bd8bb Merge pull request #15 from hhatto/update-doc
update document for content directory
2013-08-06 08:05:18 -07:00
spf13
fa5cb9b12f Merge branch 'master' of github.com:spf13/hugo 2013-08-06 01:10:10 +02:00
spf13
0e57fcc9c2 Merge branch 'master' of github.com:spf13/hugo 2013-08-06 01:10:10 +02:00
spf13
05c0c22dba fixing badlink on homepage 2013-08-06 01:06:59 +02: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
Hideo Hattori
3db18bca9c update document for content directory 2013-08-06 03:14:40 +09:00
Hideo Hattori
78afe8d344 update document for content directory 2013-08-06 03:14:40 +09:00
Steve Francia
c5715e9800 Merge pull request #12 from imrehg/docfix
Fix example in docs that wouldn't work in practice
2013-08-05 07:13:42 -07:00
Gergely Imreh
9e12962e79 Fix example in docs that wouldn't work in practice
The pflag package used in hugo has to use the "=" sign
for double dash options such as --source. Thus the original
example `--source ~/mysite` is already incorrect. Adding
the = sign though woul not fix things in this case, since
`--source=~/mysite` does not get resolved to /home/username/mysite,
but looks for the ./~/mysite directory within the current directory.

To resolve this, either the directory name has to be changed in
the docs not to use the "~" sign, or have to change to use the
single dash version of the command line flag. The latter seems
to be more in line with the rest of the example.

Leaving `--watch` as a double dash option to minimize the change,
though it could be either way, since the follow up example uses
the single dash version of both.
2013-08-05 21:45:01 +08:00
Gergely Imreh
f31ec3c280 Fix example in docs that wouldn't work in practice
The pflag package used in hugo has to use the "=" sign
for double dash options such as --source. Thus the original
example `--source ~/mysite` is already incorrect. Adding
the = sign though woul not fix things in this case, since
`--source=~/mysite` does not get resolved to /home/username/mysite,
but looks for the ./~/mysite directory within the current directory.

To resolve this, either the directory name has to be changed in
the docs not to use the "~" sign, or have to change to use the
single dash version of the command line flag. The latter seems
to be more in line with the rest of the example.

Leaving `--watch` as a double dash option to minimize the change,
though it could be either way, since the follow up example uses
the single dash version of both.
2013-08-05 21:45:01 +08:00
spf13
70ee56a37c Fixing getting started link. 2013-08-05 11:12:39 +02:00
spf13
de9f9ae16e Fixing getting started link. 2013-08-05 11:12:39 +02:00
Steve Francia
57b206ca11 Merge pull request #11 from noahcampbell/master
Removing OSX files from repo.  Updating .gitignore to not track these files
2013-08-03 07:29:16 -07:00
Steve Francia
42e31ca51c Merge pull request #11 from noahcampbell/master
Removing OSX files from repo.  Updating .gitignore to not track these files
v0.8
2013-08-03 07:29:16 -07:00
spf13
f0b72d0a34 Fixing link to contributor page on github 2013-08-03 03:33:39 -04:00
spf13
f6e590e536 Fixing link to contributor page on github 2013-08-03 03:33:39 -04:00
spf13
6a1a038c57 Shrinking the readme to just the basics to avoid dupe with doc site 2013-08-03 03:31:25 -04:00
spf13
a21e99b85a Updating a bunch of the docs 2013-08-03 03:30:34 -04:00
spf13
6efbd93a38 Updating a bunch of the docs 2013-08-03 03:30:34 -04:00
spf13
7527fc285e Including documentation on indexes 2013-08-03 03:29:49 -04:00
spf13
def5f10183 Including documentation on indexes 2013-08-03 03:29:49 -04:00
spf13
dff86cb22c Renaming indexes template to indexes.html 2013-08-03 03:29:24 -04:00
spf13
37eb9bae7a Moved static content to /static 2013-08-03 03:10:14 -04:00
spf13
21a7b72535 Moved static content to /static 2013-08-03 03:10:14 -04:00