raviriley / agency-jekyll-theme-starter

Agency Jekyll Theme starter template (optimized for GitHub Pages)
https://raviriley.github.io/agency-jekyll-theme-starter/
MIT License
71 stars 83 forks source link

How to delete sections from page? #12

Closed onkichoi closed 2 years ago

onkichoi commented 2 years ago

I've never used Jekyll before, so here comes a beginner question.

I used this in my personal Github page. How can I delete the Services/About Us/timeline/Contact sections? I've removed them from sitetext.yml, but they're still there, but without content and a heading only. (See here: https://onkichoi.github.io/)

raviriley commented 2 years ago

You need a custom layout. This is the default layout:

---
layout: default
---
{% include navheader.html %}

{% include services.html %}
{% include portfolio_grid.html %}
{% include timeline.html %}
{% include team.html %}
{% include clients.html %}
{% include contact.html %}

In your repository, make a _layouts folder. Inside that folder, make an HTML file with a name of your choosing, for example custom.html. Then, change the ordering as needed. For what you currently want, it should look like this:

---
layout: default
---
{% include navheader.html %}

{% include portfolio_grid.html %}

This way, there's no need to delete any sitetext. You can keep everything for potential future use and instead customize the layout for your needs.

Finally, edit index.md to use your new layout, for example:

---
layout: custom
---
onkichoi commented 2 years ago

Brilliant, thanks!