Git Product home page Git Product logo

Comments (6)

pjlamb12 avatar pjlamb12 commented on July 22, 2024 2

Okay that's great, but I don't think this should be closed just yet. Some of those frontmatter items, like permalink or published or published date should be used. So if the filename is 2019-12-16-my-post.md, but the publish_date is 2019-12-20, the file should not be created until that day. In addition, if the permalink value is /this-is-the-post-name, that should be the generated file name, and not the actual file name.

Having some of the front matter available through the service is great, but those values also need to be used at build time. If that is set through the service, are there any examples of how to do this?

from scully.

SanderElias avatar SanderElias commented on July 22, 2024 1

Front-matter is already in use, and all the data is available to you angular app by means of the ScullyRouteService

from scully.

SanderElias avatar SanderElias commented on July 22, 2024 1

from scully.

pjlamb12 avatar pjlamb12 commented on July 22, 2024

image

Here is an example of frontmatter from a post on my site.

from scully.

pjlamb12 avatar pjlamb12 commented on July 22, 2024

I think this front-matter plugin could work perfectly. You use it to parse a markdown file, and it returns an object like this:

{
    attributes: {
        title: 'Just hack\'n',
        description: 'Nothing to see here'
    },
    body: '\nThis is some text about some stuff that happened sometime ago',
    frontmatter: 'title: Just hack\'n\ndescription: Nothing to see here'
}

The attributes could then be applied to the document.

Another option could be using this yaml-front-matter plugin. It's similar to the above, but it just returns the frontmatter as an object. Then the permalink for the post could be determined, the page title, and other similar things.

from scully.

pjlamb12 avatar pjlamb12 commented on July 22, 2024

Okay sounds great. :) Thanks for the explanation! Looking forward to those things. :)

from scully.

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.