Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error reading file /dist/src/sections/foo-bar/index.html: (<unknown>): mapping values are not allowed in this context at line 2 column 20 #183

Closed
hhhapz opened this issue May 9, 2019 · 3 comments
Assignees

Comments

@hhhapz
Copy link

hhhapz commented May 9, 2019

Hi, I just started using presidium and whenever I try creating a custom collection I receive this error.
I already have the correct items inside my _config.yml:

collections:
   foo-bar:
#...
sections:
  - title: "Foo-Bar"
    url: "/foo-bar/"
    collection: "foo-bar"

And in my file (.../content/_foo-bar/index.md) I have some tiny amounts of MarkDown and the title strucutre, which apparently is leading to this issue (why, though?):

---
title: "Foo Bar"
authors: [John]
status: Draft
---

# Sample MD

Although whenever I attempt to start the server with jekyll, I always get that error :(
Full log:

2022-32350:Presidium-App 32350$ yarn start
yarn run v1.15.2
$ presidium start
Cleaning all files and folders in: ./dist/
Copy base templates...
Write resolved config to the build directory...
Copy media assets...
Copy content...
Generate site structure...
Writing menu: dist/src/_includes/menu.json...
Writing page templates: dist/src/sections/
Writing search map: dist/src/searchmap.json...
Writing versions.json file...
Watching Content and Media...
Serving...
Configuration file: ../dist/src/_config.yml
Configuration file: ../dist/src/_config.yml
            Source: ../dist/src/
       Destination: ../dist/site/
 Incremental build: disabled. Enable with --incremental
      Generating...
Error reading file .../Presidium/dist/src/sections/special-area/index.html: (<unknown>): mapping values are not allowed in this context at line 2 column 20
                    done in 1.616 seconds.
 Auto-regeneration: enabled for '../dist/src/'
Configuration file: ../dist/src/_config.yml
    Server address: http://127.0.0.1:4000/
  Server running... press ctrl-c to stop.
@torabisu torabisu self-assigned this May 13, 2019
@torabisu
Copy link
Contributor

Hi there

Going to see if I can replicate the error you're getting.

@torabisu
Copy link
Contributor

Hi @Hamzantal

I cannot replicate the issue for some reason... My _config.yml file is exactly the same as yours with foo-bar in both sections and collections, then in content/_foo-bar/ I have a file called "my-article.md", and in it have:

`

title: "My first article in foo-bar"
author: torabisu

First Article

Im some content
`
I removed the status: draft, and adjusted authors to author.

When I run npm start, it builds correctly and puts the necessary items in the menu on the side under my section.

Note that index.md has a special role in the directory structure, see http://presidium.spandigital.net/recipes/content-structure/

Let me know if this helps at all, or if you still having issues.

Travis

@ruaanvds
Copy link
Contributor

ruaanvds commented Jan 6, 2020

Closing due to inactivity. Note that this issue will be taken into consideration as part of the following issue: #185.

@ruaanvds ruaanvds closed this as completed Jan 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants