mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-14 20:37:55 -05:00
ba45da9d03
32356e4e Fix typo in header of shortcode-templates.md c8f1a2d2 Correct code example for index template function bfa6a55d Escape code fencing ff8b2f99 Fix typos in deployment with wercker tutorial 557c36e8 theme: Merge commit '7fbb4bed25001182bfeb91f79db0f0c1936582ee' 7fbb4bed Squashed 'themes/gohugoioTheme/' changes from 7dd8a302..ca53082d ce31cee0 Add "See Also" config 158cee1b Make the tags into keywords 61600be6 Add a note to the related section 49edb5a2 Relase 0.27.1 c9bbc001 releaser: Add release notes to /docs for release of 0.27.1 213c6c3b Add bugs poster 8b4590cd Add KeyCDN integration tutorial 2b277859 Add tutorial videos to several docs pages 950fef1f Update roadmap to link to the correct milestones page 496f5bf6 Rename relnotes d6f9378d Bump Netlify versions to 0.27 087fde7f Update 0.27 release notes 603f94ae docs: Document Related Content 3790f6a3 releaser: Bump versions for release of 0.27 0948868c releaser: Add release notes to /docs for release of 0.27 git-subtree-dir: docs git-subtree-split: 32356e4eabe357ae914f4d1d59e8ae31ce936723
49 lines
1.7 KiB
Markdown
49 lines
1.7 KiB
Markdown
---
|
|
title: EOF Error
|
|
linktitle: EOF Error
|
|
description: If you find yourself seeing an EOF error in the console whenever you create a new content file from Hugo's archetype feature.
|
|
date: 2017-02-01
|
|
publishdate: 2017-02-01
|
|
lastmod: 2017-02-01
|
|
categories: [troubleshooting]
|
|
menu:
|
|
docs:
|
|
parent: "troubleshooting"
|
|
keywords: [eof, end of file, error, faqs]
|
|
draft: false
|
|
weight:
|
|
aliases: [/troubleshooting/strange-eof-error/]
|
|
toc: true
|
|
---
|
|
|
|
## Trouble: `hugo new` Aborts with EOF error
|
|
|
|
> I'm running into an issue where I cannot get archetypes working, when running `hugo new showcase/test.md`, for example, I see an `EOF` error thrown by Hugo.
|
|
>
|
|
> When I run Hugo with v0.12 via `hugo new -v showcase/test.md`, I see the following output:
|
|
>
|
|
> ```
|
|
> INFO: 2015/01/04 Using config file: /private/tmp/test/config.toml
|
|
> INFO: 2015/01/04 attempting to create showcase/test.md of showcase
|
|
> INFO: 2015/01/04 curpath: /private/tmp/test/archetypes/showcase.md
|
|
> ERROR: 2015/01/04 EOF
|
|
> ```
|
|
>
|
|
> Is there something that I am blatantly missing?
|
|
|
|
## Solution: Carriage Returns
|
|
|
|
The solution is to add a final newline (i.e., `EOL`) to the end of your default.md archetype file of your theme. You can do this by adding a carriage return after the closing `+++` or `---` of your TOML or YAML front matter, respectively.
|
|
|
|
{{% note "Final EOL Unnecessary in v0.13+" %}}
|
|
As of v0.13, Hugo's parser has been enhanced to accommodate archetype files without final EOL thanks to the great work by [@tatsushid](https://github.com/tatsushid).
|
|
{{% /note %}}
|
|
|
|
## Discussion Forum References
|
|
|
|
* http://discourse.gohugo.io/t/archetypes-not-properly-working-in-0-12/544
|
|
* http://discourse.gohugo.io/t/eol-f-in-archetype-files/554
|
|
|
|
## Related Hugo Issues
|
|
|
|
* https://github.com/gohugoio/hugo/issues/776
|