Giter VIP home page Giter VIP logo

Comments (4)

jannis-baum avatar jannis-baum commented on September 14, 2024

Hello! No worries haha, I think this might turn into a cool addition to Vivify, so thanks for the idea!

That said, I'm not entirely sure what you would like to see here. I'll make a proposal.

What we could do is:

  1. Detect the front matter and hide it completely so it doesn't pollute the viewer.
  2. Parse the YAML of the front matter, convert it to JSON and expose it to your custom client-side JS. This way you can use your Vivify config to do whatever you want with the data of the front matter, e.g. display something on the viewer based on some value there.

The idea behind this is that YAML is meant to be read by machines, not humans (hence (1) no displaying on the viewer) and that there are no common conventions for what the front matter contains/defines (hence (2) customized behavior).

from vivify.

jannis-baum avatar jannis-baum commented on September 14, 2024

Hey @Praczet are you still interested in this?

from vivify.

Praczet avatar Praczet commented on September 14, 2024

Sorry,
Of course I am interested in this. I was quite sure I've answered you.
For me the solution to parse and convert to JSON is working.
I would probably then write a script that would inject some html just below navigation, with possibility to display information from YAML front matter.. Personally I am using YAML front matter quite heavily.

Only, I would need some little help (or point when I can find the help) about this client-side.js how to start, where to put etc

from vivify.

jannis-baum avatar jannis-baum commented on September 14, 2024

Okay nice! I'll get to work on this some time soon then and once it's merged I'll let you know how to use it :)

from vivify.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.