Closed LightGuard closed 11 years ago
This should not be a problem for AsciiDoc files as the front matter should be written into the AsciiDoc document attributes (below the title).
For Markdown files, I recommend having a separate input box for front matter that gets weaved in at the proper location..because it does mess up the syntax highlighting and non-Awestruct preview. It might even be good to have formal inputs for the common front matter like date, author, tags and so forth.
As for the layout, I recommend hiding that and having an extension add it. I don't think content authors should be concerned about what layout is being used. Perhaps make it a convention based on the directory where the document is located.
A good reference for handling front matter is the Wordpress post interface. It's not perfect, but it gives the idea of how it might work.
The syntax highlighting form markdown files isn't messed up by the front matter.
Splitting the editor in two or modifying the file isn't ideal as you are changing the text of the file when you do that. At least for now.
Is it really a problem to leave it at the top? I just checked and it looks fine in asciidoc, markdown, haml, javascript and css. If we wanted to, we could also extend the syntax highlighters to colour the front matter differently.
Okay, if it's not causing a problem, I'd go with leave it for now. If content authors are confused we can hide it and do something to show it later.
On Mon, Jul 1, 2013 at 1:33 PM, Wes Bos notifications@github.com wrote:
The syntax highlighting form markdown files isn't messed up by the front matter.
Splitting the editor in two or modifying the file isn't ideal as you are changing the text of the file when you do that. At least for now.
Is it really a problem to leave it at the top? I just checked and it looks fine in asciidoc, markdown, haml, javascript and css. If we wanted to, we could also extend the syntax highlighters to colour the front matter differently.
— Reply to this email directly or view it on GitHubhttps://github.com/awestruct/web-editor/issues/21#issuecomment-20304745 .
Jason Porter http://en.gravatar.com/lightguardjp
Good idea. I do like @mojavelinux's idea on having some sort of interface to manage it, but thats down the road.
Yep, exactly.
On Mon, Jul 1, 2013 at 1:37 PM, Wes Bos notifications@github.com wrote:
Good idea. I do like @mojavelinux https://github.com/mojavelinux's idea on having some sort of interface to manage it, but thats down the road.
— Reply to this email directly or view it on GitHubhttps://github.com/awestruct/web-editor/issues/21#issuecomment-20304966 .
Jason Porter http://en.gravatar.com/lightguardjp
Since we're doing asciidoc files now, this is even less of a concern at this point.
Yeah I think we can close this one
Front matter is a delimited section at the top of the file (delimited by lines only containing
---
) that has meta data in the yaml format for the page. Meta data can contain variables, layout to use, tags, etc.I was initially thinking of splitting the editor into two (one for front matter, one for the other). If you throw it all in the same editor it may confuse the syntax highlighting.