Skip to content

Instantly share code, notes, and snippets.

View pablojimeno's full-sized avatar
🔬
learning

Pablo Jimeno pablojimeno

🔬
learning
View GitHub Profile
@pablojimeno
pablojimeno / example_jekyll.md
Last active March 16, 2023 12:43 — forked from patrickfav/example_jekyll.md
A Liquid Filter for obfuscating an Email Address (can be used with Jekyll aswell)

In Jekyll set a variable for the mail, e.g. in the _config.yml

email: name@mail.com

then use it in your page

Reach me under:	{{ site.email | mailObfuscate }}

which will generate the following HTML

@pablojimeno
pablojimeno / alpine-api-data-in-table.html
Created March 15, 2023 18:33 — forked from w3collective/alpine-api-data-in-table.html
Displaying API data in a HTML table with Alpine.js
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Alpine.js: Displaying API data in a HTML table</title>
<style>
[x-cloak] {
display: none !important;
}

Alpine.js fetch data on x-init

Fetch Gist API, parse the Gist description for titles and tags (via Lepton Snippet Manager) and save it to sessionStorage to not hit the API too often.

A Pen by vsamaru on CodePen.

License.