[hugo-orbit-theme] Load content from md file

I’m using the hugo-orbit-theme and I’d like to load the content from an external md file instead of having it all inside the config.toml. Is that possible?

Welcome to Hugo!

Are you looking to have a single page? Or multiple pages, one for each resume?

Thanks!

A single page. Writing the content in one line it’s very confusing, especially when using markdown. That’s why I want to have it in a file.

You can implement a content/_index.md then access it via {{ .Content }} in your index.html.

Edit: and it means you’d need to have to hack the theme as @kaushalmodi mentions directly. You might need to pull some from config.toml params, and have a section that is coming from the .md file, if my understanding is correct. Perhaps the main section could be from the .md file and you pull the sidebar in from the config.

I think there’s a disconnect here… I think that the OP wants to load the values of all Markdown-containing params in config.toml (as needed by that theme – example) from separate files… Is that right?

If so, I don’t know think you can populate params in the config file from external files.

I think the best bet would be to hack the theme directly.


You can try the triple-quote multi-line string TOML syntax (not tested)… So, instead of:

summary = "**Summarise your career here** lorem ipsum dolor sit amet, consectetuer adipiscing elit. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu."

Do:

summary = """**Summarise your career here** 
lorem ipsum dolor sit amet, consectetuer adipiscing elit. 
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. 
Aenean commodo ligula eget dolor aenean massa. 

Cum sociis natoque penatibus et magnis dis parturient 
montes, nascetur ridiculus mus.

Donec quam felis, ultricies nec, 
pellentesque eu."""
2 Likes

The triple-quote does work. However, I’ll try to hack the theme to see if I can load it from an external file.