janczizikow / sleek

:chart_with_upwards_trend: Sleek is a modern Jekyll theme focused on speed performance & SEO best practices
https://janczizikow.github.io/sleek/
MIT License
420 stars 637 forks source link

question: pagination and search #29

Open TonnyL opened 6 years ago

TonnyL commented 6 years ago

Hi, @janczizikow

Thanks for your nice job, sleek is such a pretty theme that I love it so much 👍.

I wondered if sleek will support pagination and search in the future?

Append:

  1. Is there any way to change the page's title?
  2. And is there any way to add more social icons?
janczizikow commented 6 years ago

Hey @TonnyL,

Glad you liked the theme! To answer your first questions:

  1. The title of the theme is controlled via jekyll seo plugin - you change the title of the index page, but modifying the title property in front matter of index.md:
---
#
# You don't need to edit this file, it's empty on purpose.
# Edit sleeks's default layout instead if you wanna make some changes
# See: https://jekyllrb.com/docs/themes/#overriding-theme-defaults
#
layout: default
title: Sleek Jekyll Theme # Change this to your desired title
---

Or you can remove the property and just control the title in _config.yml file by again changing the title property there.

  1. Yes you can add more social icons. If you're using theme as a ruby gem it might be more complicated, but if you forked the repo, you can just modify the _includes/footer.html file. Just add a new link under <nav class="social". The icons are simply SVG code, so you can copy paste the SVG code of the icons you wish to add.

Regarding search and pagination:

Since this theme was made in mind for using with github pages, I don't plan to add pagination functionality. There're some jekyll plugins for adding that functionality, but github pages don't support those plugins. Search could be a nice feature to have, however, for that I would recommend to use algolia. But again to use algolia, you need an API key and usually it's good practice not to share this kind of key on a public repo. Perhaps I could add the functionality and allow users to simply add their key somewhere in the settings (_config.yml) or in a file. This way I wouldn't have to share my API key and people using the theme could still enjoy the search functionality. Let me know your thoughts or if you have any additional questions.

Cheers!

TonnyL commented 6 years ago

OK, that's the answer that I want. Thanks 😉!