Manage Social Network with Bissetii in Hugo
Apart from SEO, Bissetii strives to be compatible with most major social networks. This is where Bissetii shines from other Hugo themes where Bissetii supplies a full interface to handle the sharing system easily and seamlessly.
Page Thumbnail Images
Bissetii uses the OpenGraph’s <meta property="oe:image">
and
Twitter Card
sharing tags to define each of the thumbnail image.
Image Requirements
Different network has different requirements for rendering the images. They can be found as follows:
Network | URL |
---|---|
https://developers.facebook.com/docs/sharing/webmasters/images/ | |
https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/summary-card-with-large-image | |
https://www.linkedin.com/help/linkedin/answer/46687/making-your-website-shareable-on-linkedin?lang=en | |
Not found. Only tested last image being used (1:1 aspect ratio) | |
Signal Messenger | Not found. |
Telegram Messenger | Not found. |
Line Messenger | https://developers.line.biz/en/faq/tags/media/#how-are-the-url-previews-generated |
WeChat Messenger | Not found. |
TicTok | Not found. |
To accomandate as many networks as possible, Bissetii compiled the following image requirements to work in an optimized manner:
First Thumbnail
The first thumbnail should be:
1200x630
or1.91:1
aspect ratio.- Max
5MB
in download size (LinkedIn lowest). - Primarily for Facebook, LinkedIn, and Twitter.
JPG
orPNG
format.
Second Thumbnail
The follow up thumbnail should be:
1200x1200
or1:1
aspect ratio.- Max
8MB
in download size. - Primarily for high definition square thumbnails usage.
JPG
orPNG
format.
Last Thumbnail
The last thumbnail should be:
400x400
or1:1
aspect ratio.- Max
2MB
in download size. - Primarily for Whatsapp, and possibly other mobile messengers.
JPG
orPNG
format.
Storage
The image storage location does not matter as long as its source URL is publicly reachable and is able to handle large surge of requests.
For internal hosting storage placement:
- Bissetii recommends storing them next to the content file (
_index.md
) in the same directory for organziational state. - Otherwise, storing and hosting inside
static/
directory is also working properly.
Configure Thumbnail
Bissetii supplies thumbnail images via the page’s Hugo’s front matter with
[thumbnails]
table. A page can has as many thumbnail images as long as it
complies with all the major supporting social network.
Once the image is available, you can proceed to configure the settings for the page’s thumbnail images. An example configurations (3 thumbnail images in total) would be as follows:
|
|
[thumbnails.N]
- COMPULSORY- Denotes the following fields belong to
thumbnails.N
. RecommendedN
would be ascending number so that the list ofthumbnails
are sorted out in your order.
- Denotes the following fields belong to
url
- COMPULSORY- The image source URL.
width
- COMPULSORY- The width dimension of the image.
height
- COMPULSORY- The height dimension of the image.
alternateText
- COMPULSORY- The alternate text of the image describing the image content.
Configure Globally
To configure the thumbnail images globally, set those images' settings into
the following data file inside data/
directory with the following pathing:
pattern : data/bissetii/thumbnails.toml
repo-docs: docs/.data/bissetii/thumbnails.toml
Configure Page-Specific
To configure page-specific thumbnail images, set those images' settings into the page’s Hugo front-matter.
Validators
Some social network facilitates unit-testing validators. Feel free to test them out while designing for the page thumbnails:
Network | URL |
---|---|
https://developers.facebook.com/tools/debug | |
https://cards-dev.twitter.com/validator |
Twitter Card Specific Configurations
Twitter has its own specific configurations. Bissetii configured it to use large image card by default. To change these Twitter specific settings, edit the following file:
pattern : data/bissetii/vendors/Twitter.toml
repo-docs: docs/.data/bissetii/vendors/Twitter.toml
Specifically, edit any of the following configurations as per Twitter Documentation:
|
|
Wrapping Up
That is all for managing social network with Bissetii in Hugo. If you have any question to ask us directly, please feel free to raise it at our GitLab Issues Section. We will be happy to assist you.