Doctave / doctave

A batteries-included developer documentation site generator
https://cli.doctave.com
MIT License
549 stars 33 forks source link

Error after editing the files newly added #43

Closed RenukaMane closed 2 years ago

RenukaMane commented 2 years ago

I am trying to test Doctave on Windows. Have initiated the website, however after editing some of the files I am getting the following error. Can you tell me how can I resolve this error.

Screenshot 2022-03-11 154008

begleynk commented 2 years ago

Hi there. Looks like the frontmatter of the page you added is not formatted as expected. It should look something like this:

---
title: How to build
---

# The content of your page
...

Note the title: section in between the two --- lines.

Could you verify the frontmatter looks correct and try again? If that doesn't work, could you include the content of First_Page.md here?

RenukaMane commented 2 years ago

Hello. Thanks for your support. Have added a few pages to the site and its working fine. However I tried adding path to the doctave.yaml file for the new pages and faced the same issue again.

Diagrams.md file: Diagrams

doctave.yaml file: doctave_yaml

error: error

begleynk commented 2 years ago

That error is pointing to the doctave.yaml file not being formatted correctly. Could you try using a tool like this one to see if it is actually correct? Granted the screenshot you show does seem to be a valid yaml doc.

Note that the doctave.yaml file should not have the trailing --- characters. I was able to reproduce the error you got by adding that trailing line.

The --- section means "start of a yaml document". If you add another one in this context, the file can't be parsed. This is different from frontematter sections in your .md files, where the second --- character identifies where the frontmatter yaml section ends and the markdown starts.

RenukaMane commented 2 years ago

Thank you, the error is resolved.