{"id":19488665,"url":"https://github.com/ibrado/jekyll-tweetsert","last_synced_at":"2025-10-28T03:47:37.327Z","repository":{"id":56878960,"uuid":"113161510","full_name":"ibrado/jekyll-tweetsert","owner":"ibrado","description":"Jekyll Tweetsert - import Twitter statuses (tweets) as posts","archived":false,"fork":false,"pushed_at":"2018-01-28T21:34:03.000Z","size":56,"stargazers_count":9,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-19T19:45:21.874Z","etag":null,"topics":["jekyll","jekyll-plugin","twitter"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ibrado.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-12-05T09:30:39.000Z","updated_at":"2023-01-31T16:55:00.000Z","dependencies_parsed_at":"2022-08-20T11:40:39.817Z","dependency_job_id":null,"html_url":"https://github.com/ibrado/jekyll-tweetsert","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibrado%2Fjekyll-tweetsert","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibrado%2Fjekyll-tweetsert/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibrado%2Fjekyll-tweetsert/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibrado%2Fjekyll-tweetsert/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ibrado","download_url":"https://codeload.github.com/ibrado/jekyll-tweetsert/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250872393,"owners_count":21500809,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["jekyll","jekyll-plugin","twitter"],"created_at":"2024-11-10T21:04:50.685Z","updated_at":"2025-10-28T03:47:32.291Z","avatar_url":"https://github.com/ibrado.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Jekyll::Tweetsert\n\n[![Gem Version](https://badge.fury.io/rb/jekyll-tweetsert.svg)](https://badge.fury.io/rb/jekyll-tweetsert)\n\n*Tweetsert* is a plugin for Jekyll that pulls recent tweets from one or more Twitter handles, then inserts them (dated appropriately) as regular posts on your site. You can specify which tweets to include or exclude based on patterns or words, import retweets and replies, and tweak the theme and link colors of the embedded tweet.\n\nTo organize your tweet-posts, Tweetsert can automatically assign a category and/or tag. You may also choose to automatically import Twitter hashtags.\n\n## Why do this?\n\n1. You want your blog readers to also see your recent tweets when they visit;\n1. You may want to pull in tweets from friends, family, co-workers, etc. into your blog;\n1. You want to create a blog composed only of tweets from a group of people;\n1. Just for fun!\n\n## What's new?\n\n*v1.1.1* Change cache location, allow inclusion in `_config.yml`\n\n*v1.1.0* Added `prefix` and `suffix` options to `embed`\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'jekyll-tweetsert'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install jekyll-tweetsert\n\nIn compliance with the spirit of Twitter's API usage guidelines, you will need an access token. Get it here:\n\n\u003e **[tweetsert.hook.io](http://tweetsert.hook.io)**\n\nYou will be directed to Twitter's OAuth system. Once you grant permission (read-only), you will be presented with a token that you then place into your `_config.yml`. If you don't want to do that, you may use the environment variable **`JTP_ACCESS_TOKEN`** instead.\n\n    $ export JTP_ACCESS_TOKEN=\"...\"\n    $ jekyll serve\n\n## Usage\n\nThe minimum configuration to run *Tweetsert* is the following:\n\n```yaml\ntweetsert:\n  enabled: true\n  timeline:\n    handle: 'ibrado'\n    access_token: \"12345678-aBcDeFgHiJkLmNoPqRsTuVwXyZajni01234567890\"\n```\n\nHere is a sample `_config.yml` section, with comments:\n\n```yaml\ntweetsert:\n  enabled: true\n  layout: \"tweet\" # Template in _layouts to use; default \"page\"\n\n  # Show additional messages for debugging\n  #debug: true\n\n  # Prefix, number of words, and suffix of the generated titles\n  title:\n    #prefix: \"[Tweet] \"\n    words:  9\n    suffix: \" ...\"\n\n  # Some post/page properties you may want to set automatically\n  #properties:\n  #  is_tweet: true\n  #  tweet_html: $    # the embedded tweet\n  #  share: false\n  #  comments: true\n\n  # The timeline(s) you import, and which tweets you want/don't want\n  timeline:\n    # Your handle; you may also just use 'handles' below\n    handle: 'ibrado'\n\n    # Other handles you want to include\n    # If you get an 404 Not Found, you may have misspelled a handle\n    #handles:\n    #  - 'somehandle'\n    #  - 'anotherhandle'\n\n    # The token you got via tweetsert.hook.io\n    # You may also use the JTP_ACCESS_TOKEN environment variable instead\n    access_token: \"12345678-aBcDeFgHiJkLmNoPqRsTuVwXyZajni01234567890\"\n\n    # Timeline entries to retrieve. Limited by Twitter to 200; default 100\n    # Note that this includes deleted tweets, so it's not exact\n    limit: 100\n\n    # Include tweets starting with @handle; default: false\n    #replies: true\n\n    # Include retweets (RT); default false\n    #retweets: true\n\n    # If both include and exclude are configured below,\n    # only tweets pulled in by \"include\" will be further filtered by \"exclude\"\n\n    # Only include tweets that have these words/handles/hashtags/URLs\n    #  (case insensitive regex)\n    #include:\n      #- '#blog'\n      #- '(^|[^@\\w])@(\\w{1,15})\\b'  # Must mention @someone\n      #- 'important'\n      #- '@handle'\n\n    # Exclude tweets that have these words/handles/hashtags/URLs\n    #   (case insensitive regex)\n    exclude:\n      - 'https://example.org/\\d+/'  # Your own blog posts\n      - '^.@'                       # Tweets that start with .@someone\n      #- 'ignore'\n      #- '#somehash'\n      #- '@handle'\n\n    # Do not include tweets newer than your latest post; default true\n    #no_newer: false\n\n    # Do not include tweets older than your first post; default true\n    #no_older: false\n\n  embed:\n    # Set to false if you don't want the excerpt to be set; default true\n    #excerpts: false\n\n    # Set to dark if you want a dark background/light text; default: light\n    #theme: \"dark\"\n\n    # Base color of the links, default: set by Twitter\n    #link_color: \"#80FF80\"\n\n    # Include Twitter's oEmbed API script every time; default: false\n    # Set to true if you manually include it in e.g. the header\n    #omit_script: true\n\n    # Some markup to include right before and after the embedded tweet\n    # {{anything}} will be expanded to the corresponding frontmatter/properties\n    #prefix: '\u003ci\u003eThis was tweeted on {{date}}\u003c/i\u003e'\n    #suffix: '\u003ci\u003eThis is after. Click \u003ca href=\"{{url}}\"\u003ehere\u003c/a\u003e to view this tweet separately.\u003c/i\u003e'\n\n  category:\n    default: \"tweets\"                  # Automatically set to this category\n    dir: \"\"                            # Folder that contains your categories\n    #dir: \"categories\"                 # Default\n\n    layout: \"cat_index\"                # What layout to use, inside _layouts\n    #layout: \"category_index\"          # Default\n\n    #title:\n    #  prefix: \"Posts in the \u0026laquo;\"  # Prefix of the generated title\n    #  suffix: \"\u0026raquo; category\"      # Suffix of the generated title\n\n  tags:\n    #default: \"tweet\"                  # Tag all tweets automatically with this\n    dir: \"tag\"                         # Location of the generated tag indices\n    layout: \"tag_index\"                #  As above, for tags\n    #title:\n    #  prefix: \"Posts tagged \u0026ldquo;\"\n    #  suffix: \"\u0026rdquo;\"\n\n    hashtags: true                     # Import #hashtags as site tags\n\n    # Hashtags you don't want to import\n    ignore:\n      - blahblah\n\n    # Automatic tagging based on content, tag: \u003cstring or array\u003e\n    #auto:\n    #  keepkey: \"@bitcoinkeepkey\"\n    #  ethereum: \"ethereum\"\n    #  pets:\n    #    - buzzfeedanimals\n    #    - Duchess\n    #    - Princess\n    #    - Athos\n\n```\n\nHere's another one, cleaned-up:\n\n```yaml\ntweetsert:\n  enabled: true\n  layout: \"post\"\n  debug: false\n\n  title:\n    prefix: \"[Tweet] \"\n    words:  9\n    suffix: \" ...\"\n\n  properties:\n    is_tweet: true\n    tweet_html: $\n    share: false\n    comments: true\n\n  timeline:\n    handle: 'ibrado'\n\n    handles:\n      - 'somehandle'\n      - 'anotherhandle'\n\n    access_token: \"12345678-aBcDeFgHiJkLmNoPqRsTuVwXyZajni01234567890\"\n    limit: 100\n\n    replies: false\n    retweets: true\n\n    #include:\n    #  - '#blogimport'\n\n    exclude:\n      - 'https://example.org/\\d+/'\n      - '^.@'\n\n    no_newer: true\n    no_older: false\n\n  embed:\n    excerpts: true\n    theme: \"dark\"\n    link_color: \"#80FF80\"\n    omit_script: false\n    prefix: '\u003ci\u003eI tweeted this on {{date}}\u003c/i\u003e'\n    suffix: '\u003cp\u003eClick \u003ca href=\"{{url}}\"\u003ehere\u003c/a\u003e to comment.\u003c/p\u003e'\n\n  category:\n    default: \"tweets\"\n    dir: \"\"\n\n    layout: \"category_index\"\n    title:\n      prefix: \"Posts in the \u0026laquo;\"\n      suffix: \"\u0026raquo; category\"\n\n  tags:\n    default: \"tweet\"\n    dir: \"tag\"\n\n    layout: \"tag_index\"\n    title:\n      prefix: \"Posts tagged \u0026ldquo;\"\n      suffix: \"\u0026rdquo;\"\n\n    hashtags: true\n    ignore:\n      - \"blahblah\"\n\n    auto:\n      keepkey: \"@bitcoinkeepkey\"\n      cryptocurrency: [ \"bitcoin\", \"ethereum\", \"litecoin\" ]\n      ethereum:\n        - \"ethereum\"\n        - \"@ethereumproject\"\n\n\n```\n\n## Cache\n\n*Tweetsert* caches Twitter's timelines and oEmbed results in a hidden folder in your home, `.jekyll-plugins/jekyll-tweetsert`. You may delete this if you encounter problems that you think might be related to the cache.\n\n## Further configuration\n\nYou may want to edit your `home`/index layout to make the imported tweets look different from the regular ones, for instance,\n\n```html\n{% for post in site.posts %}\n  {% if post.tags contains \"tweet\" %}\n\t\u003cbr/\u003e\n  {% else %}\n    \u003c!-- normal post header --\u003e\n  {% endif %}\n{% endfor %}\n```\n\nThe embedded tweet is wrapped inside a `\u003cdiv class=\"jekyll-tweetsert\"\u003e`, with `embed.prefix` inserted before, and `embed.suffix` after. You may adjust its appearance via CSS:\n\n```css\n.jekyll-tweetsert {\n  clear: both;\n  width: auto;\n  margin-left: auto;\n  margin-right: auto;\n  max-width: max-content;\n}\n```\n\nIf you'd rather access the embedded tweet directly, use a property:\n\n```yaml\n  properties:\n    tweet: $\n```\n\nand include it in your layout as `{{ page.tweet }}` or `{{ post.tweet }}`. You may want to do this since `{{ content }}` includes the contents of `embed.prefix` and `embed.suffix` and you'd rather exclude them to further tweak the appearance via a custom layout.\n\nThis has the nice side-effect of being able to do things like:\n\n```html\n{% if page.tweet %}\n\u003cp\u003eThe following is a tweet:\u003c/p\u003e\n\u003cdiv class=\"my-tweet-class\"\u003e{{ page.tweet }}\u003c/div\u003e\n{% else %}\n  {{ content }}\n{% endif %}\n```\n\n## Demo\n\nSee the [author's blog](https://ibrado.org) for a demo.\n\n## Contributing\n\n1. Fork this project: [https://github.com/ibrado/jekyll-tweetsert/fork](https://github.com/ibrado/jekyll-tweetsert/fork)\n1. Clone it (`git clone git://github.com/your_user_name/jekyll-tweetsert.git`)\n1. `cd jekyll-tweetsert`\n1. Create a new branch (e.g. `git checkout -b my-bug-fix`)\n1. Make your changes\n1. Commit your changes (`git commit -m \"Bug fix\"`)\n1. Build it (`gem build jekyll-tweetsert.gemspec`)\n1. Install and test it (`gem install ./jekyll-tweetsert-*.gem`)\n1. Repeat from step 5 as necessary\n1. Push the branch (`git push -u origin my-bug-fix`)\n1. Create a Pull Request, making sure to select the proper branch, e.g. `my-bug-fix` (via https://github.com/*your_user_name*/jekyll-tweetsert)\n\nBug reports and pull requests are welcome on GitHub at [https://github.com/ibrado/jekyll-tweetsert](https://github.com/ibrado/jekyll-tweetsert). This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n\n## Code of Conduct\nEveryone interacting in the Jekyll::Tweetsert project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/jekyll-tweetsert/blob/master/CODE_OF_CONDUCT.md).\n\n## Also by the author\n\n[Jekyll Stickyposts Plugin](https://github.com/ibrado/jekyll-stickyposts) - Move/pin posts tagged `sticky: true` before all others. Sorting on custom fields supported, collection and paginator friendly.\n\n[Jekyll::Paginate::Content](https://github.com/ibrado/jekyll-tweetsert) - Split your Jekyll pages, posts, etc. into multiple pages automatically. Single-page view, pager, SEO support, self-adjusting links, multipage-aware Table Of Contents.\n\n[Jekyll::ViewSource](https://github.com/ibrado/jekyll-viewsource) - Generate pretty or plain HTML and/or Markdown source code pages.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fibrado%2Fjekyll-tweetsert","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fibrado%2Fjekyll-tweetsert","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fibrado%2Fjekyll-tweetsert/lists"}