Mitrichius / hugo-theme-anubis

Anubis is a simple minimalist theme for Hugo blog engine
https://hugo-theme-anubis.netlify.app/
MIT License
397 stars 152 forks source link

Deploying on github pages missing styling #81

Closed SntTGR closed 3 years ago

SntTGR commented 3 years ago

Hello! I really like this theme but had some problems trying to set it up online

Im using a quickstart page with only one post and deploying with this theme doesn't show the styling (at least in github pages) Using the local hugo server works fine. I also tried using another theme 'ananke' and it shows styling.

https://snttgr.github.io SntTGR/SntTGR.github.io@2c0814e9604deb6f51632e4e429fc8e96bb1a04b image links work! no 404s

Made sure to put the correct url in baseUrl: and inspected the page to make sure the stylesheet correctly referenced the css file, but somehow the styling doesn't work.

Im using the example config .yaml with a few thing commented-out

languageCode: "en-us"
baseUrl: "https://snttgr.github.io"
title: "Anubis"
theme: "anubis"
paginate: 10

#disqusShortname: yourdiscussshortname
#googleAnalytics: UA-123-45
#enableRobotsTXT: true

menu:
  main:
  - identifier: archive
    name: Archive
    title: Archive
    url: /posts/
    weight: 0

params:
  author: "John Doe"
  email: mail@example.org # used for microformats
  avatar: "/images/me.png" # used for microformats
  description: ""
  #images:
  #  - images/og-featured.png # relative path to "static" directory
  #customCSS:
  #  - css/my.css # relative path to "assets" directory (don't use main.css filename)
  #customJS:
  #  - js/main.js # relative path to "assets" directory
  dateFormat: "2006-01-02"
  paginationSinglePost: true
  style: light-without-switcher
  readMore: false
  # utteranc.es support
  #utterancesRepo: ""  # mandatory
  #utterancesTheme: "" # optional
  #utterancesIssue: "" # optional
  #utterancesLabel: "" # optional
#  webmentions:
#    login: hugo-theme-anubis
#    pingback: true

markup:
  goldmark:
    renderer:
      unsafe: true # enable raw HTML in Markdown
Mitrichius commented 3 years ago

Hi! I see an error on your site: Failed to find a valid digest in the 'integrity' attribute for resource .... Seems like the file changed during deploy/git operations because sha256 sum is not matched. And this is most likely due to line endings.

If you are working on Windows, I think we correctly identified the problem.

Check this guide to configure git https://docs.github.com/en/github/using-git/configuring-git-to-handle-line-endings

Then rebuild site, push it and let me know if it works or not.

P.S. Checked Github Pages on my site and it works https://mitrichius.github.io/

SntTGR commented 3 years ago

Yes! that's it!

Added a .gitattributes file in the built repo to prevent this in the future. (although not sure if it's the best approach)

* text=auto

#don't convert css files, leads to checksum failure
*.css binary

thank you!