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

After migrating to Hugo module, can no longer load FontAwesome files #1285

Closed
EspadaV8 opened this issue Oct 16, 2022 · 4 comments
Closed

After migrating to Hugo module, can no longer load FontAwesome files #1285

EspadaV8 opened this issue Oct 16, 2022 · 4 comments
Labels
duplicate This issue or pull request already exists module

Comments

@EspadaV8
Copy link

I have followed the guide on the Docsy site (https://www.docsy.dev/docs/updating/convert-site-to-module/) to switch from a git submodule to a Hugo module, and most things seem to be working, but now I get a 404 when attempting to load any of the FontAwesome files. Checking the mod graph and it looks correct to me

> docker compose exec local hugo mod graph
gitlab.com/xxx/yyy github.com/google/docsy@v0.5.0
gitlab.com/xxx/yyy github.com/google/docsy/dependencies@v0.5.0
github.com/google/docsy/dependencies@v0.5.0 github.com/twbs/bootstrap@v4.6.1+incompatible
github.com/google/docsy/dependencies@v0.5.0 github.com/FortAwesome/Font-Awesome@v0.0.0-20210804190922-7d3d774145ac

The page is just a generic 404 page when attempting to view the file

image

I have commented out the theme line in config.toml and added the module information in

[module]
  proxy = "direct"
  # uncomment line below for temporary local development of module
  # replacements = "github.com/google/docsy -> ../../docsy"
  # [module.hugoVersion]
  #   extended = true
  #   min = "0.73.0"
  [[module.imports]]
    path = "github.com/google/docsy"
    # disable = false
  [[module.imports]]
    path = "github.com/google/docsy/dependencies"
    # disable = false

I think the only major difference is that I'm running Hugo locally via a docker-compose file. Not sure if there is a change there that's needed.

@EspadaV8
Copy link
Author

Done some further testing, and it looks like it is an issue with the v0.5.0 release. Trying 0.2.0, 0.3.0, and 0.4.0 all load correctly, upgrading to 0.5.0 and the fontawesome files are no longer loading.

Checking the output of hugo it seems there are ~15 static files that are not correctly processed

0.4.0

                   | EN   
-------------------+------
  Pages            | 108  
  Paginator pages  |   0  
  Non-page files   |   1  
  Static files     | 110  
  Processed images |   2  
  Aliases          |   0  
  Sitemaps         |   1  
  Cleaned          |   0  

0.5.0

                   | EN   
-------------------+------
  Pages            | 108  
  Paginator pages  |   0  
  Non-page files   |   1  
  Static files     |  95  
  Processed images |   2  
  Aliases          |   0  
  Sitemaps         |   1  
  Cleaned          |   0  

@deining deining added the duplicate This issue or pull request already exists label Oct 17, 2022
@deining
Copy link
Collaborator

deining commented Oct 17, 2022

This is a know issue that was raised in #1281 already. It was addressed with PR #1282 (merged) and PR #1284 (not merged yet).

Even without #1284 in place, you might be able to work around this. Can you try to update your module to HEAD of main:

hugo mod get -u github.com/google/docsy/dependencies@be5da07ecff1247cc6420

Does this cure your problem?

@deining deining added the module label Oct 17, 2022
@EspadaV8
Copy link
Author

Thanks @deining. I tried searching for fontawesome issues, but didn't try with a space. I'll close this issue and wait for the updates to roll through.

@EspadaV8
Copy link
Author

@deining Tried that, and it looks to be working. The number of static files is still lower than in 0.4.0, but higher than with 0.5.0

                   | EN   
-------------------+------
  Pages            | 108  
  Paginator pages  |   0  
  Non-page files   |   1  
  Static files     | 103  
  Processed images |   2  
  Aliases          |   0  
  Sitemaps         |   1  
  Cleaned          |   0  

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists module
Projects
None yet
Development

No branches or pull requests

2 participants