Skip to content

Latest commit

 

History

History
78 lines (64 loc) · 2.15 KB

README.md

File metadata and controls

78 lines (64 loc) · 2.15 KB

Devcon-Swarm-Exporter

CLI tool to build an optimized static export of devcon app frontend

Requirements

Install latest Node

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
source ~/.bashrc
nvm install --lts
node -v

Install httrack

sudo apt install httrack

Run a Bee node

Option 1 - Swarm Desktop

Option 1 - Run a Bee Light Node

Install swarm-cli

npm i -g @ethersphere/swarm-cli

Usage

Clone locally

git clone https://github.com/w3rkspacelabs/devcon-swarm-exporter.git
cd devcon-swarm-exporter
npm install
npm start

output:

Usage: devcon-static-exporter [options] [command]

CLI tool to build an optimized static export of devcon app frontend

Options:
  -V, --version   output the version number
  -h, --help      display help for command

Commands:
  clone           Clone the website devcon.org using httrack
  clone-fresh     Deletes existing folder and clones the website devcon.org using httrack
  export          Build an optimised static export
  help [command]  display help for command

Running CLI commands

npm start clone

or to delete existing clones and create a fresh clone

npm start clone-fresh

This clones the website using httrack locally to the ./output/devcon-local folder.

Run static export rewrites, fixes & optimizations

npm start export

Running this command should fetch missing resources, optimize the nextjs images and update the relevant urls to make the static export work

Publishing to Swarm and linking to an ENS Domain

Follow the steps in this blogpost to publish the ./output/devcon-local folder to Swarm and connect it to an ENS domain