Widgets
Table of Contents
Simple Material defines some view elements as reusable ‘widgets’. If you are using a local Jekyll environment, you can include these widgets anywhere in your pages using the {% include widget_name.html %}
directive. Some of them are also used in the built-in layouts of the theme.
Goodreads Books (widget_goodreads
)
Shows the recently read books of the specified Goodreads user. To link your profile, add your Goodreads user ID (an 8-digit number) in the _config.yml
file.
menu_social:
goodreads: goodreads-user-id
GitHub Contributions (widget_github
)
Shows the GitHub contribution chart of the specified GitHub user. To specify the user, add your GitHub username in the social menu in _config.yml
file.
menu_social:
github: github-username
Feedback (widget_feedback
)
If your site’s is open-source and hosted on GitHub, you can allow visitors to contribute to your site’s source code or report issues using this widget. To use this,
- Include the widget in your page layout.
- Check that your project folder contains a
git
repository (i.e..git/
folder exists). - Check that the
remote
is set to project’s GitHub repository (usegit remote -v
), which must be owned by you. - Get a personal access token from GitHub with the
repo
scope. - Set the
JEKYLL_GITHUB_TOKEN
environment variable before building the Jekyll website. For example, by runningJEKYLL_GITHUB_TOKEN=token bundle exec jekyll build
wheretoken
is the PAT you created in Step 4 above.