Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rtfmkiesel/hugo-fedimojis
A Hugo module to add Mastodon emojis as shortcodes
https://github.com/rtfmkiesel/hugo-fedimojis
emoji fediverse hugo hugo-module mastodon
Last synced: 5 days ago
JSON representation
A Hugo module to add Mastodon emojis as shortcodes
- Host: GitHub
- URL: https://github.com/rtfmkiesel/hugo-fedimojis
- Owner: rtfmkiesel
- License: apache-2.0
- Created: 2024-04-29T21:55:25.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-04-29T21:59:10.000Z (8 months ago)
- Last Synced: 2024-10-31T05:05:00.586Z (about 2 months ago)
- Topics: emoji, fediverse, hugo, hugo-module, mastodon
- Language: HTML
- Homepage:
- Size: 36.4 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# hugo-fedimojis
A [Hugo](https://gohugo.io/) module to add Mastodon emojis as shortcodes. This repo uses the [custom emojis](https://emojos.in/infosec.exchange?show_animated=true) of [infosec.exchange](https://infosec.exchange/), the instance where I have my account.*This was hacked together in like 2,5 hours, please have mercy*
## Usage
### Setup
Inside your hugo config add the following snippet and then run `hugo mod get`.```yaml
module:
imports:
- path: "github.com/rtfmkiesel/hugo-fedimojis"
```### Inserting Emojis
Inside your content, reference the emojis with a shortcode like the following:
```md
{{< fm-ablobcatrave >}}
```### Styling
I can recommend the following CSS to make them fit nicely inside a sentence:
```css
.fedimoji {
display: inline;
max-width: 1rem;
max-height: 1rem;
margin: 0;
padding: 0;
border: none;
}
```### Local
You can use this module locally with emojis from your preferred Mastodon instance.
```sh
git clone https://github.com/rtfmkiesel/hugo-fedimojis
cd hugo-fedimojis# Clear out the current ones
rm -rf images/*
rm -rf layouts/shortcodes/*.html# Build the Hugo shortcodes
python3 build.py -u
```Then add the module with:
`hugo/config.yaml`
```yaml
module:
imports:
- path: "github.com/rtfmkiesel/hugo-fedimojis"
````hugo/go.mod` (Create if not already present)
```
module github.com//replace github.com/rtfmkiesel/hugo-fedimojis =>
go 1.XXX
require github.com/rtfmkiesel/hugo-fedimojis xxxxxx
```