negrel / hugo-theme-pico

:black_circle: Pico is a minimalist, readable, responsive, light and beautiful Hugo theme.

Home Page:https://sponge-bob.netlify.app/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Potential issue related to ./themes/pico/layouts/partials/head/css.html

bcmryan opened this issue · comments

Hi, this looks a like a great project, but I am having trouble getting a Hugo server to properly show exampleSite.

I am running Ubuntu 20.04.2. Below is a Bash script I have been using to install and run everything. Please note that I am very new to Hugo and everything it works with, so there could be something very simple that I am missing here.

#! /bin/bash

# node install: https://stackoverflow.com/questions/63312642/how-to-install-node-tar-xz-file-in-linux
# dependencies and theme install: https://github.com/negrel/hugo-theme-pico

nodejsversion=v16.3.0
websitename=picotest4

sudo apt install -y hugo xz-utils

mkdir /tmp/node-$nodejsversion
curl https://nodejs.org/dist/$nodejsversion/node-$nodejsversion-linux-x64.tar.xz --output /tmp/node-$nodejsversion/node-$nodejsversion-linux-x64.tar.xz
tar -xvf /tmp/node-$nodejsversion/node-$nodejsversion-linux-x64.tar.xz -C /tmp/node-$nodejsversion/
sudo cp -r /tmp/node-$nodejsversion/node-$nodejsversion-linux-x64/{bin,include,lib,share} /usr/
sudo rm -r /tmp/node-$nodejsversion

npm install --save-dev postcss postcss-cli @fullhuman/postcss-purgecss postcss-import autoprefixer@latest tailwindcss

echo -n "
Success! The installed node version is "
node --version
echo "
"

mkdir -p ./hugo
cd ./hugo
git clone https://github.com/negrel/hugo-theme-pico.git pico
mkdir $websitename
cp -r ./pico/exampleSite/* ./$websitename
sudo rm -r ./pico
cd ./$websitename
bash ./setup.sh
git submodule add -f https://github.com/negrel/hugo-theme-pico.git ./themes/pico
hugo server

The command node --version returns v16.3.0, so I presume that it installed correctly (I will not include its output here, as it is mainly a long list of files).

The remaining output is as follows (replacing my local username with bcmryan, my Github username).

up to date, audited 182 packages in 2s

4 moderate severity vulnerabilities

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.

Success! The installed node version is v16.3.0


Cloning into 'pico'...
remote: Enumerating objects: 2328, done.
remote: Counting objects: 100% (398/398), done.
remote: Compressing objects: 100% (245/245), done.
remote: Total 2328 (delta 212), reused 266 (delta 119), pack-reused 1930
Receiving objects: 100% (2328/2328), 10.77 MiB | 8.52 MiB/s, done.
Resolving deltas: 100% (1200/1200), done.
Installing node modules : 
npm install

added 447 packages, and audited 448 packages in 2s

7 vulnerabilities (5 moderate, 2 high)

To address all issues, run:
  npm audit fix

Run `npm audit` for details.
Init git repository : 
git init
Initialized empty Git repository in /home/bcmryan/Documents/hugo/picotest4/.git/
Installing Pico theme : 
git submodule add https://github.com/negrel/hugo-theme-pico.git ./themes/pico
Cloning into '/home/bcmryan/Documents/hugo/picotest4/themes/pico'...
remote: Enumerating objects: 2328, done.
remote: Counting objects: 100% (398/398), done.
remote: Compressing objects: 100% (245/245), done.
remote: Total 2328 (delta 212), reused 266 (delta 119), pack-reused 1930
Receiving objects: 100% (2328/2328), 10.77 MiB | 9.55 MiB/s, done.
Resolving deltas: 100% (1200/1200), done.
Updating Pico submodule : 
git submodule foreach git pull origin master
Entering 'themes/pico'
From https://github.com/negrel/hugo-theme-pico
 * branch            master     -> FETCH_HEAD
Already up to date.
Updating theme resources : 
cp -r ./themes/pico/exampleSite/resources .
Updating update.sh : 
cp "./themes/pico/exampleSite/update.sh" .
Building sites … ERROR 2021/06/11 21:36:55 render of "page" failed: execute of template failed: template: blog/single.html:7:4: executing "blog/single.html" at <partial "head/css.html" .>: error calling partial: "/home/bcmryan/Documents/hugo/picotest4/themes/pico/layouts/partials/head/css.html:9:96": execute of template failed: template: partials/head/css.html:9:96: executing "partials/head/css.html" at <resources>: can't evaluate field PostProcess in type interface {}
ERROR 2021/06/11 21:36:55 render of "section" failed: execute of template failed: template: blog/list.html:7:4: executing "blog/list.html" at <partial "head/css.html" .>: error calling partial: "/home/bcmryan/Documents/hugo/picotest4/themes/pico/layouts/partials/head/css.html:9:96": execute of template failed: template: partials/head/css.html:9:96: executing "partials/head/css.html" at <resources>: can't evaluate field PostProcess in type interface {}
ERROR 2021/06/11 21:36:55 render of "taxonomyTerm" failed: execute of template failed: template: taxonomy/list.html:7:4: executing "taxonomy/list.html" at <partial "head/css.html" .>: error calling partial: "/home/bcmryan/Documents/hugo/picotest4/themes/pico/layouts/partials/head/css.html:9:96": execute of template failed: template: partials/head/css.html:9:96: executing "partials/head/css.html" at <resources>: can't evaluate field PostProcess in type interface {}
ERROR 2021/06/11 21:36:55 render of "taxonomy" failed: execute of template failed: template: taxonomy/list.html:7:4: executing "taxonomy/list.html" at <partial "head/css.html" .>: error calling partial: "/home/bcmryan/Documents/hugo/picotest4/themes/pico/layouts/partials/head/css.html:9:96": execute of template failed: template: partials/head/css.html:9:96: executing "partials/head/css.html" at <resources>: can't evaluate field PostProcess in type interface {}
Total in 22 ms
Error: Error building site: failed to render pages: render of "page" failed: execute of template failed: template: blog/single.html:7:4: executing "blog/single.html" at <partial "head/css.html" .>: error calling partial: "/home/bcmryan/Documents/hugo/picotest4/themes/pico/layouts/partials/head/css.html:9:96": execute of template failed: template: partials/head/css.html:9:96: executing "partials/head/css.html" at <resources>: can't evaluate field PostProcess in type interface {}
Adding existing repo at 'themes/pico' to the index
Building sites … (node:16717) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field module resolution of the package at /home/bcmryan/Documents/hugo/picotest4/node_modules/postcss/package.json.
Update this package.json to use a subpath pattern like "./*".
(Use `node --trace-deprecation ...` to show where the warning was created)
ERROR 2021/06/11 21:36:59 render of "taxonomyTerm" failed: execute of template failed: template: taxonomy/list.html:7:4: executing "taxonomy/list.html" at <partial "head/css.html" .>: error calling partial: "/home/bcmryan/Documents/hugo/picotest4/themes/pico/layouts/partials/head/css.html:35:46": execute of template failed: template: partials/head/css.html:35:46: executing "partials/head/css.html" at <resources>: can't evaluate field PostProcess in type interface {}
ERROR 2021/06/11 21:36:59 render of "taxonomyTerm" failed: execute of template failed: template: taxonomy/list.html:7:4: executing "taxonomy/list.html" at <partial "head/css.html" .>: error calling partial: "/home/bcmryan/Documents/hugo/picotest4/themes/pico/layouts/partials/head/css.html:35:46": execute of template failed: template: partials/head/css.html:35:46: executing "partials/head/css.html" at <resources>: can't evaluate field PostProcess in type interface {}
ERROR 2021/06/11 21:36:59 render of "page" failed: execute of template failed: template: blog/single.html:7:4: executing "blog/single.html" at <partial "head/css.html" .>: error calling partial: "/home/bcmryan/Documents/hugo/picotest4/themes/pico/layouts/partials/head/css.html:35:46": execute of template failed: template: partials/head/css.html:35:46: executing "partials/head/css.html" at <resources>: can't evaluate field PostProcess in type interface {}
ERROR 2021/06/11 21:36:59 render of "taxonomy" failed: execute of template failed: template: taxonomy/list.html:7:4: executing "taxonomy/list.html" at <partial "head/css.html" .>: error calling partial: "/home/bcmryan/Documents/hugo/picotest4/themes/pico/layouts/partials/head/css.html:35:46": execute of template failed: template: partials/head/css.html:35:46: executing "partials/head/css.html" at <resources>: can't evaluate field PostProcess in type interface {}
Built in 4145 ms
Error: Error building site: failed to render pages: render of "home" failed: execute of template failed: template: index.html:7:4: executing "index.html" at <partial "head/css.html" .>: error calling partial: "/home/bcmryan/Documents/hugo/picotest4/themes/pico/layouts/partials/head/css.html:35:46": execute of template failed: template: partials/head/css.html:35:46: executing "partials/head/css.html" at <resources>: can't evaluate field PostProcess in type interface {}

As you can see, all errors point to the file /home/bcmryan/Documents/hugo/picotest4/themes/pico/layouts/partials/head/css.html. Sadly, I cannot comment beyond this.

Predictably, running hugo server from inside /home/bcmryan/Documents/hugo/picotest4/ returns similar output.

Building sites … (node:16773) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field module resolution of the package at /home/bcmryan/Documents/hugo/picotest4/node_modules/postcss/package.json.
Update this package.json to use a subpath pattern like "./*".
(Use `node --trace-deprecation ...` to show where the warning was created)
ERROR 2021/06/11 21:44:31 render of "taxonomyTerm" failed: execute of template failed: template: taxonomy/list.html:7:4: executing "taxonomy/list.html" at <partial "head/css.html" .>: error calling partial: "/home/bcmryan/Documents/hugo/picotest4/themes/pico/layouts/partials/head/css.html:35:46": execute of template failed: template: partials/head/css.html:35:46: executing "partials/head/css.html" at <resources>: can't evaluate field PostProcess in type interface {}
ERROR 2021/06/11 21:44:31 render of "taxonomyTerm" failed: execute of template failed: template: taxonomy/list.html:7:4: executing "taxonomy/list.html" at <partial "head/css.html" .>: error calling partial: "/home/bcmryan/Documents/hugo/picotest4/themes/pico/layouts/partials/head/css.html:35:46": execute of template failed: template: partials/head/css.html:35:46: executing "partials/head/css.html" at <resources>: can't evaluate field PostProcess in type interface {}
ERROR 2021/06/11 21:44:31 render of "taxonomy" failed: execute of template failed: template: taxonomy/list.html:7:4: executing "taxonomy/list.html" at <partial "head/css.html" .>: error calling partial: "/home/bcmryan/Documents/hugo/picotest4/themes/pico/layouts/partials/head/css.html:35:46": execute of template failed: template: partials/head/css.html:35:46: executing "partials/head/css.html" at <resources>: can't evaluate field PostProcess in type interface {}
ERROR 2021/06/11 21:44:31 render of "page" failed: execute of template failed: template: blog/single.html:7:4: executing "blog/single.html" at <partial "head/css.html" .>: error calling partial: "/home/bcmryan/Documents/hugo/picotest4/themes/pico/layouts/partials/head/css.html:35:46": execute of template failed: template: partials/head/css.html:35:46: executing "partials/head/css.html" at <resources>: can't evaluate field PostProcess in type interface {}
Built in 4228 ms
Error: Error building site: failed to render pages: render of "home" failed: execute of template failed: template: index.html:7:4: executing "index.html" at <partial "head/css.html" .>: error calling partial: "/home/bcmryan/Documents/hugo/picotest4/themes/pico/layouts/partials/head/css.html:35:46": execute of template failed: template: partials/head/css.html:35:46: executing "partials/head/css.html" at <resources>: can't evaluate field PostProcess in type interface {}

It looks like you're having an issue with postcss, I may have solved this issue the past year. Are you still experiencing errors ?