[solved] Content is in Asciidoc, but _index.md isn't

Hi! I’m a Hugo newbie building a Documentation website in Asciidoc, and loving it.

I am not sure if my question is a Hugo question, or a “Learn” theme question (the theme I’m using), but here it goes…

All my content is in Asciidoc, the files have .adoc extension. I installed Asciidoctor and everything works perfectly.

However, I have to make a “chapter” file in each directory, called _index.en.md which is in mark-down, not Asciidoc. This includes simple front matter.

Is there any way to have this in .adoc format also? It’s not difficult for me, but I’m trying to involve the open-source community around that project to contribute. And it is a bit cumbersome to ask people to learn a second syntax just for that…

http://docs.suitecrm.com

Thanks!

" _index.en.adoc" should work.

1 Like

I swear I had tried it before, and it didn’t work… but I was probably being daft, I must have had some other detail wrong and I assumed it was because .adoc format wasn’t supported.

Sorry about that. Thanks for your help, it’s working fine now.

Fingers crossed, I have a big demo of all this on Monday. Let me tell you, partial rebuilds and live reload look very amazing on a demo! Great work you’ve done here, thanks!

Thanks, and I agree – it’s great for demos, but also really useful for getting stuff done.

Also note the --navigateToChanged flag.

1 Like

Also note the --navigateToChanged flag.

That. Is. Incredibly. Cool. I didn’t know about that!

Forget getting work done, I’m just going to play with live reloads that navigate to changed content all night. :slight_smile:

2 Likes

Sorry to come back to this, but could there be any special behaviour for the main _index.en.adoc living in /content?

When I changed that file from .md to .adoc, I started seeing a message on my homepage instructing me on how to start building my site. I investigated, and it’s my theme’s welcome message, because it’s testing content like this:

{{if .Site.Home.Content }} 
{{.Site.Home.Content}}	
{{else}} 
       <h1>Customize your own home page</h1>
       (etc...)

Any reason why _index.en.md is correctly recognized as Home page content, but _index.en.adoc isn’t?

EDIT: just to be clear, this change from .md to .adoc worked perfectly in the rest of my site, through all the different sub-directories.

No, but it sounds like a bug. Could you create a GitHub issue?

Sure, here it is

Just for reference, in case anybody comes here from a search engine, this is addressed in Hugo 0.33 (has tests for this situation), but wasn’t really requiring a fix.

The real problem was that the files had just frontmatter, but no content, due to some handling made by the Theme.