Pages

Sunday, 10 November 2024

在linux vps上,搭建基于python的静态相册网站程序sigal


pip3 install sigal
cd /usr/local
mkdir sigal-site
cd sigal-site
sigal init (会在sigal-site目录,生成一个配置文件sigal.conf.py)
mkdir pictures (因为上面的sigal.conf.py里,指定了source的值为pictures,所以这里就新建pictures目录。如果你修改了sigal.conf.py里的source的值为,比如pics,那么就相应的新建pics目录)
cd pictures (然后,放一些图片到pictures目录)
cd ..
 sigal build pictures
root@racknerd-626f077:/usr/local/sigal-site# ls
_build  pictures  sigal.conf.py
(生成了_build目录)
root@racknerd-626f077:/usr/local/sigal-site# cd _build
root@racknerd-626f077:/usr/local/sigal-site/_build# ls
index.html  pic2.jpg  pic4.jpg  pic6.jpg  thumbnails
pic1.jpg    pic3.jpg  pic5.jpg  static
root@racknerd-626f077:/usr/local/sigal-site/_build#

演示网站地址:http://sg.briten.top/
官网:https://sigal.readthedocs.io/en/latest/getting_started.html

https://sigal.saimon.org/en/latest/

项目地址:https://github.com/saimn/sigal




 

No comments:

Post a Comment