
No more than code.
Pagic is a static site generator powered by Deno + React.
# Shell (Mac, Linux):
curl -fsSL https://deno.land/x/install/install.sh | sh
查看安装版本:deno --version
,若报错 deno 命令不存在,则需配置环境变量:
Manually add the directory to your $HOME/.bash_profile (or similar) export DENO_INSTALL=”/Users/yixin/.deno” export PATH=”$DENO_INSTALL/bin:$PATH”
echo $PATH
sudo vi ~/.bash_profile
i
esc
键盘按钮,表示退出编辑,输入:wq!
esc
键盘按钮,表示退出编辑,输入:q!
source ~/.bash_profile
// install the latest version of Pagic
deno install --unstable --allow-read --allow-write --allow-net --allow-run --name=pagic https://deno.land/x/pagic/mod.ts
mkdir site && cd site && echo "export default {};" > pagic.config.ts && echo "# Hello world" > README.md
# Build a static website
pagic build --watch --serve
# --watch Watch file changes to rebuild
# --serve Start local service, preview static website
# --port Specify the port of the local service
open http://127.0.0.1:8000/ with a browser