nusserstudios / tailbliss

TailBliss is a Hugo Starter theme built on TailwindCSS 3, and Alpine.JS.
https://tailbliss.netlify.app/
Apache License 2.0
289 stars 134 forks source link

Can't access new HTML file created in the layouts folder #97

Closed AlexandreLemoine40 closed 1 year ago

AlexandreLemoine40 commented 1 year ago

I created a new HTML static file info.html. I want it to be accessible at /info/ Here's the content of the file

{{ define "main" }}
<main>
    <header class="mb-4 bg-indigo-600">
        <span class="py-96">
            <h1 class="py-16 text-5xl font-black text-center text-white capitalize">
                Calculateur de 1 RM
            </h1>
        </span>
    </header>
    <div class="max-w-4xl mx-auto mt-8 mb-2">
        <div class="px-6">
            <label for="poids">Poids</label>
            <input name="poids" id="poids" type="number">
            <label for="repetitions"></label>
            <input name="repetitions" id="repetitions" type="number">
            <button id="calculer">Calculer</button>
        </div>
    </div>
    <!-- " {{.Content}}" pulls from the markdown content of the corresponding _index.md -->
    <div class="max-w-2xl px-6 pt-6 pb-16 mx-auto prose dark:prose-invert dark:text-white">
        {{.Content}}
    </div>
</main>
{{ end }}

But when I launch hugo server there's no new page generated image

Layouts folder content : image

I'm not using TailbLiss as a theme but it is the root of my hugo site.

If there is a way to make new HTML pages accessible right after the / let me know it would help me a lot, thanks.

nusserstudios commented 1 year ago

It needs to be referenced in your front matter like this: type: "info" layout: infolayout"

You'll also need an info.md in /content/pages or /content/wherever-you-want.

AlexandreLemoine40 commented 1 year ago

Tanks a lot

nusserstudios commented 1 year ago

infolayout.html in layouts, in a folder call info, then make an info.md somewhere in content. Make sense? This really isn't an issue, though, so I'm closing this.