# Generate HTML for offline viewing

**URL:** <https://discourse.gohugo.io/t/generate-html-for-offline-viewing/37604>\
**Category:** support\
**Created:** [March 11, 2022, 12:15pm UTC](https://discourse.gohugo.io/t/generate-html-for-offline-viewing/37604 "2022-03-11T12:15:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Codeberg-AsGithubAlt](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/codeberg-asgithubalt/32/16467_2.png) [@Codeberg-AsGithubAlt](https://discourse.gohugo.io/u/Codeberg-AsGithubAlt)\
**Post date:** [March 11, 2022, 12:15pm UTC](https://discourse.gohugo.io/t/generate-html-for-offline-viewing/37604/1 "2022-03-11T12:15:47Z")

</div>

I am new to hugo.

I do not want a website or blog. I do not want to run a server. I need HTML files generated for offline use. This IMHO means I access the files via `file://` protocoll and the links inside that HTML files need to work.

Somebody told me these links could be named as “ugly urls”?  
And the term “theme” comes also up in that case. I do not understand why themes are relevant here. My goal is about content not presentation - two very separated things, even in the web development universe where content is HTML and presentation is CSS (kind of).

My use case is to generate HTML files of all my org-roam-v2 notes. I use ox–hugo to generate md-files from the org-files and feed the md-files to hugo.

I will give you an example

```auto
$ tree content
content
└── posts
    ├── 20220309165918-bar.md
    └── 20220309165928-foo.md

```

Foo has a link to bar which looks in source that way  
`link to bar: [Bar]({{< relref "20220309165918-bar.md" >}}) <br/>`

But `hugo` generates something like this

```auto
$ tree public
public
├── 404.html
├── ananke
├── index.html
├── index.xml
├── posts
│ ├── 20220309165918-bar
│ │ └── index.html
│ ├── 20220309165928-foo
│ │ └── index.html
│ ├── index.html
│ ├── index.xml
│ └── page
│ └── 1
│ └── index.html
...

```

One problem is that foo and bar are separated in subfolders and an `index.html` is generated for each of them. The link becomes

```nohighlight
link to bar: <a href="/posts/20220309165918-bar/">Bar</a> <!-- raw HTML omitted --></p>

```

The problem with that link is that it points to the folder but not to the `index.html` of the bar node.

I would prefer less sub-folders and simply (in my example) two files

```auto
    ├── 20220309165918-bar.html
    └── 20220309165928-foo.html

```

Where the link in Foo to Bar is like this

```nohighlight
link to bar: <a href="/20220309165918-bar.html">Bar</a></p>

```

The link is direct and relative.

Is this possible with hugo?

---

<div class="post-metadata">

**Author:** ![kaushalmodi](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/kaushalmodi/32/2567_2.png) [@kaushalmodi](https://discourse.gohugo.io/u/kaushalmodi)\
**Post date:** [March 11, 2022, 2:39pm UTC](https://discourse.gohugo.io/t/generate-html-for-offline-viewing/37604/2 "2022-03-11T14:39:19Z")

</div>

I believe this is a duplicate of [Where are the HTML files?](https://discourse.gohugo.io/t/where-are-the-html-files/37603), and this might already be answered by [Where are the HTML files? - #4 by jmooring](https://discourse.gohugo.io/t/where-are-the-html-files/37603/4).
