themefisher / airspace-hugo

Airspace Hugo theme for multipurpose use, like Portfolio, Blog, Business.

Home Page:https://gethugothemes.com/products/airspace/?utm_source=airspace_github&utm_medium=referral&utm_campaign=github_theme_about

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Configuring services

vegetarianinvestor opened this issue · comments

I am trying to update the list of services in the service.md file but since I have just two services to offer, I am unable to get the right layout on the web page. I want the two services shown in the center of the page instead of the 8 that are shown by default.

I tried to play with the html and css of the below block from partials/service.html but with no luck.
I modified the bootstrap css below to class="col-sm-2 col-md-3" but it isn't so easy probably.

Could you please guide me?

Thanks.

    <div class="row">
      {{ range .service_item }}
      <div class="col-sm-6 col-md-3">
        <div class="service-item">
          <i class="icon {{ .icon }}"></i>
          <h4>{{ .name | markdownify }}</h4>
          <p>{{ .content | markdownify }}</p>
        </div>
      </div>
      {{ end }}
    </div>

You can read about Bootstrap 3.4's grid layout here.

TL;DR: There are always 12 columns in total, so you probably want to change the div class to col-sm6 col-md-6.

Great the above tip seems to work out. I have another issue related to services page

Despite the fact that all sections in the service.md file are enabled to true i.e. the "about", "featured_service", "service" & "cta", I see only the banner with the title and description. I reviewed the service.html page and even tried the generated source code on the website multiple times but I couldn't figure which other flag needs to be enabled. Could you please guide me?

Thanks.

Despite the fact that all sections in the service.md file are enabled to true i.e. the "about", "featured_service", "service" & "cta", I see only the banner with the title and description. I reviewed the service.html page and even tried the generated source code on the website multiple times but I couldn't figure which other flag needs to be enabled. Could you please guide me?

No clue what you're doing wrong... if all the necessary layout files are in place, it should be enough to enable the sections in the service.md file.

I figured out the problem. I had "services" as the layout instead of "service". An extra 's' caused the problem. I guess layout key links the md file with the html file, hence the problem. Thanks for helping out.

I guess layout key links the md file with the html file

Exactly. You can read about predefined front matter variables like layout in the official Hugo documentation.