Skip to content

Instantly share code, notes, and snippets.

View inetbiz's full-sized avatar
💭
Honing my JSON+LD Structured Data Skills

Denver Prophit Jr. inetbiz

💭
Honing my JSON+LD Structured Data Skills
View GitHub Profile
@inetbiz
inetbiz / site.conf
Last active March 25, 2023 18:56 — forked from paskal/site.conf
Nginx configuration for best security and modest performance. Full info on https://terrty.net/2014/ssl-tls-in-nginx/
# read more at https://terrty.net/2014/ssl-tls-in-nginx/
# latest version on https://gist.github.com/paskal/628882bee1948ef126dd/126e4d1daeb5244aacbbd847c5247c2e293f6adf
# security test score: https://www.ssllabs.com/ssltest/analyze.html?d=terrty.net
# your nginx version might not have all directives included, test this configuration before using in production against your nginx:
# $ nginx -c /etc/nginx/nginx.conf -t
server {
# public key, contains your public key and class 1 certificate, to create:
# (example for startssl)
# $ (cat example.com.pem & wget -O - https://www.startssl.com/certs/class1/sha2/pem/sub.class1.server.sha2.ca.pem) | tee -a /etc/nginx/ssl/domain.pem > /dev/null
@inetbiz
inetbiz / .eleventy.js
Last active April 4, 2022 23:03 — forked from tobystokes/.eleventy.js
eleventy-img caching
const imageShortcode = require("./image");
module.exports = function(eleventyConfig) {
eleventyConfig.addNunjucksShortcode("image", imageShortcode);
// ... + other eleventyConfig
};
@inetbiz
inetbiz / domlogs.sh
Last active January 6, 2022 19:44
Preserve cpanel domain logs to a secondary hard drive.
#!/bin/sh
# Log rotate script created by Denver Prophit Jr.
# https://www.google.com/+DenverprophitJr
# Version 0.2-beta
# Are we already runnig? Twice runs is bad thing
if [ -f /tmp/domlogs.flag ]; then echo "Already running!"; exit 2; fi
# Flag is indicating, that we running
@inetbiz
inetbiz / schema-person.html
Last active December 2, 2021 23:55
Schema.org Person markup in JSON+LD format. Includes birthdate, place of birth, photo and worksFor with remote @id
<!-- Run the code inbetween <script></script> through https://www.webtoolkitonline.com/json-minifier.html -->
<script type="application/ld+json">
{
"@context": "http://schema.org/",
"@type": "Person",
"@id": "#person",
"mainEntityOfPage": {
"@type": "ProfilePage",
"mainEntity": { "@id": "/schema-person.html#person" },
"lastReviewed": "2019-03-03T12:17:12.5249075-08:00"
@inetbiz
inetbiz / webmention-fragment.html
Created October 18, 2021 15:06
Send Webmention Form
<! -- Webbmtions https://www.w3.org/TR/webmention/ -->
<article class="box post">
<header>
<h3>Notify WebMention</h3>
</header>
<div class="responses" id="responses">
<form class="webmention-form ui form" action="https://webmention.herokuapp.com/api/webmention" method="post">
<div class="fields">
<div class="twelve wide field">
<label for="wurl">Have you written a <a href="https://indieweb.org/responses">Webmention response</a> to this? URL:</label>
@inetbiz
inetbiz / 2021-01-01-draft-template.md
Last active October 11, 2021 10:06
Article Draft YAML Template For Jekyll Schema Article
---
layout: xxxxxxx
title: ""
crumbtitle: ""
categories: xxxx-xxxx
tags: xxx xxx
wikidata: ###
genre: "https://en.wikipedia.org/wiki/xxxxxxxx"
isbasedon: ["URL, "URL"]
@inetbiz
inetbiz / mainentity.md
Last active October 11, 2021 09:58
Webpage Type mainentityofPage code common to all types
"mainEntityofPage": {
    "@type": "{{page.mainentity}}",
{% if page.wikidatas %}
    "mentions": [
{% for item in page.wikidatas %}
      {
        "@type": "Thing",
        "name": "{{ item.name }}",
        "@id": "{{ item.url }}"
@inetbiz
inetbiz / articleJSON.html
Last active October 11, 2021 09:53
Article JSON-LD aggregated in Jekyll Front Matter, data files, YAML, etc.
{
"@context": "https://schema.org",
"@type": "Article",
"@id": "#article",
"url": "{{ site.url }}{{ page.url }}",
"name": "{{ page.title }}",
"headline": "{{ page.title }}",
"genre": "{{ page.genre }}",
"keywords": {{ page.tags |replace: "-", " " | join: ", | capitalize_all | jsonify }},
"description": "{{ page.excerpt | strip_newlines | strip | strip_html }}",
@inetbiz
inetbiz / publisher.md
Last active October 7, 2021 00:42
The Publisher Entity in Jekyll Article Schema
"publisher": {
    "@type": "ProfessionalService",
    "@id": "{{site.url}}/about.html",
    "name": "{{ site.title}}",
    "logo": {
      "@type": "ImageObject",
      "representativeOfPage": "False",
      "width": {
 "@type": "QuantitativeValue",
@inetbiz
inetbiz / wpshortcode.php
Created October 4, 2021 16:50
WordPress Shortcode to JSON-LD relatedLink from current category
// Add Shortcode
function jsonlink( $atts ) {
// Attributes
$atts = shortcode_atts(
array(
'numberposts' => '',
),
$atts,
'relatedLink'