Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot generate the PDF or the website #11

Open
snowc0de opened this issue May 13, 2021 · 1 comment
Open

Cannot generate the PDF or the website #11

snowc0de opened this issue May 13, 2021 · 1 comment

Comments

@snowc0de
Copy link

Environement

snow@snowcode-smol:~$ hugo version
Hugo Static Site Generator v0.80.0-792EF0F4 linux/amd64 BuildDate: 2020-12-31T13:37:58Z
snow@snowcode-smol:~$ go version
go version go1.15.7 linux/amd64
snow@snowcode-smol:~$ neofetch
       _,met$$$$$gg.          snow@snowcode-smol
    ,g$$$$$$$$$$$$$$$P.       ------------------
  ,g$$P"     """Y$$.".        OS: Debian GNU/Linux 10 (buster) x86_64
 ,$$P'              `$$$.     Host: Aspire A111-31 V1.21
',$$P       ,ggs.     `$$b:   Kernel: 4.19.0-14-amd64
`d$$'     ,$P"'   .    $$$    Uptime: 4 hours, 9 mins
 $$P      d$'     ,    $$P    Packages: 2599 (dpkg), 38 (nix)
 $$:      $$.   -    ,d$$'    Shell: bash 5.0.3
 $$;      Y$b._   _,d$P'      Resolution: 1366x768
 Y$$.    `.`"Y$$$$P"'         WM: dwm
 `$$b      "-.__              Theme: Adwaita [GTK3]
  `Y$$                        Icons: Adwaita [GTK3]
   `Y$$.                      Terminal: alacritty
     `$$b.                    Terminal Font: Fira Code
       `Y$$b.                 CPU: Intel Celeron N4000 (2) @ 2.600GHz
          `"Y$b._             GPU: Intel Device 3185
              `"""            Memory: 1982MiB / 3769MiB

Current behavior

Cannot generate the website using either hugo or the generatepdf.js script.

Expected behavior

Having the same result as on the demo website.

How to reproduce

I've probably missed something but when following the instructions on the README I'm not able to generate the PDF. Those are the commands I ran:

git clone https://github.com/gohugoio/hugoBasicExample.git
cd hugoBasicExample
git clone --recursive https://github.com/cssandstuff/hugo-theme-winning.git themes/winning
cp themes/winning/exampleSite/content/_index.md content/_index.md
HUGO_THEME=winning hugo server
npm i html-pdf -g
cp themes/winning/exampleSite/generatepdf.js .
node ./generatepdf.js

But I get the following error code:

internal/fs/utils.js:307
    throw err;
    ^

Error: ENOENT: no such file or directory, open './public/index.html'
    at Object.openSync (fs.js:476:3)
    at Object.readFileSync (fs.js:377:35)
    at Object.<anonymous> (/home/snow/winning/test/hugoBasicExample/generatepdf.js:3:15)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
    at internal/main/run_main_module.js:17:47 {
  errno: -2,
  syscall: 'open',
  code: 'ENOENT',
  path: './public/index.html'
}

Then I tried to generate the public HTML files using hugo but that gave me the following error:

Start building sites …
Total in 11 ms
Error: Error building site: "/home/snow/winning/test/hugoBasicExample/content/_index.md:7:1": failed to extract shortcode: template for shortcode "grid" not found

Thanks in advance for your help.

@snowc0de snowc0de changed the title Cannot generate PDF Cannot generate the PDF or the website May 13, 2021
@snowc0de
Copy link
Author

An idea of how it may be solved, is there some incompatibility with versions? Also, is there even still people that uses this? The last commit was 1 year ago and the last active issue was also created one year ago...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant