Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Jekyll-compatible front matter #3

Open
bmann opened this issue Aug 19, 2018 · 2 comments
Open

Support Jekyll-compatible front matter #3

bmann opened this issue Aug 19, 2018 · 2 comments
Milestone

Comments

@bmann
Copy link
Owner

bmann commented Aug 19, 2018

Jekyll is the initially supported static site generator we want to target, especially when it is also hosted on GitHub Pages.

Along with the body of the post, Jekyll requires “front matter” — metadata at the top of text files. See https://jekyllrb.com/docs/frontmatter/

The server needs to accept a micropub formatted posted from microblog as per #1 and then create a Jekyll compatible markdown text file and push it to the Git repo.

The default front matter should look like this:

---
layout: post # use this as default for now; post is usually a default layout so should work out of the box
title: 
date: # publish date
categories:
tags:
micropub: true # this allows layout / theme / other logic to know this post came from microglue / is micropub compatible
---

The rest of the file should include the body of the content.

TO DO:

  • Review micropub spec & microblog specific publishing interface to see what it pushes
  • Get feedback on additional front matter entries
@bmann bmann added this to the Base Features milestone Aug 19, 2018
@bmann
Copy link
Owner Author

bmann commented Aug 19, 2018

@patdryburgh I know you had more front matter. I trimmed it to be more “Jekyll minimal”. eg I know you put “published” as one entry. Is that a true/false or a published date? And permalink I personally only use for pages and set in config for posts.

Can you please document the front matter you use and what you use the entries for?

And review what I’ve written here to see if it makes sense.

This should be configurable, but it would be nice if it “just worked” on a first test, without special layout, and then users could edit config files and/or their own Jekyll site to customize it.

@patdryburgh
Copy link

@bmann Published is a Boolean that allows you to save posts as drafts. It is true by default, and I don’t think we need to support draft posts at this time, so I’m good to drop it.

Also good to drop Permalink for the reasons you’ve given.

The only other fields we may consider — though it’s debatable whether they’re required for an MVP — are:

  • author (used for multi-author blogs)
  • category (some blogs limit posts to one category and use tags for additional… categorization? Anyway, it’s one of the default variables so it might be worth including, or perhaps automatically determining based on the number of items passed to a “categories” field)

The only custom variable I’ve started to use is audio for my podcast, but I’m not sure what apps like Wavelength for Micro.blog are doing for this.

Everything else looks 👍😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants