Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for rel=me in the social media links in the footer #26

Closed
Habmala opened this issue Jun 12, 2021 · 4 comments
Closed

Add support for rel=me in the social media links in the footer #26

Habmala opened this issue Jun 12, 2021 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@Habmala
Copy link
Contributor

Habmala commented Jun 12, 2021

Not sure if this is the right place to write but I was missing the ability to link my mastodon account that uses the rel=me format to my site through the link in my footer.

I rewrote the footer.html.twig to check for it and wanted to share. I don't how to do pull requests and such but figured I'd post the code as a feature request, feel free to just run with it if you want. The only change is to line six here. And then I added a line saying "rel: me" to the link under social media in grav-coder.yaml under the config/themes folder.

section class="container centered">
  <div class="about">
    <ul>
      {% for type, meta in theme_config.social %}
        <li>
          <a href="{{ meta.url }}" {% if meta.rel %}rel="{{ meta.rel }}" {% endif %}class="btn btn-link" title="{{ meta.title }}">
            <i class="fab {{ meta.icon }}"></i>
          </a>
          {% if loop.last == false %}
            <span class="separator">•</span>
          {% endif %}
        </li>
      {% endfor %}
    </ul>
  </div>
</section>
<section class="container">
  <span class="copyright">
    ©
    {% if theme_config.footer.copyright_start_year %}
      {{ theme_config.footer.copyright_start_year }} -
    {% endif %}
    {{ "now"|date("Y") }} <a href="{{ home_url }}">{{ theme_config.footer.copyright }}</a>
  </span>
@ParitoshBh
Copy link
Owner

Thanks for sharing the snippet. If you want to create a PR (for the sake of learning), I can walk you through the process. If it's about time then worry not, I'll push the update myself!

@Habmala
Copy link
Contributor Author

Habmala commented Aug 6, 2021

Glad you liked it. I'd be happy to learn, I should have done so long ago, just haven't gotten around to it. I'll try to look in to it over the weekend. :)

@Habmala
Copy link
Contributor Author

Habmala commented Aug 6, 2021

I think I've managed to make the change and do a pull request. First time in ages though so let me know if something is off and I'll try to fix it.

Also I didn't know where to write any type of comment or documentation. Since it's not used by default it's basically a hidden option as long as it's undocumented. Let me know if you want me to write a couple of lines explaining it, I'd be happy to.

@ParitoshBh ParitoshBh added the enhancement New feature or request label Aug 18, 2021
@ParitoshBh
Copy link
Owner

Pushed in v0.1.9!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants