Hugo-coder: I'm unable to host my site on gh-pages.

Created on 12 Apr 2020  路  8Comments  路  Source: luizdepra/hugo-coder

GitHub Pages failed to build your site.

The tag image on line 151 in line 3): [:dot, "."] is not a valid expression in "{{ .Date }}" in public/archetypes/default.md Liquid Warning: Liquid syntax error (line 3): [:dot, "."] is not a valid expression in "{{ .Date }}" in public/archetypes/posts.md Liquid Warning: Liquid syntax error (line 676): Expected end_of_string but found id in "{{ range first 10 .Data.Pages }}" in public/exampleSite/content/posts/creating-a-new-theme.md Liquid Warning: Liquid syntax error (line 677): [:dot, "."] is not a valid expression in "{{ .Title }}" in public/exampleSite/content/posts/creating-a-new-theme.md Liquid Warning: Liquid syntax error (line 765): [:dot, "."] is not a valid expression in "{{ .Title }}" in public/exampleSite/content/posts/creating-a-new-theme.md Liquid Warning: Liquid syntax error (line 768): [:dot, "."] is not a valid expression in "{{ .Title }}" in public/exampleSite/content/posts/creating-a-new-theme.md Liquid Warning: Liquid syntax error (line 769): [:dot, "."] is not a valid expression in "{{ .Content }}" in public/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 public/exampleSite/content/posts/creating-a-new-theme.md Liquid Warning: Liquid syntax error (line 840): [:dot, "."] is not a valid expression in "{{ .Permalink }}" in public/exampleSite/content/posts/creating-a-new-theme.md Liquid Warning: Liquid syntax error (line 840): [:dot, "."] is not a valid expression in "{{ .Title }}" in public/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 public/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 public/exampleSite/content/posts/creating-a-new-theme.md Liquid Warning: Liquid syntax error (line 959): [:dot, "."] is not a valid expression in "{{ .Permalink }}" in public/exampleSite/content/posts/creating-a-new-theme.md Liquid Warning: Liquid syntax error (line 959): [:dot, "."] is not a valid expression in "{{ .Title }}" in public/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 public/exampleSite/content/posts/creating-a-new-theme.md Liquid Warning: Liquid syntax error (line 966): [:dot, "."] is not a valid expression in "{{ .Permalink }}" in public/exampleSite/content/posts/creating-a-new-theme.md Liquid Warning: Liquid syntax error (line 966): [:dot, "."] is not a valid expression in "{{ .Title }}" in public/exampleSite/content/posts/creating-a-new-theme.md Liquid Warning: Liquid syntax error (line 1013): [:dot, "."] is not a valid expression in "{{ .Title }}" in public/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 public/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 public/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 public/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 public/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 public/exampleSite/content/posts/creating-a-new-theme.md Liquid Warning: Liquid syntax error (line 1046): [:dot, "."] is not a valid expression in "{{ .Permalink }}" in public/exampleSite/content/posts/creating-a-new-theme.md Liquid Warning: Liquid syntax error (line 1046): [:dot, "."] is not a valid expression in "{{ .Title }}" in public/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 public/exampleSite/content/posts/creating-a-new-theme.md Liquid Warning: Liquid syntax error (line 1053): [:dot, "."] is not a valid expression in "{{ .Permalink }}" in public/exampleSite/content/posts/creating-a-new-theme.md Liquid Warning: Liquid syntax error (line 1053): [:dot, "."] is not a valid expression in "{{ .Type }}" in public/exampleSite/content/posts/creating-a-new-theme.md Liquid Warning: Liquid syntax error (line 1053): [:dot, "."] is not a valid expression in "{{ .Title }}" in public/exampleSite/content/posts/creating-a-new-theme.md Liquid Warning: Liquid syntax error (line 1053): [:dot, "."] is not a valid expression in "{{ .RelPermalink }}" in public/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 public/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 public/exampleSite/content/posts/creating-a-new-theme.md Liquid Warning: Liquid syntax error (line 1069): [:dot, "."] is not a valid expression in "{{ .Title }}" in public/exampleSite/content/posts/creating-a-new-theme.md Liquid Warning: Liquid syntax error (line 1070): [:dot, "."] is not a valid expression in "{{ .Content }}" in public/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 public/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 public/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 public/exampleSite/content/posts/creating-a-new-theme.md Liquid Warning: Liquid syntax error (line 1096): [:dot, "."] is not a valid expression in "{{ .Title }}" in public/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 public/exampleSite/content/posts/creating-a-new-theme.md Liquid Warning: Liquid syntax error (line 1098): [:dot, "."] is not a valid expression in "{{ .Content }}" in public/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 public/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 public/exampleSite/content/posts/creating-a-new-theme.md Liquid Warning: Liquid syntax error (line 1119): [:dot, "."] is not a valid expression in "{{ .Title }}" in public/exampleSite/content/posts/creating-a-new-theme.md Liquid Warning: Liquid syntax error (line 1120): [:dot, "."] is not a valid expression in "{{ .Content }}" in public/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 public/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 public/exampleSite/content/posts/creating-a-new-theme.md Liquid Warning: Liquid syntax error (line 1132): [:dot, "."] is not a valid expression in "{{ .Title }}" in public/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 public/exampleSite/content/posts/creating-a-new-theme.md Liquid Warning: Liquid syntax error (line 1134): [:dot, "."] is not a valid expression in "{{ .Content }}" in public/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 public/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 public/exampleSite/content/posts/goisforlovers.md Liquid Warning: Liquid syntax error (line 54): Expected end_of_string but found number in "{{ add 1 2 }}" in public/exampleSite/content/posts/goisforlovers.md Liquid Warning: Liquid syntax error (line 60): [:dot, "."] is not a valid expression in "{{ .Params.bar }}" in public/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 public/exampleSite/content/posts/goisforlovers.md Liquid Warning: Liquid syntax error (line 76): [:dot, "."] is not a valid expression in "{{ .Title }}" in public/exampleSite/content/posts/goisforlovers.md Liquid Warning: Liquid syntax error (line 80): Unexpected character $ in "{{ $address := "123 Main St."}}" in public/exampleSite/content/posts/goisforlovers.md Liquid Warning: Liquid syntax error (line 81): Unexpected character $ in "{{ $address }}" in public/exampleSite/content/posts/goisforlovers.md Liquid Warning: Liquid syntax error (line 96): Expected end_of_string but found number in "{{ add 1 2 }}" in public/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 public/exampleSite/content/posts/goisforlovers.md Liquid Warning: Liquid syntax error (line 122): Expected end_of_string but found id in "{{ range array }}" in public/exampleSite/content/posts/goisforlovers.md Liquid Warning: Liquid syntax error (line 123): [:dot, "."] is not a valid expression in "{{ . }}" in public/exampleSite/content/posts/goisforlovers.md Liquid Warning: Liquid syntax error (line 128): Unexpected character $ in "{{range $element := array}}" in public/exampleSite/content/posts/goisforlovers.md Liquid Warning: Liquid syntax error (line 129): Unexpected character $ in "{{ $element }}" in public/exampleSite/content/posts/goisforlovers.md Liquid Warning: Liquid syntax error (line 134): Unexpected character $ in "{{range $index, $element := array}}" in public/exampleSite/content/posts/goisforlovers.md Liquid Warning: Liquid syntax error (line 135): Unexpected character $ in "{{ $index }}" in public/exampleSite/content/posts/goisforlovers.md Liquid Warning: Liquid syntax error (line 136): Unexpected character $ in "{{ $element }}" in public/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 public/exampleSite/content/posts/goisforlovers.md Liquid Warning: Liquid syntax error (line 153): Expected end_of_string but found string in "{{ index .Params "title" }}" in public/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 public/exampleSite/content/posts/goisforlovers.md Liquid Warning: Liquid syntax error (line 158): Expected end_of_string but found string in "{{ index .Params "alt" }}" in public/exampleSite/content/posts/goisforlovers.md Liquid Warning: Liquid syntax error (line 160): Expected end_of_string but found string in "{{ index .Params "caption" }}" in public/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 public/exampleSite/content/posts/goisforlovers.md Liquid Warning: Liquid syntax error (line 175): [:dot, "."] is not a valid expression in "{{ . }}" in public/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 public/exampleSite/content/posts/goisforlovers.md Liquid Warning: Liquid syntax error (line 180): Expected end_of_string but found string in "{{ index .Params "alt" }}" in public/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 public/exampleSite/content/posts/goisforlovers.md Liquid Warning: Liquid syntax error (line 182): Expected end_of_string but found string in "{{ index .Params "caption" }}" in public/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 public/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 public/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 public/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 public/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 public/exampleSite/content/posts/goisforlovers.md Liquid Warning: Liquid syntax error (line 231): [:dot, "."] is not a valid expression in "{{ . }}" in public/exampleSite/content/posts/goisforlovers.md Liquid Warning: Liquid syntax error (line 241): Unexpected character $ in "{{ $title := .Site.Title }}" in public/exampleSite/content/posts/goisforlovers.md Liquid Warning: Liquid syntax error (line 243): Unexpected character $ in "{{ $baseurl }}" in public/exampleSite/content/posts/goisforlovers.md Liquid Warning: Liquid syntax error (line 243): [:dot, "."] is not a valid expression in "{{ . | urlize }}" in public/exampleSite/content/posts/goisforlovers.md Liquid Warning: Liquid syntax error (line 243): [:dot, "."] is not a valid expression in "{{ . }}" in public/exampleSite/content/posts/goisforlovers.md Liquid Warning: Liquid syntax error (line 243): Unexpected character $ in "{{ $title }}" in public/exampleSite/content/posts/goisforlovers.md Liquid Warning: Liquid syntax error (line 246): [:dot, "."] is not a valid expression in "{{ . }}" in public/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 public/exampleSite/content/posts/goisforlovers.md Liquid Warning: Liquid syntax error (line 287): [:dot, "."] is not a valid expression in "{{ .TableOfContents }}" in public/exampleSite/content/posts/goisforlovers.md Liquid Warning: Liquid syntax error (line 314): [:dot, "."] is not a valid expression in "{{.Site.Params.CopyrightHTML | safeHtml}}" in public/exampleSite/content/posts/goisforlovers.md Liquid Warning: Liquid syntax error (line 324): [:dot, "."] is not a valid expression in "{{.}}" in public/exampleSite/content/posts/goisforlovers.md Liquid Warning: Liquid syntax error (line 325): [:dot, "."] is not a valid expression in "{{.}}" in public/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 public/exampleSite/content/posts/goisforlovers.md Liquid Warning: Liquid syntax error (line 337): [:dot, "."] is not a valid expression in "{{.RelPermalink}}" in public/exampleSite/content/posts/goisforlovers.md Liquid Warning: Liquid syntax error (line 337): [:dot, "."] is not a valid expression in "{{.Title}}" in public/exampleSite/content/posts/goisforlovers.md Liquid Exception: Liquid syntax error ( is not a recognized Liquid tag.

Most helpful comment

My blog is not a good example here. It is hosted on Netlify. 馃槅

But, yeah, GHPages only build Jekyll projects. When I was hosting my bong on GHPages I've configured the master branch for the built content and a source branch for the project source. Here are an example project. There is a deploy.sh file there that helps you build and deploy the site.

@luizdepra 馃槄 I listed your site just for him to compare his directory structure with yours because it was really messy.

All 8 comments

Hi @samyak-jn, what did you do to get this result ?

Hey, these errors are of Travis CI: https://github.com/jnsamyak/jnsamyak.github.io/runs/580885730. When I'm trying to run the website locally, it builds fine. But, when I'm pushing my changes to upstream, it shows 404 not found error.

Is it your GitHub repo https://github.com/jnsamyak/jnsamyak.github.io ?
If it is, how do you build your site locally.
I'm not familiar with GitHub pages but either you push the public directory (result of hugo command) or you make sure you configure the repo to build it for you.

Usefull links :

My blog is not a good example here. It is hosted on Netlify. :laughing:

But, yeah, GHPages only build Jekyll projects. When I was hosting my bong on GHPages I've configured the master branch for the built content and a source branch for the project source. Here are an example project. There is a deploy.sh file there that helps you build and deploy the site.

My blog is not a good example here. It is hosted on Netlify. 馃槅

But, yeah, GHPages only build Jekyll projects. When I was hosting my bong on GHPages I've configured the master branch for the built content and a source branch for the project source. Here are an example project. There is a deploy.sh file there that helps you build and deploy the site.

@luizdepra 馃槄 I listed your site just for him to compare his directory structure with yours because it was really messy.

@samyak-jn follow instructions here

It is quite possible to use Travis to build Hugo based site and push it to gh-pages. You can take a look at opensourcecities/montreal for example.

Hi, thank you @khos2ow @Fakorede @clement-pannetier @luizdepra I got it working !

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rajeev1986 picture rajeev1986  路  7Comments

luizdepra picture luizdepra  路  7Comments

paride picture paride  路  6Comments

netrules picture netrules  路  4Comments

davhin picture davhin  路  5Comments