Skip to content

liquid-utilities/twitter-timeline

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Liquid Twitter Timeline

Third-party plugin written in Liquid for embedding Twitter Timelines within GitHub Pages Themes

Byte size of twitter-timeline.html Open Issues Open Pull Requests Latest commits Twitter Timeline Demos


Table of Contents


Quick Start

Bash Variables

_module_name='twitter-timeline'
_module_https_url="https://github.com/liquid-utilities/${_module_name}.git"
_module_relative_path="_includes/modules/${_module_name}"

Bash Submodule Commands

cd "<your-git-project-path>"

git checkout gh-pages
mkdir -vp "_includes/modules"

git submodule add\
 -b master --name "${_module_name}"\
 "${_module_https_url}" "${_module_relative_path}"

Your ReadMe File

Suggested additions for your ReadMe.md file so everyone has a good time with submodules

Clone with the following to avoid incomplete downloads


    git clone --recurse-submodules <url-for-your-project>


Update/upgrade submodules via


    git submodule update --init --merge --recursive --remote

Utilize Twitter Timeline

_posts/2019-07-10-twitter-timeline.md

---
twitter-timeline:
  name: TwitterDev
  width: 300
  height: 300
  chrome: nofooter noscrollbar noborders transparent
  tweet_limit: 3
  inject_js: true
---

_layouts/default.html

{% comment %} Other theme stuff above... {% endcomment %}

{% include modules/twitter-timeline/twitter-timeline.html %}

{% comment %} Other theme stuff bellow... {% endcomment %}

Example HTML output

<a class="twitter-timeline"
   href="https://twitter.com/TwitterDev"
   data-width="300"
   data-height="300"
   data-chrome="nofooter noscrollbar noborders transparent"
   data-tweet-limit="3">Tweets by @TwitterDev</a>

<script>async src="https://platform.twitter.com/widgets.js"</script>

Commit and Push

git add .gitmodules
git add _includes/twitter-timeline


## Add any changed files too


git commit -F- <<'EOF'
:heavy_plus_sign: `liquid-utilities/twitter-timeline`



Embeds Twitter Timelines within GitHub Pages via FrontMatter configuration
Must include within `.html` files as `.md` files are exuberantly sanitized
EOF


git push origin gh-pages

🎉 Excellent 🎉 your site is now ready to begin unitizing code from this repository!


Notes

Including code from this repository within MarkDown will result in mangled output, because filters that content is pushed through by default. Instead include within HTML files from the _layouts directory and caution should be used when including within another _includes file. Checking if things work locally is tricky, often it is easier to push to a public fork and modify rendered source via browser debugger.


Attribution


License

Twitter Timeline ReadMe documenting how things like this could be utilized
Copyright (C) 2019  S0AndS0

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation; version 3 of the License.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>.