NetlifyCMS Template Forms


I’m currently learning the VERY basic ropes of webdev through tinkering with static site generators. I found NetlifyCMS which has been really fun to deploy my first site with. I do have a question, that I’ve just not been able to pin down and was hoping someone would be able to assist with.

The basic NetlifyCMS template for HUGO “KALDI” has a newsletter field as well as a contact field built into the site. However within the CMS there is no way to edit those fields…or anything really that shows on the bottom bar such as the social media icons/links. Is there anyway to edit these options, or set up the contact form/newsletter?

Any help would be greatly appreciated! There’s only so much Youtube and google has been able to teach me!

You’d edit that in the site template, not via the CMS @mralexbeard . The CMS is just set up to edit page contents, not theme contents, which those are almost certainly part of (I haven’t looked at that template but that is how my hugo sites work).

I’d be looking in there (check the theme for the default settings, and then override them using files in the partials/ directory). More details in the hugo docs:

1 Like

@fool is correct that you will not be able to edit the Templates themselves, you do have the option of feeding those templates data from outside sources in your templates. The CMS can be used to edit those data files using a file collection.

Read about data driven content in the Hugo docs also.

My recommendation is to get that working using the examples first then setup the CMS to be able to edit the .json or .yaml data files.

I’ll definitely read the documentation that both @fool and @talves provided and see if I can figure out the form template. I definitely found it in the site partials folder in the footer.html file. So thank you for that info!

That’s also where the social media icons and linking is housed. My problem is, everytime I add my own link into the code below the deployment fails. I’m sure this is a major rookie question, but is this not where I should be embedding the proper social media links? Could someone provide an example of what to do to prevent it from failing to deploy due to the addition of a link?

			<h3 class="f4 b lh-title mb2 primary">Social media</h3>
			<ul class="mhn2">
				{{ partial "social-icon" (dict "link" "#" "svg" "icons-facebook") }}
				{{ partial "social-icon" (dict "link" "#" "svg" "icons-twitter") }}
				{{ partial "social-icon" (dict "link" "#" "svg" "icons-instagram") }}
				{{ partial "social-icon" (dict "link" "#" "svg" "icons-vimeo") }}

@mralexbeard Hugo has an interesting learning curve. I had to spend a lot of time to get my head around the specifics and advanced theme setups.

While the Netlify community is awesome and most are willing to helping you out, it really would be more advantageous for you to research/ask these questions in the Hugo Community. There are a lot of cases covered there with links to examples to answers and more targeted discussions.

1 Like