Closed pleasantone closed 7 months ago
I don't have experience with Netlify Identity, so I can't give you working configurations/instructions.
If you want to insert some HTML into the Decap CMS (typically /admin
) page, you can create the following files and put the custom code into those files.
layouts/partials/decap-cms/hooks/head-end.html
.layouts/partials/decap-cms/hooks/body-end.html
.Those hooks will only affact the Decap CMS page, and you don't need to configure the hugopress.
Currently, this docs for module are not complete, it introduces a lot of features since the first version, will find some time to update the docs.
Perhaps we could create a submodule hugomods/decap-cms-netlify?
Sounds good to have, will do if I find some time, #90.
I don't have experience with Netlify Identity, so I can't give you working configurations/instructions.
If you want to insert some HTML into the Decap CMS (typically
/admin
) page, you can create the following files and put the custom code into those files.
layouts/partials/decap-cms/hooks/head-end.html
.layouts/partials/decap-cms/hooks/body-end.html
.Those hooks will only affact the Decap CMS page, and you don't need to configure the hugopress.
Yep, but unfortunately netlify identity also wants some code on the home page, which is why I did it there too rather than put it into hb-custom. I'm not sure if there home-page-specific hooks, didn't notice them.
Yep, but unfortunately netlify identity also wants some code on the home page, which is why I did it there too rather than put it into hb-custom.
Your code snippet above is right, but I'd recommend using hb-custom
(or any special name), because the decap-cms
maybe conflicts in the future.
I'm not sure if there home-page-specific hooks, didn't notice them.
There isn't. Hooks for all kind of pages, you'll need to add render conditions as you did above.
Duplicate of #90
This is just documenting my own stupidity and I was wondering if it would make sense to either add fragments of this into the module to at least reduce the configuration confusion. I'm not putting it into a pull request since this is configuration dependent.
In order to get decap+netlify identity working with themes cards, I had to do the following:
Perhaps we could create a submodule hugomods/decap-cms-netlify?
config/_default/params.yaml
Can't be cacheable because of the
if $.Page.IsHome
but I don't fully understand the module plugin system so there may be a better place to put these than where I did.This snippet must be in the /admin/index.html page:
layouts/partials/decap-cms/hooks/head-end.html
these two must be on the root /index.html page:
layouts/partials/hugopress/modules/decap-cms/hooks/body-end.html
and
layouts/partials/hugopress/modules/decap-cms/hooks/head-end.html