alex-shpak / hugo-book

Hugo documentation theme as simple as plain book
https://hugo-book-demo.netlify.app
MIT License
3.46k stars 1.18k forks source link

Failed to create website #413

Closed shikingram closed 2 years ago

shikingram commented 2 years ago

I try to create a website but it fails

Here are the steps to create a website based on the documentation:

root@racknerd-284350:~/blog# hugo new site mydocs; cd mydocs
Congratulations! Your new Hugo site is created in /root/blog/mydocs.

Just a few more steps and you're ready to go:

1. Download a theme into the same-named folder.
   Choose a theme from https://themes.gohugo.io/ or
   create your own with the "hugo new theme <THEMENAME>" command.
2. Perhaps you want to add some content. You can add single files
   with "hugo new <SECTIONNAME>/<FILENAME>.<FORMAT>".
3. Start the built-in live server via "hugo server".

Visit https://gohugo.io/ for quickstart guide and full documentation.
root@racknerd-284350:~/blog/mydocs# git init
Initialized empty Git repository in /root/blog/mydocs/.git/
root@racknerd-284350:~/blog/mydocs# git submodule add https://github.com/alex-shpak/hugo-book themes/hugo-book
Cloning into '/root/blog/mydocs/themes/hugo-book'...
remote: Enumerating objects: 4026, done.
remote: Counting objects: 100% (314/314), done.
remote: Compressing objects: 100% (161/161), done.
remote: Total 4026 (delta 151), reused 227 (delta 113), pack-reused 3712
Receiving objects: 100% (4026/4026), 6.39 MiB | 6.39 MiB/s, done.
Resolving deltas: 100% (2040/2040), done.
root@racknerd-284350:~/blog/mydocs# cp -R themes/hugo-book/exampleSite/content .
root@racknerd-284350:~/blog/mydocs# hugo server --minify --theme hugo-book
Start building sites … 
hugo v0.91.2-1798BD3F linux/amd64 BuildDate=2021-12-23T15:33:34Z VendorInfo=gohugoio
WARN 2022/01/26 15:45:38 Expand shortcode is deprecated. Use 'details' instead.
Error: Error building site: TOCSS: failed to transform "book.scss" (text/x-scss). Check your Hugo installation; you need the extended version to build SCSS/SASS.: this feature is not available in your current Hugo version, see https://goo.gl/YMrWcn for more information
Built in 285 ms
root@racknerd-284350:~/blog/mydocs# 

my hugo version:

root@racknerd-284350:~/blog/mydocs# hugo version
hugo v0.91.2-1798BD3F linux/amd64 BuildDate=2021-12-23T15:33:34Z VendorInfo=gohugoio
alex-shpak commented 2 years ago

Hi! For this theme you need another build of hugo: hugo extended https://github.com/alex-shpak/hugo-book#requirements

instructions here: https://gohugo.io/getting-started/installing/

shikingram commented 2 years ago

@alex-shpak Hi! I used golang to compile:

go install --tags extended

but when i execute hugo got another error

root@racknerd-284350:~/blog/mydocs# hugo
Start building sites … 
hugo v0.93.0-DEV+extended linux/amd64 BuildDate=unknown
Error: Error building site: "/root/blog/mydocs/content/_index.md:8:1": failed to extract shortcode: template for shortcode "columns" not found
Total in 14 ms
alex-shpak commented 2 years ago

This error sounds like it didn't pickup theme, check that theme is actually set in config or flags

shikingram commented 2 years ago

When I reconfigured config.yaml it workes, i will close this issue,thanks for help 👍