📅 30 Jan 2021
I wanted to do a guide on how to set up a guestbook page on a Jekyll/Simple.css, like mine.
Note that as you will see below this is a (hopefully) temporary solution. If you are looking for a fully functional, fully automated guestbook you’ll have to look elsewhere.
For the purposes of this guide, I am going to assume you having a working Jekyll/Simple.css site and that you know your way around the terminal on a mac. I’m also going to assume you are using Netlify. They have very simple form handling and that’s why I am using it.
First, you need to edit your navigation.yml file to include a link to the guestbook page. Remember that the navigation.yml file is in the _data folder. The code will look like this:
- name: Guestbook link: /guestbook
Once that is done, create a file called guestbook.md in your sites main folder.
Next, I am just going to copy and paste the header from any one of my other page’s .md files, in this case, from my contact.md file and modify it. Your guestbook.md file should look like this:
--- title: Guestbook | Ryan Moore header: Guestbook description: Leave a note for myself and others to see permalink: /guestbook/ layout: default ---
Next, I’m going to add just a little bit of customization to the file, like so:
--- title: Guestbook | Ryan Moore header: 💬 Guestbook description: Leave a note for myself and others to see. permalink: /guestbook/ layout: default --- The online version of that book you sign at weddings and bourgie friends' houses when they have you over for dinner. Leave an entry of your own and/or read the entries left by others.
Next, I am going to build the form. For this, I am going to use the code from Simple.css. I’m not going to copy the full code because it is long, but if you go to the demo guide, just scroll down to the form code.
If you are using Netlify, the most important change is in the first line of the form:
form method="POST" name = "guestbook" data-netlify="true"
As of the time of writing this post, I am planning on reviewing the forms within my Netlify dashboard and posting them below the guestbook form. This means I need to update the guestbook.md file to include the following below the form:
- Date: January 30th, 2021
- Name: Ryan
- Email: email@example.com
- Website: blog.mooreanalysis.com
- Entry: This is what your entry will look like!
Obviously this is going to be tedious at first. But I also don’t expect to get that many entries - at least not initially. I am not overjoyed with this but it will have to do given my current time demands and skill level.
If you have any feedback on this I look forward to hearing it!
Day 12: #100DaysToOffload
💬 Looking for comments?
I don't have comments on this site because I don't feel like managing them.
Instead of leaving a comment, feel free to ✉️ contact me instead.