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

Netlify CMS Limitations/Options #292

Open
ProfYaffle opened this issue Sep 24, 2022 · 4 comments
Open

Netlify CMS Limitations/Options #292

ProfYaffle opened this issue Sep 24, 2022 · 4 comments

Comments

@ProfYaffle
Copy link
Contributor

Right, I've been fighting a bit with the WYSIWYG and Markdown editors in Netlify CMS for a while. The issue is probably twofold:

  1. It has very limited formatting options, so there's no text alignment (for example), no inline HTML
  2. The preview window is only a kind-of-preview, and doesn't accurately represent what appears on the website.

There are also some quirks around workflow, e.g. you can't properly see an image in the preview until the post is deployed, as the images aren't moved to the correct directories before that point. @pkscout turned Deploy Previews on, which addresses much of this in that I can at least see the blog posts "live" now before we actually publish them, which is a huge help (thank you) - but we could perhaps do more.

A placeholder for my own thoughts, as much as anything...

  • it looks like Netlify CMS uses remark as its markdown engine
  • remark supports a wide range of plugins, which may be useful

Immediate thoughts:

  • remark-gfm - extend the core CommonMark support to mimic Github-flavoured markdown
  • remark-github - link references to commits, issues, and users, in the same way that GitHub does in comments (so we could e.g. directly link to PRs as we do in the draft Github blog posts)
  • remark-align - provide basic left/centre/right alignment of text (may well be broken, or perhaps just for the latest version of remark, which isn't necessarily a problem)

I'll keep digging, but that's a starting point.

@pkscout
Copy link
Member

pkscout commented Sep 24, 2022

Just as an FYI. The Netlify CMS only generates the markdown files. GatsyJS is the site builder, and it actually builds the pages. So whatever solution we look at for this, it likely has to have a way to be supported both in the NetlifyCMS and Gastby.

@razzeee
Copy link
Member

razzeee commented Sep 26, 2022

decaporg/decap-cms#1503

I'm not really sure why you need text alignment. I usually only use block and the normal (left bound) one. So we are only missing block?

@ProfYaffle
Copy link
Contributor Author

It's not the most important thing in the world - it was an observation when adding captions to inline images. IMO they look better centred - both images and captions - than they do left-aligned.

@razzeee
Copy link
Member

razzeee commented Sep 26, 2022

We might be able to just center images then, and maybe we can just render the alt text you should be able to set.

But we might need to add a component for that in the CMS via https://www.netlifycms.org/docs/custom-widgets/#registereditorcomponent and then rendering it correctly on the blog side of things.

Similar to this decaporg/decap-cms#1058

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

3 participants