Failed to initialize github pages
juneyoung-kang opened this issue · 1 comments
juneyoung-kang commented
Failed to initialize github pages
I got this error when I initialize this theme.
I've added this theme as submodule, but I faced this warning.
Your site is having problems building: The tag image on line 136 in themes/hugo-theme-cactus-plus/exampleSite/content/posts/migrate-from-jekyll.md is not a recognized Liquid tag. For more information, see https://help.github.com/articles/page-build-failed-unknown-tag-error/.
How can I solve this error? I need some help.
fberrez commented
I do not have this error.
Here is why I did:
$ hugo new site my-site/
$ cd my-site/
$ git clone --depth 1 --recursive https://github.com/nodejh/hugo-theme-cactus-plus.git themes/cactus-plus
$ hugo serve -D -t cactus-plus
# no error on localhost
# Initiliazing project git
$ git init
$ git remote add origin https://github.com/my-github-account/my-project-repo.git
# Initializing public git
$ hugo
$ cd public
$ git init
$ git remote add origin https://github.com/my-github-account/my-public-repo.git
$ cd ..
Back to the root folder, I used this script called deploy.sh
:
#!/bin/bash
red="\033[31m"
green="\033[0;32m"
nocolor="\033[0m"
echo -e "${green}Deploying updates to GitHub...${nocolor}"
# Defines commit message.
if [ $# -eq 1 ]
then
msg="$1"
else
echo -e "${red}Error: commit message cannot be null.${nocolor}"
exit 1
fi
# Builds the project.
hugo
# Commits source files.
echo -e "${green}Committing source files...${nocolor}"
git add .
git commit -m "${msg}"
git push origin master
# Go To Public folder.
cd public
# Commits public folder
echo -e "${green}Committing public folder...${nocolor}"
git add .
git commit -m "${msg}"
git push origin master
# Come Back up to the Project Root
cd ..
echo -e "${green}Done!${nocolor}"
$ chmod u+x deploy.sh
$ ./deploy.sh "First commit"
Try it and let me know if it works!