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

Failed to initialize github pages #65

Open
Juneyoung-Kang opened this issue Nov 3, 2018 · 1 comment
Open

Failed to initialize github pages #65

Juneyoung-Kang opened this issue Nov 3, 2018 · 1 comment

Comments

@Juneyoung-Kang
Copy link

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/.

default

How can I solve this error? I need some help.

@fberrez
Copy link

fberrez commented Jan 30, 2019

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!

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

2 participants