Skip to content

Instantly share code, notes, and snippets.

View willtm's full-sized avatar

Will willtm

View GitHub Profile
@chrisaldrich
chrisaldrich / Hypothesidian.js
Last active May 16, 2023 17:54 — forked from TfTHacker/Hypothesidian.js
Hypothes.is - retrieve your annotations into Obsidian (for templater plugin)
<%*
/*
# Hypothes.idian a templater script for retrieving annotations from Hypothes.is
Dev: RoamHacker https://twitter.com/roamhacker
# Prerequisites:
+ Templater plugin by https://github.com/SilentVoid13/Templater
+ Free Hypothes.is developer token from: https://hypothes.is/account/developer
+ This script will prompt you for his token and save it to a file called "hypothesis config.md"
+ This file store your configuration and can be located any where in your vault.
@chrisaldrich
chrisaldrich / kind-annotation.php
Created September 11, 2020 00:47
My annotation template to be put into a sub-folder called `kind_views` in one's theme/child theme
<?php
/*
* Annotation Template
*
*/
$mf2_post = new MF2_Post( get_the_ID() );
$cite = $mf2_post->fetch();
if ( ! $cite ) {
return;
@judell
judell / hypothesis shortcode
Created July 6, 2018 17:17
wordpress shortcode implementation for embedding hypothesis annotations
add_action( "wp_enqueue_scripts", "hypothesis_annotation_enqueue_scripts_styles" );
function hypothesis_annotation_enqueue_scripts_styles() {
wp_enqueue_style("hlib.css", "https://jonudell.info/hlib/hlib.css");
wp_enqueue_script("hlib.bundle.js", "https://jonudell.info/hlib/hlib.bundle.js");
wp_enqueue_script("showdown.js", "https://jonudell.info/hlib/showdown.js");
}
function hypothesis_annotation($args) {
$id = $args["id"];