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

Hugo fails to build site if page has a link #5

Closed
hiway opened this issue Oct 8, 2022 · 2 comments
Closed

Hugo fails to build site if page has a link #5

hiway opened this issue Oct 8, 2022 · 2 comments

Comments

@hiway
Copy link

hiway commented Oct 8, 2022

Thank you for sharing your code.

I installed via pip3 , then uninstalled and installed development version via make after cloning the repo. Encountered the same issue with both.

Created two pages in the Obsidian vault:

index.md

This is a [[test]]

test.md

Only a test.

After running python3 -m obsidian_to_hugo ..., I see these two files created in the Hugo content folder:

index.md

This is a [test]({{< ref "test" >}})

test.md

Only a test.

When I run hugo, I get the following error:

hugo server -D --disableFastRender
Start building sites … 
hugo v0.104.3+extended darwin/arm64 BuildDate=unknown
ERROR 2022/10/09 02:14:41 [en] REF_NOT_FOUND: Ref "test": "/---/content/index.md:1:18": page not found
Error: Error building site: logged 1 error(s)

I have no idea what I'm doing wrong as I'm new to Obsidian, Hugo and this script.

I have tried "PaperMod" and "etch" themes, no difference.

Any help is appreciated :)

@devidw
Copy link
Owner

devidw commented Oct 8, 2022

Hey @hiway

In Hugo index files are prefixed with a leading underscore:

When you rename your obsidian/index.md into obsidian/_index.md your Hugo build should pass without any errors.

@hiway
Copy link
Author

hiway commented Oct 9, 2022

Thank you! I appreciate you taking the time to help a newbie :)

Closing the issue as it is resolved.

@hiway hiway closed this as completed Oct 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants