Hugo
    • PDF

    Hugo

    • PDF

    Article Summary

    Available in Classic

    Hugo is the most popular open source static site creation service written in the Go language. You can quickly create static web pages and easily manage them.

    The advantages of using Hugo are as follows:

    • You can reliably use Hugo utilizing the infrastructure services of NAVER Cloud Platform.
    • The Go language runtime is provided simultaneously with the VM installation.
    Note

    For more information on the software used in NAVER Cloud Platform's Hugo, see the following websites:

    Creating and accessing server

    The method for creating and accessing the server is the same as creating a regular server on NAVER Cloud Platform. The following are detailed procedures and reference guides:

    ProcedureDescription
    1. Set ACG
    • Reference guide: ACG
    • Must set the following ports:
      • TCP 22 port for a terminal connection
      • Random number port for the use of web services
    2. Create server
    • Reference guide: Create server
    • Image type Application, Application image type Hugo
    3. Set public IP
    4. Set port forwarding
    5. Get admin password
    6. Access server
    Note

    After you access and log in to the server, change the password of the root account to one you can remember. Enter the passwd root command to set a new password.

    Using server

    When the server is created, the Hugo software is installed for easy use.
    The following describes the directory of the installed software.

    DirectoryDescription
    /usr/local/go
    /root/hugo
    • Hugo project source location (for more information, see Hugo official webpage)
    • Latest version of the master branch is installed
    /root/go
    • Directory set in GOPATH
    • The executable file of the built Hugo is located in /root/go/src
    • The dependency to build Hugo is located in /root/go/pkg/mod
    /root/demosite
    • Location of Hyde theme installed and applied as default

    Create static site with default theme

    The following describes how to create a demo site utilizing the Hyde theme installed as default.

    1. Access the server, and then enter the cd /root/demosite command.

    2. Enter the following commands and run the server.

      hugo server -D -p (service port set in ACG) --bind 0.0.0.0 --baseURL http://(public IP address) &
      
      • <example> When the service port set in ACG is 11313, and the public IP address is 123.123.123.123: hugo server -D -p 11313 --bind 0.0.0.0 --baseURL http://123.123.123.123 &
    3. Open the web browser, and enter the URL.

      http://(public IP address):(service port set in ACG)
      
      • If it is run successfully, the page with the default theme applied is displayed.
    4. To close the demo server, enter the following commands:

      pkill -9 hugo
      

    Create static site with custom theme

    Hugo provides various official themes. Check the themes you can use in Hugo official theme page.

    Note

    Because a Github repository provided by theme and how to use it are different, visit the webpage and see how to install and use it.


    Was this article helpful?

    What's Next
    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.