Publish web pages for local use

Greetings from Colombia.
I translated 3 documents and brought them to Hugo using the Book theme, which features a list of links from the documents on the left, a Table of Contents on the right, and all the content in the middle.

The presentation under Hugo is excellent, but if I try to use the html pages generated without the help of hugo, that is, independent (content of the resulting public folder). The result is very different and deficient.

The idea is to use the index.html file at the root of public folder.
Contents of the config.toml file:

baseURL = ''
languageCode = 'es-es'
title = 'Manual de Usuario'
theme = 'book'
  # (Optional, default light) Sets color theme: light, dark or auto.
  # Theme 'auto' switches between dark and light modes based on browser/os preferences
  BookTheme = 'dark'

  # (Optional, default none) Set the path to a logo for the book. If the logo is
  # /static/logo.png then the path would be 'logo.png'
  BookLogo = 'logg.gif'

The pages are for making a local help manual on my computer.

Good morning:
I followed your directives and it did improve rendering. Thank you. My new config.toml:

baseURL = '/' 
uglyURLs = true
relativeURLs = true
languageCode = 'es-es'
title = 'Manual de Usuario'
theme = 'book'

 unsafe = true

  BookTheme = 'dark'
  BookLogo = 'logg.gif'

However, the links that lead from one page to another, (not the TOC) but those that lead to a specific topic on another page do not work. The browser presents file not found “error”.

[Idiom preferences](../preferences/#user-language) bla bla bla
bla bla bla ...[customize sessions](../sessions/#login-session) 

Is it a bad link assignment?
Both preferences and sessions files are located in content/docs project’s subfolder.

I appreciate any suggestion in advance :¬)

I suppose that you need _URL_s here, i.e something with a protocol like “http:”. A relative path like in your example will probably not work (as demonstrated by your experience). You might want to use shortcodes like ref or relref or something like that.

Thanks for your reply:
The truth is that I don’t have much experience in HUGO, I’m going to review the shortcodes, and watch the related video on Youtube of Giraffe Academy (Mike Dane) again.
I’ll see what I can do, and I’ll tell you later:
Have a good day :+1:

@chrillek is correct. Use the relref shortcode in your markdown. It looks for a page, then returns a relative URL, factoring in the settings in your site configuration (baseURL, uglyURLs, etc.).

Using the theme’s sample content:

[Migrate from Jekyll]({{< relref "/posts/migrate-from-jekyll ">}})

It turned out great, not only it fixed that problem, but as a bonus HUGO! helped me discover broken links, and good use of RegEx, helped me change over 200 links.

Thanks again. From :colombia:

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.