OOIII/

短暂Hugo体验

忍受不了wp的臃肿,早些时候从wp换成了ghost,ghost真是简洁,这里的简洁单纯理解为后台的简单吧,至于背后的nodejs没有研究过。还专门记录了下如何在docker中构建ghost,仓库在此(目前已使用宝塔反代ghost了,香):

bolabola/docker-ghost-nginx-ssl
docker-ghost-nginx-ssl. Contribute to bolabola/docker-ghost-nginx-ssl development by creating an account on GitHub.

这几天突然看到一个hugo主题hello-friend-ng

rhazdon/hugo-theme-hello-friend-ng
Pretty basic theme for Hugo that covers all of the essentials. All you have to do is start typing! - rhazdon/hugo-theme-hello-friend-ng

心动,折腾转到hugo。从ghost导出数据可以在hugo官方找到教程,我又折腾了下docker-hugo-isso。docker-compose.yml 如下:

version: '3'services: hugo:   image: jojomi/hugo:latest   volumes:     - ./src:/src     - ./output:/output   environment:     - HUGO_REFRESH_TIME=3600     #此处不能与config.toml 重复设置     - HUGO_THEME=hello-friend-ng     - HUGO_BASEURL=https://ooiii.com   restart: always web:   image: jojomi/nginx-static   volumes:     - ./output:/var/www   environment:   #for nginx-proxy     - VIRTUAL_HOST=ooiii.com   ports:    - 80   restart: always proxy:   image: jwilder/nginx-proxy   ports:     - 80:80     - 443:443   volumes:   #提前创建并放置证书     - ./nginx/certs:/etc/nginx/certs:ro   #这两处非必须映射   #vhost.d 为了方便观察nginx的配置   #conf.d 添加自定义配置     - ./nginx/vhost.d:/etc/nginx/vhost.d     - ./nginx/conf.d:/etc/nginx/conf.d     - /var/run/docker.sock:/tmp/docker.sock:ro   restart: always isso:    image: bolabola/isso:latest    restart: always    volumes:    #提前创建目录并放置配置文件      - ./isso/config:/config      - ./isso/db:/db    environment:    #for nginx-proxy      - VIRTUAL_PORT=8080      - VIRTUAL_HOST=c.ooiii.com

目录结构如下:

├── docker-compose.yml├── isso│   ├── config //提前创建│   │   └── isso.conf│   └── db│       └── comment.db├── nginx│   ├── certs //提起创建│   │   ├── example.com.crt│   │   └── example.com.key│   ├── conf.d│   │   └── default.conf│   └── vhost.d│       └── example.com├── output //提起创建└── src    ├── archetypes    │   └── default.md    ├── config.toml    ├── content    ├── data    ├── layouts    ├── resources    ├── static    └── themes        └── hello-friend-ng

src是hugo目录,output为hugo静态文件输出目录,部分目录需提前创建。

但是,因为hugo没有后台,没有数据库,无法随时随地打开网页写文章,2天后,放弃hugo,重回ghost怀抱。

留下一条评论

暂无评论