Render content for all your Jekyll pages as a single JSON endpoint
You have the content of your site stored as Markdown pages, but you want to load each page as structured data. Such as for building a SPA (with React or Vue) or a mobile app.
Serve your data as static JSON
How to make a read-only JSON REST API using Jekyll.
This doesn't need any Ruby plugins - you just use some built-in templating features in Jekyll 3 or 4.
You will end up with a single JSON file contains data for all pages on the site, and another JSON file of just posts. Alternatively, you can replace every HTML page and post with a JSON version.
Bitcoin Hush is actually a Komodo Asset chain, so we need to download and compile that code, which will allow us to connect to the BTCH network. We must tell it a node to connect to that knows about the BTCH asset chain.
BTCH uses RPC port 10161 and a P2P port of 10160, you might need to allow them in your firewall.
git clone https://github.com/jl777/komodo
cd komodo
# This needs to download the Zcash Proving key, around ~1GB file
./zcutil/fetch-params.sh
SHELL := /bin/bash | |
YARN := yarn | |
VENDOR_DIR = assets/vendor/ | |
JEKYLL := jekyll | |
PROJECT_DEPS := package.json | |
.PHONY: all clean install update | |
all : serve |
# config to don't allow the browser to render the page inside an frame or iframe | |
# and avoid clickjacking http://en.wikipedia.org/wiki/Clickjacking | |
# if you need to allow [i]frames, you can use SAMEORIGIN or even set an uri with ALLOW-FROM uri | |
# https://developer.mozilla.org/en-US/docs/HTTP/X-Frame-Options | |
add_header X-Frame-Options SAMEORIGIN; | |
# when serving user-supplied content, include a X-Content-Type-Options: nosniff header along with the Content-Type: header, | |
# to disable content-type sniffing on some browsers. | |
# https://www.owasp.org/index.php/List_of_useful_HTTP_headers | |
# currently suppoorted in IE > 8 http://blogs.msdn.com/b/ie/archive/2008/09/02/ie8-security-part-vi-beta-2-update.aspx |