Pages

Saturday, 9 November 2024

搭建基于rust的静态相册网站程序:photography-blog

 git clone https://github.com/hangbale/photography-blog photography-blog-by-hangbale

cd  photography-blog-by-hangbale

cargo build --release (此命令会在子目录target/release/下,生成可执行文件blog-cli.exe)

nano config.json

cat config.json

显示:

{
  "title": "brite的在线相册",
  "description": "description",
  "author": "brite",
  "children": [
    {
        "title": "pic1 of yz",
        "url": "pic1的链接地址"
    },
    {
        "title": "pic2 of yz",
        "url": "pic2的链接地址"
    },
    {
        "title": "pic3 of yz",
        "url": "pic3的链接地址"
    },
    {
        "title": "pic4 of yz",
        "url": "pic4的链接地址"
    },
    {
        "title": "pic5 of yz",
        "url": "pic5的链接地址"
    },
    {
        "title": "pic6 of yz",
        "url": "pic6的链接地址"
    }
  ]

然后运行:

 target/release/blog-cli.exe (此命令就是生成/更新静态网站的根目录的命令,会在当前目录下,生成public目录)

演示网站:https://preeminent-nasturtium-12f7e1.netlify.app/

项目地址: https://github.com/hangbale/photography-blog


No comments:

Post a Comment