Re: [tw5] How do I store fields inside *.md files? As if it were a .tid file, without separating fields to the .meta file

2021-08-05 Thread Jeremy Ruston
We actually have a similar situation with .js files. As you know, they can 
contain front matter like this:

/*\
title: $:/core/modules/commands/build.js
type: application/javascript
module-type: command

Command to build a build target

\*/
(function(){

But one can also include a .meta file. Any fields specified there are processed 
before the front matter fields, so the values there take precedence.

We should therefore be able to follow the same approach with .md files

Best wishes

Jeremy


> On 5 Aug 2021, at 16:53, PMario  wrote:
> 
> On Thursday, August 5, 2021 at 2:56:28 PM UTC+2 Jeremy Ruston wrote:
> ...
> I certainly would draw the line at integrating a full YAML parser, but 
> there’s no reason why we couldn’t parse a simple subset of YAML fields from 
> MD files. 
> 
> I do agree here. The only thing we would need to implement, would be to 
> search for the --- markers, strip them out and convert the rest using the TW 
> parser. ... 
> 
> There is still the problem with the default nodejs behaviour, that it splits  
>  type: text/markdown  files into 2 elements. We would need to change that 
> back to write a single .md file with the "front-matter" stuff at the top. 
> 
> So we will need to support 2 versions. The problem is that it seems they 
> didn't change the file extension. So we do have no real indicator if a file 
> contains front-matter content or not. ... 
> 
> -mario
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "TiddlyWiki" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to tiddlywiki+unsubscr...@googlegroups.com 
> .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/tiddlywiki/11ee592e-dae3-4e9a-bd75-1b879160d110n%40googlegroups.com
>  
> .

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/B6432C00-25D7-482D-8B2C-9CC3EC915352%40gmail.com.


Re: [tw5] How do I store fields inside *.md files? As if it were a .tid file, without separating fields to the .meta file

2021-08-05 Thread PMario
On Thursday, August 5, 2021 at 2:56:28 PM UTC+2 Jeremy Ruston wrote:
...

> I certainly would draw the line at integrating a full YAML parser, but 
> there’s no reason why we couldn’t parse a simple subset of YAML fields from 
> MD files. 
>

I do agree here. The only thing we would need to implement, would be to 
search for the --- markers, strip them out and convert the rest using the 
TW parser. ... 

There is still the problem with the default nodejs behaviour, that it 
splits   type: text/markdown  files into 2 elements. We would need to 
change that back to write a single .md file with the "front-matter" stuff 
at the top. 

So we will need to support 2 versions. The problem is that it seems they 
didn't change the file extension. So we do have no real indicator if a file 
contains front-matter content or not. ... 

-mario

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/11ee592e-dae3-4e9a-bd75-1b879160d110n%40googlegroups.com.


Re: [tw5] How do I store fields inside *.md files? As if it were a .tid file, without separating fields to the .meta file

2021-08-05 Thread Jeremy Ruston
> Agreed. If we do add support for meta data in markdown files it would then be 
> prudent to consider the YAML frontmatter format which is becoming quite 
> commonplace:
> https://jekyllrb.com/docs/front-matter/ 
> https://gohugo.io/content-management/front-matter/
> 
> Now I better duck before Jeremy throws something at me for mentioning YAML

I certainly would draw the line at integrating a full YAML parser, but there’s 
no reason why we couldn’t parse a simple subset of YAML fields from MD files.

Best wishes

Jeremy 

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/9873F926-F9C9-49CA-9658-A1955631A676%40gmail.com.


[tw5] How do I store fields inside *.md files? As if it were a .tid file, without separating fields to the .meta file

2021-08-04 Thread Shareda

Hello! I am setting up my workflow using TiddlyWiki 5.1.23 on Node.js. 
I would like to store and edit all of my tiddlers within the *.md files 
with all their fields.

How can I switch off the generating of the separate *.meta files for MD 
format and store the filds the same way as they are stored in .tid files ? 

My own research is about to fail :^)

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/ea5cf27d-12bc-4e24-8037-4bc599e95ce0n%40googlegroups.com.