typemill / typemill

Typemill is a lightweight, flat-file CMS designed for simple, fast, and flexible website and eBook creation using Markdown.
https://typemill.net
MIT License
427 stars 60 forks source link

YamlFrontMatter #26

Closed svanlaere closed 4 years ago

svanlaere commented 4 years ago

Typemill really could use support for YamlFrontMatter. https://github.com/kzykhys/YamlFrontMatter

Currently Typemill adds the title to the content making it a H1 header thats a problem for YamlFrontMatter since that needs to go first.

Consider this a feature request.

trendschau commented 4 years ago

Hi svanlaere, I have other plans for Typemill because the markdown files should stay completely clean from metadata. So I decided against frontMatter. Instead I want to store meta-information in separate JSON-files. This is on the roadmap for version 1.3.X, but first I have to finish the visual editor with version 1.2.X. https://typemill.net/typemill/roadmap

Typemill parses the h1 in content page and creates the title from it. With JSON meta-information there will be other ways, of course. And it will probably be easy to write an import/transformation for markdown with frontMatter.

svanlaere commented 4 years ago

Thanks for replying, I like your roadmap, consider adding it to Github too. In the meanwhile I created a plugin that takes care of FrontMatter stuff.

trendschau commented 4 years ago

Good idea, will add it to GitHub. A plugin for FrontMatter sounds exciting! I will proceed with Typemill mid of August probably...

trendschau commented 4 years ago

As of version 1.3.0 Typemill supports meta-tabs. Basically it is the same as Frontmatter, but Typemill stores the meta-information in separate YAML files to keep the content files clean (pure Markdown).

svanlaere commented 4 years ago

Thank you for the update, just installed it freshly to see what is new.

It does seem one only has access to the tabs when the Visual Markdown Editor is enabled? It would be nice to have access to the metadata when using Raw Markdown Editor too.

Is it possible for plugins to extend the meta-tabs with custom fields and/or add new tabs?

trendschau commented 4 years ago

Right now the meta-tabs are only accessible via visual mode. I can try to add it to the raw mode later.

Yes, you can add your own fields to the tab and you can even create your own meta-tabs, but this is not ready yet (not all fieldtypes are supported and some functionalities are missing). Basically you can add field-definitions in your plugin yaml-files like this:

metatabs:
  meta:
    fields:
      yourfielddefinitionshere

This will add the fields to the existing tab "meta". A new meta-tab can be added with a simple vue-component, I will add that in the next releases.

It will take about two releases to make all these features smooth and easy...

svanlaere commented 4 years ago

Very promissing, I like it a lot. I tested adding fields to the existing tab and that indeed worked as intended.

Do you also have plans for i18n support? I translated some parts into Dutch by editing the Twig views obviously that isn't the proper way to support multilangual backends.

trendschau commented 4 years ago

With version 1.3.1 Meta-Tabs are fully implemented and added to the raw mode. Forms are now documented in a separate chapter: https://typemill.net/forms

i18n will probably be contributed by iusvar very soon and I am also very excited about that new feature: https://github.com/typemill/typemill/pull/57