If it is possible to share your repo (GitHub, GitLab, etc.), that would be helpful, and we can help you come up with a solution for your specific scenario. That said, here is a basic approach you want to take:
I assume you have at least one layout you are using in the _layouts
folder, and for this post, I will assume you call it default.html
. Inside the HTML <body>
tag, I assume you will display the content for the post, so you have a page that looks something like this:
./layouts/default.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My podcast</title>
</head>
<body>
{% comment %} display the post content {% endcomment %}
{{ content }}
</body>
</html>
If that is all you are doing, then you could write some HTML that adds the footer to the bottom of your page directly underneath the {{ content }}
element.
If you have more than one layout and want the footer to be more reusable, you would add the footer content as an include. Create a folder at the root of your Jekyll site named _includes
and then create a file called whatever you want, like footer.html
. Inside that footer, you might want to add a little HTML semantic section so you can style it (like make a slightly different background color, set default font styles, etc.). The code would look like this:
./includes/footer.html
<footer class="sitefooter">
Add your html code here
</footer>
Now, your new layout will look like this:
./_layouts/default.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My podcast</title>
</head>
<body>
{% comment %} display the post content {% endcomment %}
{{ content }}
{%- include footer.html -%}
</body>
</html>
That is all you need to do. Using the _config.yml
file is useful if you want to store some commonly used data, like the link to your LinkedIn site, but that is not a requirement. You can do something as simple as writing the HTML code in the footer.html
file without ever using _config.yml
.