I had difficulty in setting up the submodules for version control.
REF: GitHub Project Pages
So I copy/pasted the Public folder into Netlify from Local.
Q. Do I go back to setting up Github then have Netlify pull?
or
Do I set up Netlify CMS to access the folder structure to post new documents?
current undeveloped site
Q. Which would be the best practice for a permanent solution?
fool
April 26, 2019, 1:32am
3
Hi there!
Themes can be problematic but we have an article about how to set it up here:
Last reviewed by Netlify Support: September 2023
We get this question often. Luckily, there is both a common root cause for this issue and a solution for it!
Most often, Hugo themes added using git clone to clone the theme’s repository into your existing Hugo site’s codebase will not work with Netlify. This is the common root cause I mentioned.
So, what is the solution, you ask? Use the git submodule command instead!
The Hugo team created fantastic (and detailed) documentation about this her…
I’d suggest that for a permanent solution to your theme situation.
Can you give us more details about your CMS question? I use this setup with hugo + CMS if you want to look at mine:
backend:
name: git-gateway
branch: main # Branch to update
# publish_mode: editorial_workflow
media_folder: "site/static/images/uploads" # Media files will be stored in the repo under site/static/images/uploads
public_folder: "/images/uploads" # The src attribute for uploaded media will begin with /images/uploads
collections:
- name: "pages" # Used in routes, e.g., /admin/collections/pages
label: "Pages" # Used in the UI
folder: "site/content/pages/" # The path to the folder where the documents are stored
create: true # Allow users to create new documents in this collection
slug: "{{slug}}" # Filename template: title.md
fields: # The fields for each document, usually in front matter
- {label: "Title", name: "title", widget: "string"}
- {label: "Page #", name: "weight", widget: number}
- {name: "menu", widget: "hidden"}
- {label: "Body", name: "body", widget: "markdown"}
This file has been truncated. show original
2 Likes