Petter
October 14, 2022, 9:34am
1
Hi, is it possible to use Netlify CMS without a static site generator?
I’m talking pure handcoded HTML, CSS and JS websites.
In the docs there is only instructions for how to install if you are using specific static site generators, and i use none.
clarnx
October 14, 2022, 9:57am
2
Hi @petter , thanks for posting.
There is a similar post here that discusses how you can integrate Netlify CMS without using a static site generator.
@erez ’s answer is great to help you get started.
You can follow https://www.netlifycms.org/docs/add-to-your-site/#app-file-structure .
It mentions how to proceed if you’re static site generator is not listed.
You need to create an admin
directory with index.html
and config.yml
files.
The index.html
should look like this:
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Content Manager</title>
</head>
<body>
<!-- Include the script that builds the page and powers Netlify CMS -->
<script src="https://unpkg.com/netlify-cms@^2.0.0/dist/netlify-cms.js"></script>
</body>
</html>
For the config.yml
you can follow Add to Your Site | Decap CMS | Open-Source Content Management System
Kindly try it out and let me know the outcome if it works or not.
Hope this helps.
Thanks.
Be aware that Netlify CMS cannot edit html files directly. If you’re planning on doing just that, don’t waste your time and look for a different solution
3 Likes