Hello, I wanted to inquire if any of you have successfully automated the process of converting Google Form submissions into Markdown files that can be imported into a Hugo website.
I came across two forum posts related to this topic: This post proposes a solution This post seeks a solution
I’m curious to know if anyone has achieved this task:
- Retrieving data from a Google Form into a Google Sheet.
- Transforming the Google Sheet data into Markdown files optimized for Hugo.
- Automating the import of multiple such Markdown files into Hugo.
Your insights and experiences would be greatly appreciated. Thank you!
Four steps:
- Share the sheet as a CSV file
- Get the sheet using
resources.GetRemote
- Wrangle the data from a slice of slices to a map
- Use the “prebuild” approach to build pages from data
Step 1
In Google Sheets, File > Share > Publish to web
Step 2
See https://gohugo.io/functions/resources/getremote/
Step 3
See this article.
Step 4
See this example:
git clone --single-branch -b hugo-forum-topic-45433 https://github.com/jmooring/hugo-testing hugo-forum-topic-45433
cd hugo-forum-topic-45433
rm -rf prebuild/public && hugo -s prebuild && hugo server
1 Like
Thanks a lot !!!
I will tell the community when I have released the task
This example generates pages from a Google Sheet. See the “pets” section.
git clone --single-branch -b hugo-forum-topic-47780 https://github.com/jmooring/hugo-testing hugo-forum-topic-47780
cd hugo-forum-topic-47780
rm -rf prebuild/public && hugo -s prebuild && hugo server