Comments (11)
Here's the successfully working version using git submodules, rather than hugo submodules.
# Create a new Hugo site
hugo new site gitsubmodule3
# Navigate to the newly created site's directory
cd gitsubmodule3
# Initialize git in the directory
git init
# Add the git submodule for the theme
git submodule add -b stable https://github.com/jpanther/congo.git themes/congo
# Remove the hugo.toml file
rm hugo.toml
# Copy the theme's config files to the site's config directory
mkdir -p config/_default
cp themes/congo/config/_default/*.toml config/_default
# Add the theme name to the config file
echo 'theme = "congo"' > temp
cat config/_default/config.toml >> temp
mv temp config/_default/config.toml
# Create a new post
hugo new posts/_index.md
# Set the post to not be a draft and add a title
sed -i '' 's/draft: true/draft: false/g' content/posts/_index.md
echo -e "\n\n# Home" >> content/posts/_index.md
# Start the Hugo server
hugo server
And the corresponding zsh one liner
hugo new site gitsubmodule5 && cd gitsubmodule5 && git init && git submodule add -b stable https://github.com/jpanther/congo.git themes/congo && rm hugo.toml && mkdir -p config/_default && cp themes/congo/config/_default/*.toml config/_default && echo 'theme = "congo"' > temp && cat config/_default/config.toml >> temp && mv temp config/_default/config.toml && hugo new posts/_index.md && sed -i '' 's/draft: true/draft: false/g' content/posts/_index.md && echo -e "\n\n# Home" >> content/posts/_index.md && hugo server
from congo.
Hm. As an update, I tried this on my other machine and was unable to replicate the issue.
I used this command on my other machine:
arch -arm64 hugo new site retesthugomod && cd retesthugomod && arch -arm64 hugo mod init retesthugomod && arch -arm64 go mod tidy && mkdir -p config/_default && echo "[[imports]]\npath = \"github.com/jpanther/congo/v2\"" > config/_default/module.toml && curl -L --output config/_default/config.toml https://raw.githubusercontent.com/jpanther/congo/stable/config/_default/config.toml && curl -L --output config/_default/languages.en.toml https://raw.githubusercontent.com/jpanther/congo/stable/config/_default/languages.en.toml && curl -L --output config/_default/markup.toml https://raw.githubusercontent.com/jpanther/congo/stable/config/_default/markup.toml && curl -L --output config/_default/menus.en.toml https://raw.githubusercontent.com/jpanther/congo/stable/config/_default/menus.en.toml && curl -L --output config/_default/params.toml https://raw.githubusercontent.com/jpanther/congo/stable/config/_default/params.toml && rm hugo.toml && arch -arm64 hugo new posts/_index.md && sed -i '' 's/draft: true/draft: false/g' content/posts/_index.md && echo -e "\n\n# Home" >> content/posts/_index.md && arch -arm64 hugo server
Any suggestions as to how to debug the issue?
from congo.
Thanks for the issue report, @TikkunCreation. I wonder if this is because Hugo is caching the module and so it's not updating it correctly when you re-run your script. Have you tried using the command hugo mod clean
instead of tidy
to see if this helps?
from congo.
Thanks for the issue report, @TikkunCreation. I wonder if this is because Hugo is caching the module and so it's not updating it correctly when you re-run your script. Have you tried using the command
hugo mod clean
instead oftidy
to see if this helps?
You are 100% correct. Doing the following fixed the issue (and as expected it fixed it across all my congo sites, not just the one in the current directory):
hugo mod clean
hugo serve
I'm going to leave this issue open in case you want to add anything to the docs, or any kind of fix to detect when this is happening. Feel free to close it at your preference.
from congo.
This issue has been automatically marked as stale because it has not had any recent activity.
If you are still experiencing this issue, please review the issue history and add a reply with any requested and/or additional information in order to keep the issue open.
This issue will automactically close in 14 days if no further activity occurs.
from congo.
This issue recurs frequently. It is always solvable with hugo mod clean
It may be good to add that to the docs somewhere.
from congo.
This issue has been automatically marked as stale because it has not had any recent activity.
If you are still experiencing this issue, please review the issue history and add a reply with any requested and/or additional information in order to keep the issue open.
This issue will automatically close in 14 days if no further activity occurs.
from congo.
Where would you look for this information in the docs if you had this issue? Would it make sense to add a comment in the installation section? Or does it make more sense in deployment? It is briefly referenced in the upgrade guide but it's not the most obvious place to find it if you're coming to Congo as a new user.
from congo.
I'm not sure, I'd likely:
google 'hugo WARN found no layout file for "html" for kind "taxonomy": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.'
google 'hugo congo WARN found no layout file for "html" for kind "taxonomy": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.'
(without quotes)
And hope that it comes up from that. With issues I generally don't browse in the docs, I'll trust that a keyword search will surface it
from congo.
That's what I would do too. I think the issue here is largely to do with how the hugo mod
command works as really it should be cleaning up as it goes if it ends up causing issues like this.
from congo.
I've now made an update to the docs to reference the hugo mod clean
command (29f7bb8) so I'm going to close off this issue.
from congo.
Related Issues (20)
- Problem when creating new site from RStudio with blogdown R package HOT 3
- Cannot access page context when using extend-head feature HOT 4
- Changing author name HOT 1
- Fails to run with "can't evaluate field Site in type *page.siteWrapper" on Hugo v0.119.0 HOT 5
- Language switcher not working HOT 4
- Getting 'Cannot read properties of null (reading 'setAttribute')' error in the console HOT 1
- Empty block when locale switcher is hidden HOT 5
- Extra space after link HOT 1
- Hugo 0.120.0 causes escaped HTML to appar around the reading time for each post HOT 3
- Hugo v0.120.0 deprecates the author key in site configuration HOT 1
- Additional space added before links HOT 1
- Error: error building site: render: render of "404" failed: HOT 6
- Chart in dark mode HOT 3
- Migrate site manifest and favicons to Hugo Pipes HOT 2
- Remove code repetition in header layouts
- function "page" not defined HOT 3
- 🐛 Badge shortcode injects linebreaks, precluding aligning several of them horizontally. HOT 6
- Add icon for Google Scholar
- Robots `noindex` meta tag output in multilingual site HOT 3
- 🐛 No scrolling for Table of Contents if its too large
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from congo.