Hugo开发之——博客搭建

一 概述

Hugo是由Go语言实现的静态网站生成器。简单、易用、高效、易扩展、快速部署。对比Hexo,Hugo仅需一个二进制文件(hugo.exe)即可实现网站生成的生成。而且就如它官网介绍:The world’s fastest framework for building websites。Hugo是目前最快的网站构建框架

二 开发环境配置

三 搭建过程

  • 创建站点

    1
    
    hugo new site quickstart
    

  • 添加主题

    1
    2
    3
    
    cd quickstart
    git init
    git submodule add https://github.com/budparr/gohugo-theme-ananke.git themes/ananke
    

  • 添加主题配置

    1
    2
    3
    4
    
    baseURL = "http://example.org/"
    languageCode = "en-us"
    title = "My New Hugo Site"
    theme = "ananke"
    

  • 创建博客内容

    1
    
    hugo new posts/my-first-post.md
    

  • 开启hugo 服务

    1
    
    hugo server -D
    

  • 在网页中输入http://localhost:1313/查看效果

猜你喜欢

转载自blog.csdn.net/Calvin_zhou/article/details/108222723