.txt files (and other non-.md extensions) as pages

Maybe I don’t quite understand Hugo’s logic here…

But all i want Hugo to do is transform my folder full of text files into pages.

From my testing, i believe Hugo only reads .md files, and considers .txt files as a non-page. Is there anyway to tell it to take in .txt files?

From my understanding, only markdown (and other markups) and html are considered…

Am i wrong?

The documentation states the supported content formats:

1 Like

Yeah, I’ve read that before, probably the most related help page, thanks…

But is there truly no way / method to force Hugo to take in other file extensions and treat them as markup or html?

I see there is outputFormats, but why no inputFormats?

It would be nice to say…

inputFormat:
txtPage:
mediaType
- text/plain
suffix:
- txt

input:
page:
- HTML
- txtPage

…or something

or maybe some way through front matter in a separate file (in the data folder)?

—-
file: testFileName
isPage: true
—-

i sorta understand that against Hugo’s grain, but I really want to keep front matter separate from content.

welp, i still dont see any direct solution… other than renaming all of the .txt files to .md…

even worse, it seems most themes require “basic front matter” to even function!

it would be nice to just have some default values… like the file-name and file-creation-date…

that way we simply publish our plain text files! isn’t that what most people want?

Time and priority.

whoa, i didn’t realize this is basically a one-man public project. now i just feel bad! it’s no prob. do your thing.

I just feel there’s just a gap of accessibility. Linux people would have no problem, but for the rest of us… it means searching for scripts, tutorials, ‘n basically learning unix workflows (if using web servers). :frowning: …but you did provide a few warnings about this…

I guess a set-up n’ config GUI is all that’s needed, for us simple folk.

But once that gap is overcome… you’ll dominate! :slight_smile:

You are right that there are missing pieces re input formats (also multiple rendering formats per input document, e.g. both HTML and LaTex etc. from Goldmark). One thing is the implementation cost – but it’s also a little about getting it (half) right. Many people use Hugo now, so adding something half baked is not a great idea. Changing/removing stuff is almost as hard as adding it so it might as well be (mostly) right.

:pray:

Mmmm, I beleive ya. Def not easy to work on something that everyone uses. Gotta make every step careful; Gotta do it right the first time. You’ve got that Apple level of craftsmanship ‘n’ judgement! :slight_smile:

…perhaps I did talk before thinking… my bad! It’s in my nature to dream out loud…
.
.
.
. :frowning:

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