6 ms·
This is so strange - I am on course to build my own developer blog with a similar stack (minus TypeScript, and syntax highlighting). I am also using a CMS inst
by dan_can_code 6y ago
This is so strange - I am on course to build my own developer blog with a similar stack (minus TypeScript, and syntax highlighting).
I am also using a CMS instead of just plain markdown - in this instance it is NetlifyCMS.
Netlify CMS is the perfect go-between of a fully-fledged CMS, and a much too basic static site with just markdown - I dislike the experience of writing markdown and would rather use an editor.
With NetlifyCMS - the blogging flow is as follows:
- User logs into NetlifyCMS
- User updates content
- Content is 'pushed' to the repo as a commit.
- CI / CD picks up changes on master branch
- CI/ CD publishes changes
- The site is updated!
The example code can be found here: https://www.netlifycms.org/docs/nextjs/ https://www.netlifycms.org/docs/nextjs/
It is extremely simple to get up and running - but also offers great flexibility if, as the author has stated, you wish to use your website to demo components - visualise data, anything custom really!
The only difference with my implementation is instead of using the `public/` folder, I created an 'admin' folder within 'pages', with an index.js file for the HTML contents, as referenced here: https://www.netlifycms.org/docs/nextjs/#adding-netlify-cms https://www.netlifycms.org/docs/nextjs/#adding-netlify-cms. The only reason being, I didn't want to have to specify '/admin/index.html' every time i want to edit the content.
My only gripe with this blog post - is its insuniation that it is 'ideal'. I think its pretty clear from the post, it is only 'ideal' for the author. Unfortunately, the HN community has taken the opportunity to rip apart the authors opinion - which is disappointing. Thanks for the content, Colin!
- colinmcd 6y agoThanks Dan :) NetlifyCMS looks really cool. It definitely took me a while to come around to writing MD directly (basically until I discovered VSCode's hot-reloading Preview), but I understand the appeal of a rich editor. I'd definitely get rid of the word "ideal" if I could post this again It attracted a little (read: lot) more vitriol than I expected. I submitted this right before going to bed so by the time I woke up it was too late to edit the title.
- dan_can_code 6y agoMy pleasure, Colin. I am too lazy to use brackets and hashes in my writing is all - glad it works for you, regardless. I think from the context of your writing - it was fine. I found it pretty clear it was from your 'personal' view. As they say however, all publicity is good publicity - I look forward to any more content you will be posting!