Package: lektor-deploy-ipfs
lektor-deploy-ipfsDeploy your static Lektor site to IPFS!Implemented features:Add Lektor deployment directory to IPFS node using thepy-ipfs-api-clientlibraryAdd the added IPFS directory to an IPFS-Cluster pinset, updating the pin if it already exists (optional)Reference the added IPFS directory using an IPNS keyReference the added IPFS directory using DNSLink using theLexiconlibraryKnown issues:The used py-ipfs-api-client library hasn’t been updated and raises a version incompatibility error with latest KuboThis can be worked around by editing the source code near the exception and setting a higher maximum version.Yes, this is technically my responsibility to fix…ConfigurationAll relevant configuration is done by adding a newserverssection with a
target URI ofipfs://,ipfs+dnslink://oripns://into your project’s.lektorprojectfile. The basic structure ofserverssections is describedin the Lektor documentation,
however several additional keys are supported:target: Target URI to publish the Lektor-generated website to; may be one
of the following:ipfs://: Add Lektor deployment to IPFS node (and optionally also
IPFS-Cluster), but do not reference it anywhereipfs+dnslink://<domainname>: In addition, reference the added files in
a_dnslink.<domainname>DNS TXT record to have them be served by IPFS
gateways at/ipns/<domainname>or when handling direct requests tohttps://<domainname>ipns://<ipnskey>: Instead, reference the added files using the given
IPNS key (either a key-name or an IPNS hash) to have them be served by
IPFS gateways at/ipns/<ipnskeyhash>(this can be combined with a
static DNSLink record to also handle direct requests on any configured
domain)upload-type: Must be eitheripfsoripfs-clusterto add the Lektor
deployment files only to the IPFS node or to both the IPFS node and the
IPFS-Cluster daemon, respectively.ipfs-api-addr,ipfs-api-base,ipfs-api-username,ipfs-api-password:
The MultiAddr, HTTP basename, HTTP username and HTTP password to use when
connecting to the IPFS node; defaults to the defaults used by the
py-ipfs-api-client library (/dns/localhost/tcp/5001/httpand/api/v0with no username or password).cluster-endpoint: The HTTP base URL to use when communicating with the
IPFS-Cluster daemon; defaults tohttp://localhost:9094/.cluster-pin-name: The Cluster pin-name to set/update when adding the
Lektor deployment files to the IPFS-Cluster daemon; required ifupload-typeisipfs-cluster, otherwise ignored.dns-provider-name: Name of the DNS provider management solution that
Lexicon should expect when attempting to update the DNSLink record –
see theLexicon documentationfor a list of accepted values (note that a lot of off-the-shelf DNS
resellers will work using eitherddns,directadmin,infoblox,onapporpleskwhen specifying the correct*_server/endpointURL, even when
they are not explicitely mentioned in the Lexicon documentation); ignored
unless anipfs+dnslink://target URI is used.dns-*: Arbitrary key-value pairs to pass to the Lexicon library when
attempting to update the DNSLink record (all-are replaced with_for
consistency with other Lektor options) – see theLexicon documentation;
ignored unless anipfs+dnslink://target URI is used.Minimal ExampleOnly add the Lektor deployment files to IPFS with no further processing:[servers.ipfs]name=Add to IPFStarget=ipfs://Full DNSLink+IPFS-Cluster ExampleAdds Lektor deployment files to IPFS and an IPFS-Cluster and referencs them
using DNSLink at domainexample.orgwhose DNS is persumably managed by the
Plesk instance of Magenta Business AT – this is similar to the configuration
used in production by the author.[servers.public]name=Publicenabled=yesdefault=yestarget=ipfs+dnslink://example.orgupload-type=ipfs-clustercluster-pin-name=erin_website_tutoringdns-provider-name=pleskdns-plesk-server=https://panelhost02.webhosting.magentabusiness.at/dns-auth-username=the-username-used-when-logging-indns-auth-password=the-password-used-when-logging-indns-ttl=60# Not actually implemented by the Lexicon Plesk provider