-
Notifications
You must be signed in to change notification settings - Fork 0
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
Basic Implementation of Netlify CMS #20
Conversation
Not finished and not working, yet. They recommend the "Git Gateway" backend, which requires us to use their Netlify Identity product, but I'd like to avoid that, as it means we'll have to manage users separately. They offer a github-oauth-api gateway which we can use to get things started, and later switch to a self-hosted proxy, if we prefer, without much hassle. Also, I only added the config for the news collection, so far.
✅ Deploy Preview for pentacode-site ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
@MaKleSoft / @Lorenz147 you can see the "demo" of the admin/cms app at https://deploy-preview-20--pentacode-site.netlify.app/admin Note that:
@MaKleSoft this can be merged as is if you want, but since I'm already a bit past the hours for the month and this should be enough of a PoC, I don't plan to work on it anymore until September. To wrap this up, I'd need a couple of weeks, mainly to:
Later, if we're concerned about the security or vendor-lock-in of Netlify, we can implement a separate backend for the GitHub OAuth, instead of using theirs (based off of this, for example). Also, note the Netlify site connected to this repo is owned by me and I can't add you without moving to a paid plan, so if you want to control that, it probably makes more sense to also just do our own GitHub OAuth backend (we'll lose the nice automatic PRs with preview deployments, but we haven't had them before anyway). To have more than one person in the Netlify site it costs $15 / month / user or something like that. |
@MaKleSoft / @Lorenz147 it was my understanding this was urgent, but perhaps I misunderstood it. It's probably best you evaluate what I've got here before September 1st so I don't keep working on it as a waste of time. |
@BrunoBernardino It's definitely not urgent. As a matter of fact, @Lorenz147 and I were considering if it wouldn't make more sense to focus on SEO optimisations first, since you seem to have a fairly good understanding of that area (certainly more than Lorenz and I). Is that something you think you could tackle? |
@MaKleSoft it was my understanding from @Lorenz147 the biggest "problem" with the site was that you were a bottleneck in updating it, and they wanted to remove that bottleneck (by making it easier for anyone to update it). If that's changed, then, I suppose SEO would be most important for organic growth, but your business and sales process doesn't strike me as requiring/depending a lot on organic growth. The SEO fixes I've made were already the main things "hurting" Pentacode, but next up would be improvements, which would require a more detailed analysis, like figuring out important keyphrases, etc. I'm just surprised if that's what you want me to focus on next, but you both know the business and its needs better than I do. So what's the plan for this PR, then?
After that, I can then focus on SEO analysis/improvements, but I need to understand a bit more about your current metrics and at least about your competitors and potentially your own funnel/sales process. Is there any documentation around it? It's fine if it's German. |
It's something we'd like to have solved sooner rather than later, but not really "urgent".
I wasn't thinking about optimising content, but more like removing technical problems that could negatively impact our ranking. If you don't think there is anything left to do in that area, I'm ok with declaring victory on that for now, so I guess you can continue working on this PR :) FYI, once you've done with this there are a lot of devops things that you can sink your teeth into. But those will require a lot more coordination with myself so I'd prefer if you could continue working on this for now. |
I'll do another pass on it and keep going here, but I just want to be sure this PoC works before spending more time on it, because now it's less "unknown" work, and more of just adding the different collections, etc.
If it's about simplifying development, adding tests, automating deployments and so on, I'm pretty sure I can still go about that without a lot of coordination, but you let me know. |
I can't see any of the recent articles (the ones about the product updates). Why is that? |
@MaKleSoft hmm, good point. Maybe I need to tweak the config to look for articles that are inside folders, but I'm looking for you to be able to see if the editor and editing process works, really. |
@MaKleSoft can you check if the news preview is good enough (the images won't all show until they're uploaded via NetlifyCMS -- so they go into the uploads directory)? The product updates should now show as well. Example URLs now:
If that's OK, I can move forward by adding the other collections (or any subset, if you prefer, since the original issue only mentions hilfe, magazin, and blog). |
Is there a way around that? I'd rather keep the images in the same folder as the article itself. |
No, that would require me to build a custom widget so those are processed, which isn't trivial to build. Do you want me to spend time on that? I wasn't planning to as this wasn't "super high priority", but I can.
NetlifyCMS doesn't support that with the default markdown widget. Maybe with the custom widget images could be uploaded like that but I'm not sure. Another supported option would be to have multiple "image" widgets (which do support custom paths), and then link the images, but that would limit the number of uploaded images. |
I added a Should I pursuit improving the previewer, or focus on adding more collections, or stop? |
Honestly I'm trying to think of a reason why we should nunjuck tags in the first place. <figure ...>
<img ... />
</figure> really isn't any less verbose or readable than {% figure ... %}
<img ... />
{% endfigure %} Same thing goes for all the other existing njk "tags" we're using. So I'm thinking about simply replacing all these "rich" components with html. Would that make it easier to integrate it with Netlify? |
{% figure caption="lala" ... %}
<img ... />
{% endfigure %} translates to <figure>
<img ... />
<figcaption>lala</figcaption>
</figure> which is a bit more verbose, but in my opinion, since you have the automatic deploys when creating drafts, the ideal would be to not spend a lot of time on improving previews further, only to create custom components for frequent/complex/hard-to-write shortcodes ( Moving everything to html components would be more future-proof indeed and help with the previews "automatically" (though the image path is still an issue that can't be easily solved). |
How much work do you estimate this would be? |
It took me a few hours (~6) to convert the previous |
Ok, let's hold off on the conversion then. We can migrate older articles gradually as we revise them. For future articles, I'd like to start working with html though. Can make the figure widget parse/output html instead of nunjuck tags? |
- Fixed figure component to output/render HTML. - Added Magazin collection - Added Magazin preview, tweaked News preview as well - Tweaked author rendering in preview
@MaKleSoft check it out now. Should I merge this and keep working on adding the other collections and previews, or something else? What I did today:
|
@BrunoBernardino Ok, so I've played a little with the editor and review/publish flow and I really like it! A couple of things:
|
Fixed.
Fixed.
It's possible, but I'm not sure how it'll interact with some other customizations. I'll give it a shot next week (not working tomorrow, already a bit over time this week).
Is this only on the body, or somewhere else? I'm not having this on LibreWolf/Firefox, but will try Chrome
I've tried a few things, but I haven't found out how yet, unfortunately.
Not sure what you mean, the widget allows HTML, so you should be able to add whatever you want inside?
Fixed.
Fixed. |
You can place html inside, but there is no way to select and upload an image like there is with the image widget. |
Only the body input |
These two points were my main gripe with forestry and I'm super happy you managed to solve those! The images inside the body are even visible in the preview! Didn't you say that wasn't possible if the images weren't uploaded to a central upload folder? Now, if you manage to get the cover image to show up in the preview, too, I'll be happy as a clam 😋 |
A few more items for my wishlist:
|
One more thing: The "View Preview" link gives me a 404 (looks like there is an extraneous |
- Allow picking a custom slug - Fixed cover image showing on draft/preview and published - Added class selector to figure widget
I've tried enabling that before, but I found the interface quite confusing. I'll give it another shot again.
Is this happening only on Chrome with macOS?
I thought so, but I persevered!
Get that happy as a clam face going, because I fixed that too!
Done.
Not sure what you mean by "inline", but I can make ones similar to the figure one.
This one is "partially fixed". With automatic slugs it'll add that extraneous index, but for articles with the slug override it should work fine. |
Looks like it, yeah. I haven't tested it on another OS but it works in Firefox.
🥳
I mean inline as opposed to a block element. Like it should be displayed inline within the text flow. Does that make sense? |
It seems like there's some bug in the latest Chrome versions affecting this: decaporg/decap-cms#5092 Not sure what to do, here, though that issue seems related to the text widget inside a custom component, not the body widget.
It's not possible, at this moment, I'm afraid: decaporg/decap-cms#5065 |
Right now, I'm missing the funktionen section and the other regular pages. I'm happy to just add those later in another PR or not at all, if you want to move on to something else more important. |
Nope, not necessary.
Any news on that? Right now the figure widget is not really usable since there is no way to upload an image to put into it. |
Just pushed it in a way that works, but previews don't seem to show up until it's saved, unfortunately. I think this is ready to merge, so I can move on to something else more important? |
It's fine because I'm missing < 10h for the month, but FYI I'm blocked on this, @MaKleSoft / @Lorenz147 . |
@BrunoBernardino You can go ahead and merge this. I'll have to put some thought into what might be a good project for you to take on next. Is it ok if I let you know on Monday? |
Not finished and not working, yet. They recommend the "Git Gateway" backend, which requires us to use their Netlify Identity product, but I'd like to avoid that, as it means we'll have to manage users separately.
They offer a github-oauth-api gateway which we can use to get things started, and later switch to a self-hosted proxy, if we prefer, without much hassle.
Also, I only added the config for the news collection, so far.
FYI @MaKleSoft