lektor-deploy-ipfs


Namelektor-deploy-ipfs JSON
Version 1.0.0 PyPI version JSON
download
home_page
SummaryDeploy your static Lektor website to IPFS!
upload_time2023-12-24 00:56:40
maintainer
docs_urlNone
author
requires_python>=3.8
licenseLGPLv3
keywords lektor plugin
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # lektor-deploy-ipfs

Deploy your static Lektor site to IPFS!

Implemented features:

 * Add Lektor deployment directory to IPFS node using the [py-ipfs-api-client](https://github.com/ipfs-shipyard/py-ipfs-http-client/) library
 * Add 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 key
 * Reference the added IPFS directory using DNSLink using the [Lexicon](https://dns-lexicon.readthedocs.io/) library

Known issues:

 * The used py-ipfs-api-client library hasn’t been updated and raises a version incompatibility error with latest Kubo
    * This 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…

## Configuration

All relevant configuration is done by adding a new `servers` section with a
target URI of `ipfs://`, `ipfs+dnslink://` or `ipns://` into your project’s
*.lektorproject* file. The basic structure of `servers` sections is described
[in the Lektor documentation](https://www.getlektor.com/docs/deployment/#lektor-assisted-deployments),
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 anywhere
    * `ipfs+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 to
      `https://<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 either `ipfs` or `ipfs-cluster` to 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/http` and `/api/v0`
   with no username or password).
 * `cluster-endpoint`: The HTTP base URL to use when communicating with the
   IPFS-Cluster daemon; defaults to `http://localhost:9094/`.
 * `cluster-pin-name`: The Cluster pin-name to set/update when adding the
   Lektor deployment files to the IPFS-Cluster daemon; required if
   *upload-type* is *ipfs-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 the [Lexicon documentation](https://dns-lexicon.readthedocs.io/en/latest/configuration_reference.html#providers-available)
   for a list of accepted values (note that a lot of off-the-shelf DNS
   resellers will work using either `ddns`, `directadmin`, `infoblox`, `onapp`
   or `plesk` when specifying the correct `*_server/endpoint` URL, even when
   they are not explicitely mentioned in the Lexicon documentation); ignored
   unless an `ipfs+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 the [Lexicon documentation](https://dns-lexicon.readthedocs.io/en/latest/configuration_reference.html#list-of-options);
   ignored unless an `ipfs+dnslink://` target URI is used.

### Minimal Example

Only add the Lektor deployment files to IPFS with no further processing:

```ini
[servers.ipfs]
name = Add to IPFS
target = ipfs://
```

### Full DNSLink+IPFS-Cluster Example

Adds Lektor deployment files to IPFS and an IPFS-Cluster and referencs them
using DNSLink at domain `example.org` whose DNS is persumably managed by the
Plesk instance of Magenta Business AT – this is similar to the configuration
used in production by the author.

```ini
[servers.public]
name = Public
enabled = yes
default = yes
target = ipfs+dnslink://example.org

upload-type = ipfs-cluster
cluster-pin-name = erin_website_tutoring

dns-provider-name = plesk
dns-plesk-server  = https://panelhost02.webhosting.magentabusiness.at/
dns-auth-username = the-username-used-when-logging-in
dns-auth-password = the-password-used-when-logging-in
dns-ttl           = 60  # Not actually implemented by the Lexicon Plesk provider
```

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "lektor-deploy-ipfs",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "Lektor plugin",
    "author": "",
    "author_email": "Erin\u2004Yuki\u2009Schlarb <erin-dev@ninetailed.ninja>",
    "download_url": "",
    "platform": null,
    "description": "# lektor-deploy-ipfs\n\nDeploy your static Lektor site to IPFS!\n\nImplemented features:\n\n * Add Lektor deployment directory to IPFS node using the [py-ipfs-api-client](https://github.com/ipfs-shipyard/py-ipfs-http-client/) library\n * Add the added IPFS directory to an IPFS-Cluster pinset, updating the pin if it already exists (optional)\n * Reference the added IPFS directory using an IPNS key\n * Reference the added IPFS directory using DNSLink using the [Lexicon](https://dns-lexicon.readthedocs.io/) library\n\nKnown issues:\n\n * The used py-ipfs-api-client library hasn\u2019t been updated and raises a version incompatibility error with latest Kubo\n    * This can be worked around by editing the source code near the exception and setting a higher maximum version.\n    * Yes, this is technically my responsibility to fix\u2026\n\n## Configuration\n\nAll relevant configuration is done by adding a new `servers` section with a\ntarget URI of `ipfs://`, `ipfs+dnslink://` or `ipns://` into your project\u2019s\n*.lektorproject* file. The basic structure of `servers` sections is described\n[in the Lektor documentation](https://www.getlektor.com/docs/deployment/#lektor-assisted-deployments),\nhowever several additional keys are supported:\n\n * `target`: Target URI to publish the Lektor-generated website to; may be one\n   of the following:\n    * `ipfs://`: Add Lektor deployment to IPFS node (and optionally also\n      IPFS-Cluster), but do not reference it anywhere\n    * `ipfs+dnslink://<domainname>`: In addition, reference the added files in\n      a `_dnslink.<domainname>` DNS TXT record to have them be served by IPFS\n      gateways at `/ipns/<domainname>` or when handling direct requests to\n      `https://<domainname>`\n    * `ipns://<ipnskey>`: Instead, reference the added files using the given\n      IPNS key (either a key-name or an IPNS hash) to have them be served by\n      IPFS gateways at `/ipns/<ipnskeyhash>` (this can be combined with a\n      static DNSLink record to also handle direct requests on any configured\n      domain)\n * `upload-type`: Must be either `ipfs` or `ipfs-cluster` to add the Lektor\n   deployment files only to the IPFS node or to both the IPFS node and the\n   IPFS-Cluster daemon, respectively.\n * `ipfs-api-addr`, `ipfs-api-base`, `ipfs-api-username`, `ipfs-api-password`:\n   The MultiAddr, HTTP basename, HTTP username and HTTP password to use when\n   connecting to the IPFS node; defaults to the defaults used by the\n   py-ipfs-api-client library (`/dns/localhost/tcp/5001/http` and `/api/v0`\n   with no username or password).\n * `cluster-endpoint`: The HTTP base URL to use when communicating with the\n   IPFS-Cluster daemon; defaults to `http://localhost:9094/`.\n * `cluster-pin-name`: The Cluster pin-name to set/update when adding the\n   Lektor deployment files to the IPFS-Cluster daemon; required if\n   *upload-type* is *ipfs-cluster*, otherwise ignored.\n * `dns-provider-name`: Name of the DNS provider management solution that\n   Lexicon should expect when attempting to update the DNSLink record \u2013\n   see the [Lexicon documentation](https://dns-lexicon.readthedocs.io/en/latest/configuration_reference.html#providers-available)\n   for a list of accepted values (note that a lot of off-the-shelf DNS\n   resellers will work using either `ddns`, `directadmin`, `infoblox`, `onapp`\n   or `plesk` when specifying the correct `*_server/endpoint` URL, even when\n   they are not explicitely mentioned in the Lexicon documentation); ignored\n   unless an `ipfs+dnslink://` target URI is used.\n * `dns-*`: Arbitrary key-value pairs to pass to the Lexicon library when\n   attempting to update the DNSLink record (all `-` are replaced with `_` for\n   consistency with other Lektor options) \u2013 see the [Lexicon documentation](https://dns-lexicon.readthedocs.io/en/latest/configuration_reference.html#list-of-options);\n   ignored unless an `ipfs+dnslink://` target URI is used.\n\n### Minimal Example\n\nOnly add the Lektor deployment files to IPFS with no further processing:\n\n```ini\n[servers.ipfs]\nname = Add to IPFS\ntarget = ipfs://\n```\n\n### Full DNSLink+IPFS-Cluster Example\n\nAdds Lektor deployment files to IPFS and an IPFS-Cluster and referencs them\nusing DNSLink at domain `example.org` whose DNS is persumably managed by the\nPlesk instance of Magenta Business AT \u2013 this is similar to the configuration\nused in production by the author.\n\n```ini\n[servers.public]\nname = Public\nenabled = yes\ndefault = yes\ntarget = ipfs+dnslink://example.org\n\nupload-type = ipfs-cluster\ncluster-pin-name = erin_website_tutoring\n\ndns-provider-name = plesk\ndns-plesk-server  = https://panelhost02.webhosting.magentabusiness.at/\ndns-auth-username = the-username-used-when-logging-in\ndns-auth-password = the-password-used-when-logging-in\ndns-ttl           = 60  # Not actually implemented by the Lexicon Plesk provider\n```\n",
    "bugtrack_url": null,
    "license": "LGPLv3",
    "summary": "Deploy your static Lektor website to IPFS!",
    "version": "1.0.0",
    "project_urls": null,
    "split_keywords": [
        "lektor",
        "plugin"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f5f03f5b8264faa0a641b71e412f39cca98d5580e7303951ae97b055a2bef9a6",
                "md5": "71969e49be73a75a3d4a102668e53a5d",
                "sha256": "0b114ce5cbcd9f530042e5804f01f46db5d1d35d7e301285269f31bfb7eb671c"
            },
            "downloads": -1,
            "filename": "lektor_deploy_ipfs-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "71969e49be73a75a3d4a102668e53a5d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 6208,
            "upload_time": "2023-12-24T00:56:40",
            "upload_time_iso_8601": "2023-12-24T00:56:40.260166Z",
            "url": "https://files.pythonhosted.org/packages/f5/f0/3f5b8264faa0a641b71e412f39cca98d5580e7303951ae97b055a2bef9a6/lektor_deploy_ipfs-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-24 00:56:40",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "lektor-deploy-ipfs"
}
        
Elapsed time: 0.15510s