Giter VIP home page Giter VIP logo

Comments (4)

KhalilSecurity avatar KhalilSecurity commented on July 20, 2024

I believe this repo is a frontend to Hugo, not just a theme. You don't need to execute hugo new site with this one, instead:

  1. Clone the repo
  2. cd tailbliss
  3. sudo apt install npm
  4. sudo snap install go --classic
  5. sudo npm install
  6. sudo npm run build

To test if it's working (change to your PC IP)
sudo hugo server --bind 192.168.217.24 --baseURL http://192.168.217.24
Make your edits as you wish, and don't forget the config here is hugo.yaml not .toml (format of yaml is way better anyway)
To generate /public to upload to your website
sudo hugo --gc --minify

from tailbliss.

jesicasusanto avatar jesicasusanto commented on July 20, 2024

Thank you for your help @KhalilSecurity . it's working now

from tailbliss.

jesicasusanto avatar jesicasusanto commented on July 20, 2024

Hi @KhalilSecurity , I was trying to deploy the website on netlify but i got a failed build error :
3:22:00 PM: Failed during stage 'building site': Build script returned non-zero exit code: 2 (https://ntl.fyi/exit-code-2) 3:21:59 PM: Netlify Build 3:21:59 PM: ──────────────────────────────────────────────────────────────── 3:21:59 PM: ​ 3:21:59 PM: ❯ Version 3:21:59 PM: @netlify/build 29.17.1 3:21:59 PM: ​ 3:21:59 PM: ❯ Flags 3:21:59 PM: baseRelDir: true 3:21:59 PM: buildId: 64c04ad11193bb10981e9731 3:21:59 PM: deployId: 64c04ad11193bb10981e9733 3:21:59 PM: ​ 3:21:59 PM: ❯ Current directory 3:21:59 PM: /opt/build/repo 3:21:59 PM: ​ 3:21:59 PM: ❯ Config file 3:21:59 PM: /opt/build/repo/netlify.toml 3:21:59 PM: ​ 3:21:59 PM: ❯ Context 3:21:59 PM: production 3:21:59 PM: ​ 3:21:59 PM: build.command from netlify.toml 3:21:59 PM: ──────────────────────────────────────────────────────────────── 3:21:59 PM: ​ 3:21:59 PM: $ hugo --gc --minify 3:21:59 PM: Error: Unable to locate config file or config directory. Perhaps you need to create a new site. 3:21:59 PM: Runhugo help newfor details. 3:21:59 PM: Total in 0 ms 3:21:59 PM: ​ 3:21:59 PM: build.command failed 3:21:59 PM: ──────────────────────────────────────────────────────────────── 3:21:59 PM: ​ 3:21:59 PM: Error message 3:21:59 PM: Command failed with exit code 255: hugo --gc --minify (https://ntl.fyi/exit-code-255) 3:21:59 PM: ​ 3:21:59 PM: Error location 3:21:59 PM: In build.command from netlify.toml: 3:21:59 PM: hugo --gc --minify 3:21:59 PM: ​ 3:21:59 PM: Resolved config 3:21:59 PM: build: 3:21:59 PM: command: hugo --gc --minify 3:21:59 PM: commandOrigin: config 3:21:59 PM: environment: 3:21:59 PM: - HUGO_VERSION 3:21:59 PM: - HUGO_ENV 3:21:59 PM: - HUGO_ENABLEGITINFO 3:21:59 PM: publish: /opt/build/repo/public 3:21:59 PM: publishOrigin: config 3:21:59 PM: redirects: 3:22:00 PM: Build failed due to a user error: Build script returned non-zero exit code: 2 3:22:00 PM: Failing build: Failed to build site 3:22:01 PM: Finished processing build request in 14.718s 3:22:00 PM: Failed during stage 'building site': Build script returned non-zero exit code: 2 (https://ntl.fyi/exit-code-2) 3:21:59 PM: Netlify Build 3:21:59 PM: ──────────────────────────────────────────────────────────────── 3:21:59 PM: ​ 3:21:59 PM: ❯ Version 3:21:59 PM: @netlify/build 29.17.1 3:21:59 PM: ​ 3:21:59 PM: ❯ Flags 3:21:59 PM: baseRelDir: true 3:21:59 PM: buildId: 64c04ad11193bb10981e9731 3:21:59 PM: deployId: 64c04ad11193bb10981e9733 3:21:59 PM: ​ 3:21:59 PM: ❯ Current directory 3:21:59 PM: /opt/build/repo 3:21:59 PM: ​ 3:21:59 PM: ❯ Config file 3:21:59 PM: /opt/build/repo/netlify.toml 3:21:59 PM: ​ 3:21:59 PM: ❯ Context 3:21:59 PM: production 3:21:59 PM: ​ 3:21:59 PM: build.command from netlify.toml 3:21:59 PM: ──────────────────────────────────────────────────────────────── 3:21:59 PM: ​ 3:21:59 PM: $ hugo --gc --minify 3:21:59 PM: Error: Unable to locate config file or config directory. Perhaps you need to create a new site. 3:21:59 PM: Runhugo help new for details. 3:21:59 PM: Total in 0 ms 3:21:59 PM: ​ 3:21:59 PM: build.command failed 3:21:59 PM: ──────────────────────────────────────────────────────────────── 3:21:59 PM: ​ 3:21:59 PM: Error message 3:21:59 PM: Command failed with exit code 255: hugo --gc --minify (https://ntl.fyi/exit-code-255) 3:21:59 PM: ​ 3:21:59 PM: Error location 3:21:59 PM: In build.command from netlify.toml: 3:21:59 PM: hugo --gc --minify 3:21:59 PM: ​ 3:21:59 PM: Resolved config 3:21:59 PM: build: 3:21:59 PM: command: hugo --gc --minify 3:21:59 PM: commandOrigin: config 3:21:59 PM: environment: 3:21:59 PM: - HUGO_VERSION 3:21:59 PM: - HUGO_ENV 3:21:59 PM: - HUGO_ENABLEGITINFO 3:21:59 PM: publish: /opt/build/repo/public 3:21:59 PM: publishOrigin: config 3:21:59 PM: redirects: 3:22:00 PM: Build failed due to a user error: Build script returned non-zero exit code: 2 3:22:00 PM: Failing build: Failed to build site 3:22:01 PM: Finished processing build request in 14.718s

This is the link to my repo https://github.com/jesicasusanto/oa.blog
The error is indicating that it is unable to locate config file.

from tailbliss.

KhalilSecurity avatar KhalilSecurity commented on July 20, 2024

Looks similar to this issue #123
Also mentioned in official netlify docs
https://docs.netlify.com/integrations/frameworks/hugo/

The fix there was to update netlify.toml with the correct version of hugo you run locally. So from you local environment command line execute hugo version. It should tell you the version number

~/tailbliss$ hugo version
hugo v0.115.3-5c2e014a5150553a9fa4f9c1eb7dc4db89c0f1ab+extended linux/amd64 BuildDate=2023-07-13T16:11:34Z VendorInfo=gohugoio

so I would update netlify.toml to reflect (update in all 4 spots in the file not just one)
HUGO_VERSION = "0.115.3"

from tailbliss.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.