raviriley / agency-jekyll-theme

Jekyll version of the newest Agency Bootstrap theme, plus new features: Google Analytics, Markdown support, custom pages, and more!
https://raviriley.github.io/agency-jekyll-theme-starter/
MIT License
347 stars 689 forks source link

1. Add, Remove or Change Order of Sections #29

Closed tolhuinfarmland closed 3 years ago

tolhuinfarmland commented 3 years ago

Hi, this is Issue 1:

Id like my web to show this sections in the following order:

  1. timeline
  2. services
  3. clients
  4. contact
  5. footer

And to remove altogether the sections "portfolio" and "teams".

But I had the following complications:

i) I can't rearrange the order of appearance of sections ii) I can't seem to remove a section (a blank space still exists)

What would be great to see:

A "section:" label to name a new section A "type:" label to add the the kind you choose (be it timeline/portfolio/services, etc.) An "order:" label to set the location from 1 to n The ability to remove sections by removing specifict parts.

Kind Regards

raviriley commented 3 years ago

Unfortunately, because each section is different, they can't be built based on the site text order. Instead, 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 with a name of your choosing, for example custom.html. Then, change the ordering as needed. For what you currently need, it should look like this:

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

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

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

tolhuinfarmland commented 3 years ago

Thanks, this worked perfect. For anyone with the same issue, I had to change the index.md file as well as follows: layout: custom where custom is the name of the .html with the new ordering

raviriley commented 3 years ago

That's right, forgot to mention the index.md change. Glad it worked!