luizdepra / hugo-coder

A minimalist blog theme for hugo.
MIT License
2.72k stars 1.06k forks source link

Github Pages deploy failing #273

Closed chinmayshah99 closed 4 years ago

chinmayshah99 commented 4 years ago

While deploying on Github pages, the following error arises. More about it here: https://github.com/gcushen/hugo-academic/issues/874#issuecomment-454850121

The tag image on line 151 in line 3): [:dot, "."] is not a valid expression in "{{ .Date }}" in themes/hugo-coder/archetypes/default.md Liquid Warning: Liquid syntax error (line 3): [:dot, "."] is not a valid expression in "{{ .Date }}" in themes/hugo-coder/archetypes/posts.md Liquid Warning: Liquid syntax error (line 676): Expected end_of_string but found id in "{{ range first 10 .Data.Pages }}" in themes/hugo-coder/exampleSite/content/posts/creating-a-new-theme.md Liquid Warning: Liquid syntax error (line 677): [:dot, "."] is not a valid expression in "{{ .Title }}" in themes/hugo-coder/exampleSite/content/posts/creating-a-new-theme.md Liquid Warning: Liquid syntax error (line 765): [:dot, "."] is not a valid expression in "{{ .Title }}" in themes/hugo-coder/exampleSite/content/posts/creating-a-new-theme.md Liquid Warning: Liquid syntax error (line 768): [:dot, "."] is not a valid expression in "{{ .Title }}" in themes/hugo-coder/exampleSite/content/posts/creating-a-new-theme.md Liquid Warning: Liquid syntax error (line 769): [:dot, "."] is not a valid expression in "{{ .Content }}" in themes/hugo-coder/exampleSite/content/posts/creating-a-new-theme.md Liquid Warning: Liquid syntax error (line 839): Expected end_of_string but found id in "{{ range first 10 .Data.Pages }}" in themes/hugo-coder/exampleSite/content/posts/creating-a-new-theme.md Liquid Warning: Liquid syntax error (line 840): [:dot, "."] is not a valid expression in "{{ .Permalink }}" in themes/hugo-coder/exampleSite/content/posts/creating-a-new-theme.md Liquid Warning: Liquid syntax error (line 840): [:dot, "."] is not a valid expression in "{{ .Title }}" in themes/hugo-coder/exampleSite/content/posts/creating-a-new-theme.md Liquid Warning: Liquid syntax error (line 957): Expected end_of_string but found id in "{{ range first 10 .Data.Pages }}" in themes/hugo-coder/exampleSite/content/posts/creating-a-new-theme.md Liquid Warning: Liquid syntax error (line 958): Expected end_of_string but found id in "{{ if eq .Type "post"}}" in themes/hugo-coder/exampleSite/content/posts/creating-a-new-theme.md Liquid Warning: Liquid syntax error (line 959): [:dot, "."] is not a valid expression in "{{ .Permalink }}" in themes/hugo-coder/exampleSite/content/posts/creating-a-new-theme.md Liquid Warning: Liquid syntax error (line 959): [:dot, "."] is not a valid expression in "{{ .Title }}" in themes/hugo-coder/exampleSite/content/posts/creating-a-new-theme.md Liquid Warning: Liquid syntax error (line 965): Expected end_of_string but found id in "{{ if eq .Type "page" }}" in themes/hugo-coder/exampleSite/content/posts/creating-a-new-theme.md Liquid Warning: Liquid syntax error (line 966): [:dot, "."] is not a valid expression in "{{ .Permalink }}" in themes/hugo-coder/exampleSite/content/posts/creating-a-new-theme.md Liquid Warning: Liquid syntax error (line 966): [:dot, "."] is not a valid expression in "{{ .Title }}" in themes/hugo-coder/exampleSite/content/posts/creating-a-new-theme.md Liquid Warning: Liquid syntax error (line 1013): [:dot, "."] is not a valid expression in "{{ .Title }}" in themes/hugo-coder/exampleSite/content/posts/creating-a-new-theme.md Liquid Warning: Liquid syntax error (line 1029): Expected end_of_string but found string in "{{ template "theme/partials/header.html" . }}" in themes/hugo-coder/exampleSite/content/posts/creating-a-new-theme.md Liquid Warning: Liquid syntax error (line 1033): Expected end_of_string but found string in "{{ partial "header.html" . }}" in themes/hugo-coder/exampleSite/content/posts/creating-a-new-theme.md Liquid Warning: Liquid syntax error (line 1041): Expected end_of_string but found string in "{{ partial "header.html" . }}" in themes/hugo-coder/exampleSite/content/posts/creating-a-new-theme.md Liquid Warning: Liquid syntax error (line 1044): Expected end_of_string but found id in "{{ range first 10 .Data.Pages }}" in themes/hugo-coder/exampleSite/content/posts/creating-a-new-theme.md Liquid Warning: Liquid syntax error (line 1045): Expected end_of_string but found id in "{{ if eq .Type "post"}}" in themes/hugo-coder/exampleSite/content/posts/creating-a-new-theme.md Liquid Warning: Liquid syntax error (line 1046): [:dot, "."] is not a valid expression in "{{ .Permalink }}" in themes/hugo-coder/exampleSite/content/posts/creating-a-new-theme.md Liquid Warning: Liquid syntax error (line 1046): [:dot, "."] is not a valid expression in "{{ .Title }}" in themes/hugo-coder/exampleSite/content/posts/creating-a-new-theme.md Liquid Warning: Liquid syntax error (line 1052): Expected end_of_string but found id in "{{ if or (eq .Type "page") (eq .Type "about") }}" in themes/hugo-coder/exampleSite/content/posts/creating-a-new-theme.md Liquid Warning: Liquid syntax error (line 1053): [:dot, "."] is not a valid expression in "{{ .Permalink }}" in themes/hugo-coder/exampleSite/content/posts/creating-a-new-theme.md Liquid Warning: Liquid syntax error (line 1053): [:dot, "."] is not a valid expression in "{{ .Type }}" in themes/hugo-coder/exampleSite/content/posts/creating-a-new-theme.md Liquid Warning: Liquid syntax error (line 1053): [:dot, "."] is not a valid expression in "{{ .Title }}" in themes/hugo-coder/exampleSite/content/posts/creating-a-new-theme.md Liquid Warning: Liquid syntax error (line 1053): [:dot, "."] is not a valid expression in "{{ .RelPermalink }}" in themes/hugo-coder/exampleSite/content/posts/creating-a-new-theme.md Liquid Warning: Liquid syntax error (line 1057): Expected end_of_string but found string in "{{ partial "footer.html" . }}" in themes/hugo-coder/exampleSite/content/posts/creating-a-new-theme.md Liquid Warning: Liquid syntax error (line 1067): Expected end_of_string but found string in "{{ partial "header.html" . }}" in themes/hugo-coder/exampleSite/content/posts/creating-a-new-theme.md Liquid Warning: Liquid syntax error (line 1069): [:dot, "."] is not a valid expression in "{{ .Title }}" in themes/hugo-coder/exampleSite/content/posts/creating-a-new-theme.md Liquid Warning: Liquid syntax error (line 1070): [:dot, "."] is not a valid expression in "{{ .Content }}" in themes/hugo-coder/exampleSite/content/posts/creating-a-new-theme.md Liquid Warning: Liquid syntax error (line 1072): Expected end_of_string but found string in "{{ partial "footer.html" . }}" in themes/hugo-coder/exampleSite/content/posts/creating-a-new-theme.md Liquid Warning: Liquid syntax error (line 1087): [:dot, "."] is not a valid expression in "{{ .Date.Format "Mon, Jan 2, 2006" }}" in themes/hugo-coder/exampleSite/content/posts/creating-a-new-theme.md Liquid Warning: Liquid syntax error (line 1094): Expected end_of_string but found string in "{{ partial "header.html" . }}" in themes/hugo-coder/exampleSite/content/posts/creating-a-new-theme.md Liquid Warning: Liquid syntax error (line 1096): [:dot, "."] is not a valid expression in "{{ .Title }}" in themes/hugo-coder/exampleSite/content/posts/creating-a-new-theme.md Liquid Warning: Liquid syntax error (line 1097): [:dot, "."] is not a valid expression in "{{ .Date.Format "Mon, Jan 2, 2006" }}" in themes/hugo-coder/exampleSite/content/posts/creating-a-new-theme.md Liquid Warning: Liquid syntax error (line 1098): [:dot, "."] is not a valid expression in "{{ .Content }}" in themes/hugo-coder/exampleSite/content/posts/creating-a-new-theme.md Liquid Warning: Liquid syntax error (line 1100): Expected end_of_string but found string in "{{ partial "footer.html" . }}" in themes/hugo-coder/exampleSite/content/posts/creating-a-new-theme.md Liquid Warning: Liquid syntax error (line 1117): Expected end_of_string but found string in "{{ partial "header.html" . }}" in themes/hugo-coder/exampleSite/content/posts/creating-a-new-theme.md Liquid Warning: Liquid syntax error (line 1119): [:dot, "."] is not a valid expression in "{{ .Title }}" in themes/hugo-coder/exampleSite/content/posts/creating-a-new-theme.md Liquid Warning: Liquid syntax error (line 1120): [:dot, "."] is not a valid expression in "{{ .Content }}" in themes/hugo-coder/exampleSite/content/posts/creating-a-new-theme.md Liquid Warning: Liquid syntax error (line 1122): Expected end_of_string but found string in "{{ partial "footer.html" . }}" in themes/hugo-coder/exampleSite/content/posts/creating-a-new-theme.md Liquid Warning: Liquid syntax error (line 1130): Expected end_of_string but found string in "{{ partial "header.html" . }}" in themes/hugo-coder/exampleSite/content/posts/creating-a-new-theme.md Liquid Warning: Liquid syntax error (line 1132): [:dot, "."] is not a valid expression in "{{ .Title }}" in themes/hugo-coder/exampleSite/content/posts/creating-a-new-theme.md Liquid Warning: Liquid syntax error (line 1133): [:dot, "."] is not a valid expression in "{{ .Date.Format "Mon, Jan 2, 2006" }}" in themes/hugo-coder/exampleSite/content/posts/creating-a-new-theme.md Liquid Warning: Liquid syntax error (line 1134): [:dot, "."] is not a valid expression in "{{ .Content }}" in themes/hugo-coder/exampleSite/content/posts/creating-a-new-theme.md Liquid Warning: Liquid syntax error (line 1136): Expected end_of_string but found string in "{{ partial "footer.html" . }}" in themes/hugo-coder/exampleSite/content/posts/creating-a-new-theme.md Liquid Warning: Liquid syntax error (line 44): [:end_of_string] is not a valid expression in "{{ }}" in themes/hugo-coder/exampleSite/content/posts/goisforlovers.md Liquid Warning: Liquid syntax error (line 54): Expected end_of_string but found number in "{{ add 1 2 }}" in themes/hugo-coder/exampleSite/content/posts/goisforlovers.md Liquid Warning: Liquid syntax error (line 60): [:dot, "."] is not a valid expression in "{{ .Params.bar }}" in themes/hugo-coder/exampleSite/content/posts/goisforlovers.md Liquid Warning: Liquid syntax error (line 64): Expected end_of_string but found id in "{{ if or (isset .Params "alt") (isset .Params "caption") }}" in themes/hugo-coder/exampleSite/content/posts/goisforlovers.md Liquid Warning: Liquid syntax error (line 76): [:dot, "."] is not a valid expression in "{{ .Title }}" in themes/hugo-coder/exampleSite/content/posts/goisforlovers.md Liquid Warning: Liquid syntax error (line 80): Unexpected character $ in "{{ $address := "123 Main St."}}" in themes/hugo-coder/exampleSite/content/posts/goisforlovers.md Liquid Warning: Liquid syntax error (line 81): Unexpected character $ in "{{ $address }}" in themes/hugo-coder/exampleSite/content/posts/goisforlovers.md Liquid Warning: Liquid syntax error (line 96): Expected end_of_string but found number in "{{ add 1 2 }}" in themes/hugo-coder/exampleSite/content/posts/goisforlovers.md Liquid Warning: Liquid syntax error (line 107): Expected end_of_string but found string in "{{ template "chrome/header.html" . }}" in themes/hugo-coder/exampleSite/content/posts/goisforlovers.md Liquid Warning: Liquid syntax error (line 122): Expected end_of_string but found id in "{{ range array }}" in themes/hugo-coder/exampleSite/content/posts/goisforlovers.md Liquid Warning: Liquid syntax error (line 123): [:dot, "."] is not a valid expression in "{{ . }}" in themes/hugo-coder/exampleSite/content/posts/goisforlovers.md Liquid Warning: Liquid syntax error (line 128): Unexpected character $ in "{{range $element := array}}" in themes/hugo-coder/exampleSite/content/posts/goisforlovers.md Liquid Warning: Liquid syntax error (line 129): Unexpected character $ in "{{ $element }}" in themes/hugo-coder/exampleSite/content/posts/goisforlovers.md Liquid Warning: Liquid syntax error (line 134): Unexpected character $ in "{{range $index, $element := array}}" in themes/hugo-coder/exampleSite/content/posts/goisforlovers.md Liquid Warning: Liquid syntax error (line 135): Unexpected character $ in "{{ $index }}" in themes/hugo-coder/exampleSite/content/posts/goisforlovers.md Liquid Warning: Liquid syntax error (line 136): Unexpected character $ in "{{ $element }}" in themes/hugo-coder/exampleSite/content/posts/goisforlovers.md Liquid Warning: Liquid syntax error (line 153): Expected end_of_string but found id in "{{ if isset .Params "title" }}" in themes/hugo-coder/exampleSite/content/posts/goisforlovers.md Liquid Warning: Liquid syntax error (line 153): Expected end_of_string but found string in "{{ index .Params "title" }}" in themes/hugo-coder/exampleSite/content/posts/goisforlovers.md Liquid Warning: Liquid syntax error (line 157): Expected end_of_string but found id in "{{ if isset .Params "alt" }}" in themes/hugo-coder/exampleSite/content/posts/goisforlovers.md Liquid Warning: Liquid syntax error (line 158): Expected end_of_string but found string in "{{ index .Params "alt" }}" in themes/hugo-coder/exampleSite/content/posts/goisforlovers.md Liquid Warning: Liquid syntax error (line 160): Expected end_of_string but found string in "{{ index .Params "caption" }}" in themes/hugo-coder/exampleSite/content/posts/goisforlovers.md Liquid Warning: Liquid syntax error (line 165): Expected end_of_string but found id in "{{ if and (or (isset .Params "title") (isset .Params "caption")) (isset .Params "attr")}}" in themes/hugo-coder/exampleSite/content/posts/goisforlovers.md Liquid Warning: Liquid syntax error (line 175): [:dot, "."] is not a valid expression in "{{ . }}" in themes/hugo-coder/exampleSite/content/posts/goisforlovers.md Liquid Warning: Liquid syntax error (line 179): Expected end_of_string but found id in "{{ if isset .Params "alt" }}" in themes/hugo-coder/exampleSite/content/posts/goisforlovers.md Liquid Warning: Liquid syntax error (line 180): Expected end_of_string but found string in "{{ index .Params "alt" }}" in themes/hugo-coder/exampleSite/content/posts/goisforlovers.md Liquid Warning: Liquid syntax error (line 181): Expected end_of_string but found id in "{{ else if isset .Params "caption" }}" in themes/hugo-coder/exampleSite/content/posts/goisforlovers.md Liquid Warning: Liquid syntax error (line 182): Expected end_of_string but found string in "{{ index .Params "caption" }}" in themes/hugo-coder/exampleSite/content/posts/goisforlovers.md Liquid Warning: Liquid syntax error (line 201): Expected end_of_string but found id in "{{ if eq 1 1 }}" in themes/hugo-coder/exampleSite/content/posts/goisforlovers.md Liquid Warning: Liquid syntax error (line 205): Expected end_of_string but found number in "{{ eq 1 1 | if }}" in themes/hugo-coder/exampleSite/content/posts/goisforlovers.md Liquid Warning: Liquid syntax error (line 212): Expected end_of_string but found string in "{{ index .Params "disqus_url" | html }}" in themes/hugo-coder/exampleSite/content/posts/goisforlovers.md Liquid Warning: Liquid syntax error (line 218): Expected end_of_string but found id in "{{ if or (or (isset .Params "title") (isset .Params "caption")) (isset .Params "attr")}}" in themes/hugo-coder/exampleSite/content/posts/goisforlovers.md Liquid Warning: Liquid syntax error (line 224): Expected end_of_string but found string in "{{ isset .Params "caption" | or isset .Params "title" | or isset .Params "attr" | if }}" in themes/hugo-coder/exampleSite/content/posts/goisforlovers.md Liquid Warning: Liquid syntax error (line 231): [:dot, "."] is not a valid expression in "{{ . }}" in themes/hugo-coder/exampleSite/content/posts/goisforlovers.md Liquid Warning: Liquid syntax error (line 241): Unexpected character $ in "{{ $title := .Site.Title }}" in themes/hugo-coder/exampleSite/content/posts/goisforlovers.md Liquid Warning: Liquid syntax error (line 243): Unexpected character $ in "{{ $baseurl }}" in themes/hugo-coder/exampleSite/content/posts/goisforlovers.md Liquid Warning: Liquid syntax error (line 243): [:dot, "."] is not a valid expression in "{{ . | urlize }}" in themes/hugo-coder/exampleSite/content/posts/goisforlovers.md Liquid Warning: Liquid syntax error (line 243): [:dot, "."] is not a valid expression in "{{ . }}" in themes/hugo-coder/exampleSite/content/posts/goisforlovers.md Liquid Warning: Liquid syntax error (line 243): Unexpected character $ in "{{ $title }}" in themes/hugo-coder/exampleSite/content/posts/goisforlovers.md Liquid Warning: Liquid syntax error (line 246): [:dot, "."] is not a valid expression in "{{ . }}" in themes/hugo-coder/exampleSite/content/posts/goisforlovers.md Liquid Warning: Liquid syntax error (line 285): Expected end_of_string but found id in "{{ if not .Params.notoc }}" in themes/hugo-coder/exampleSite/content/posts/goisforlovers.md Liquid Warning: Liquid syntax error (line 287): [:dot, "."] is not a valid expression in "{{ .TableOfContents }}" in themes/hugo-coder/exampleSite/content/posts/goisforlovers.md Liquid Warning: Liquid syntax error (line 314): [:dot, "."] is not a valid expression in "{{.Site.Params.CopyrightHTML | safeHtml}}" in themes/hugo-coder/exampleSite/content/posts/goisforlovers.md Liquid Warning: Liquid syntax error (line 324): [:dot, "."] is not a valid expression in "{{.}}" in themes/hugo-coder/exampleSite/content/posts/goisforlovers.md Liquid Warning: Liquid syntax error (line 325): [:dot, "."] is not a valid expression in "{{.}}" in themes/hugo-coder/exampleSite/content/posts/goisforlovers.md Liquid Warning: Liquid syntax error (line 336): Expected end_of_string but found id in "{{range first .Site.Params.SidebarRecentLimit .Site.Recent}}" in themes/hugo-coder/exampleSite/content/posts/goisforlovers.md Liquid Warning: Liquid syntax error (line 337): [:dot, "."] is not a valid expression in "{{.RelPermalink}}" in themes/hugo-coder/exampleSite/content/posts/goisforlovers.md Liquid Warning: Liquid syntax error (line 337): [:dot, "."] is not a valid expression in "{{.Title}}" in themes/hugo-coder/exampleSite/content/posts/goisforlovers.md Liquid Exception: Liquid syntax error ( is not a recognized Liquid tag.

luizdepra commented 4 years ago

Take a look here. Probably you are pushing your site source, not the built content, into your repository. GitHubPages does not build Hugo projects, only Jekyll ones.

Here you can find at least three ways to host hugo projects with GHPages.

Fakorede commented 4 years ago

Thanks @luizdepra. I found your comment here helpful and was finally able to deploy to GitHub pages.

@chinmayshah99, you would need to follow these steps assuming on your local machine you have two folders created on the same level, one for your hugo project and the other for your gh-page, named project and username.github.io respectively:

  1. Create a seperate repository from where you have your hugo project. This seperate repository is the one you name {your-username}.github.io
  2. Initialize this repo by running git init in bash
  3. cd into the project folder
  4. Run hugo -d ../username.github.io. This builds your hugo project into the username.github.io folder.
  5. Now, cd into your username.github.io folder. With the ls command, you'll see the built project.
  6. Push to the master branch of your remote repo for {your-username}.github.io
  7. Now, there'll be no errors and your project is live on GitHub Pages.

I hope this this helps you and anyone else who comes across this.

chinmayshah99 commented 4 years ago

Hey @Fakorede thanks for the help. I did figure out and am gonna put out a blog post real soon!

Fakorede commented 4 years ago

@chinmayshah99 Glad you figure it out!