Skip to main content

A Pelican plugin that wrapps references to twitter et al. Forked from pelican-advance-embed-tweet

Project description

Embedding tweets into your Pelican blog posts. This repo is an advance version of the plugin from lqez which hasn’t the config for the style.

Author | Chris Rose

Homepage

https://offby1.website

Github

https://github.com/offbyone

Mastodon

https://wandering.shop/@offby1

How to enable it

  1. Install the plugin with pip install pelican-embed-microblog

  2. Put pelican_embed_microblog into plugin list of settings.

    • PLUGINS = ['pelican_embed_microblog']

  3. Add your config into the pelicanconf.py

Config

The config implement the Twitter Api.

Config Label

Description

TWITTER_CARDS

When set to hidden, links in a Tweet are not expanded to photo, video, or link previews.

TWITTER_THEME

When set to none, only the cited Tweet will be displayed even if it is in reply to another Tweet.

TWITTER_CONVERS ATION

When set to dark, displays Tweet with light text over a dark background.

TWITTER_LINK_C OLOR

Adjust the color of Tweet links with a hexadecimal color value.

TWITTER_WIDTH

The maximum width of the rendered Tweet in whole pixels. This value should be between 250 and 550 pixels.

TWITTER_ALIGN

Float the Tweet left, right, or center relative to its container. Typically set to allow text or other content to wrap around the Tweet.

TWITTER_LANG

A supported Twitter language code. Loads text components in the specified language. Note: does not affect the text of the cited Tweet.

TWITTER_DNT

When set to true, the Tweet and its embedded page on your site are not used for purposes that include personalized suggestions and personalized ads.

Usage

When writing a post, you can use any of the following notations to link to microblogging content:

Usernames

Both Mastodon and Twitter usernames are supported. Any instance of “@username@host.name” will be replaced with a link to the appropriate instances’ user account page, and any instance of “@username” will be replaced with a link to the twitter account page for the user.

Twitter statuses

To link a Twitter status, you write “@username/status/<numeric-tweet-id>”; essentially, you take the Twitter link itself and you replace “https://twitter.com/” with “@”

Acknowledgments

Thanks to lqez for the original, and to fundor333 who forked the original embed tweet plugin, on which this is based.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pelican_embed_microblog-1.1.0.tar.gz (14.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pelican_embed_microblog-1.1.0-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file pelican_embed_microblog-1.1.0.tar.gz.

File metadata

  • Download URL: pelican_embed_microblog-1.1.0.tar.gz
  • Upload date:
  • Size: 14.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.16

File hashes

Hashes for pelican_embed_microblog-1.1.0.tar.gz
Algorithm Hash digest
SHA256 d9f79f288af4b37916c26da2d099d3056e956e0967166cd0922700d1a986e491
MD5 9412d7d8620d2c94bae250f3e82ccb8e
BLAKE2b-256 ee190d99578da8ed5898b918a55edb334e6fdee6101184d6e98e13c0912b1933

See more details on using hashes here.

File details

Details for the file pelican_embed_microblog-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pelican_embed_microblog-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1562d80c964759af9e5cd29d5ec569a981602565f6ae12780ccce26f418fa18c
MD5 5dac17513095bff421e7f93c57531bc5
BLAKE2b-256 83a568a178b9eb61bf136dd22a4517168d310a3a9facae065d6c659fd6cefa94

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page