empress / empress-blog

Fully-functional, SEO friendly static site implementation of a blog system built on Ember
https://empress-blog.netlify.app/
MIT License
180 stars 30 forks source link

Add Github and LinkedIn for authors #35

Open devotox opened 5 years ago

billybonks commented 4 years ago

@mansona This seems like an easy change, I would like to add GitHub as well. there are two ways I can think off.

  1. update the keys passed to static-site-json, update the model and then update the templates.

  2. deprecate existing social keys, use a new social hash update the templates.

the downside of 2 is that template developers will not know all the possible socials that people use, the upside is that there should be no reason to change the keys passed to static site again.

what do you think ?

mansona commented 4 years ago

Hey folks, sorry I thought I had responded to this 🙈

I have been reluctant to add this to empress-blog because it would mean that we are diverging from the upstream Ghost API 🤔 https://ghost.org/docs/api/v3/content/#authors

The flip side is that we need this for the Ember Website Redesign project so we will need to add it soon anyway. I think I would be more comfortable adding it downstream in empress-blog if we have at least created an issue to track it in Ghost 🤔 how does that sound? Do either of you have the time to open that issue?

billybonks commented 4 years ago

I don't know how much value there is to binding to the ghost API since this project does not have the multi-year debt that ghost has.

If it's a question about onboarding users from ghost to empress, that can be done in a transformer layer. which presumably you have worked on already since I saw a Ghost/WordPress importer.

I think this feature is probably quite important for empress blog since it targets developers directly.

it also leads down a different path whereby, the models are not fixed. for example, I see many ghost blogs with some sort of a blurb

image

I am not sure how this fits in the ghost data model, but if I could configure the serializer this wouldn't be a problem, I would add a key called description or blurb. On the other hand, there is value to having the fixed models so that templates are compatible.

Is there any reason you want to stay fixed to the Ghost data model?

mansona commented 4 years ago

So right now the most popular template for empress-blog is empress-blog-casper-template, and it is easy (hopefully soon trivial) to port a Ghost template to an empress-blog template because they are written in handlebars and it is similar to Ember templates.

There are some benefits in keeping them tied for sure, and yes we should balance that with the needs of what we want as a project.

I'm not saying "no" for this particular feature, in fact I'm agreeing that we need it ASAP. What I'm asking for us to do is to open a discussion with Ghost upstream to see if we can get them to add it to their API too 👍 the only prerequisite I have before we can work on this issue is that the conversation be started with Ghost, that's all 😄

billybonks commented 4 years ago

I Fully understand, though to be quite honest I don't feel passionate enough to start a conversation with them especially after seeing this https://github.com/TryGhost/Ghost/issues/9599. Actually ended up here because I felt i hadn't contributed in a while :).

mansona commented 4 years ago

Thanks for the link, yea it doesn't fill me with confidence that we are going to get anywhere with this 🙈

I opened the discussion on their forums https://forum.ghost.org/t/additional-social-accounts-for-authors/13725 and let's hash out any ideas that we have for the API there and then implement whatever is settled on in empress-blog 👍

how does that sound?

billybonks commented 4 years ago

Thanks for being the main drive on the discussion with ghost. When do you think ember will need this feasture by? Would be good to wait a week and see what they have to say ?

mansona commented 4 years ago

@billybonks I'm even happy if you and I come up with a good API in that thread on the ghost forum and just run with it. We should not wait for a response from ghost otherwise we could be waiting for months 😂

billybonks commented 4 years ago

going to go with

"social": [
  {
    "name": "facebook",
    "link": "https://facebook.com/example",
    "title": "Facebook"
    "icon":
  },
  {
    "name": "twitter",
    "link": "https://twitter.com/example",
    "title": "Twitter"
    "icon":
  },
  {
    "name": "linkedin",
    "link": "https://linkedin.com/profile/example",
    "title": "LinkedIn"
    "icon":
  }
]

Where icon is optional if a template supports defaults?

devotox commented 4 years ago

I think that makes sense and is very easily modified