lumeland / theme-simple-wiki

Lume theme to create a wiki to store your notes
https://lumeland.github.io/theme-simple-wiki/
MIT License
17 stars 5 forks source link

How to customize the build folder? #10

Closed ooker777 closed 2 months ago

ooker777 commented 2 months ago

For mysterious reason GitHub Page doesn't recognize folders whose names have a dash at the beginning. Therefore it cannot read _site. Is there a way to customize the build folder?

oscarotero commented 2 months ago

Github Pages are published in a subdirectory, like https://username.github.io/repository/. You have to specify the final location of your site, and the theme automatically modifies all links to insert the /repository folder at the beginning of the URL.

For example:

const site = lume({
    location: new URL("https://username.github.io/repository"),
});

site.use(wiki());

export site;

Alternatively, you can pass the location to the build script:

deno task build --location=https://username.github.io/repository
ooker777 commented 2 months ago

I'm not sure how that will solve the problem? I follow your advice and it doesn't work. Can you take a look at this repo and tell me what's wrong? The _config.ts file:

import lume from "lume/mod.ts";
import wiki from "wiki/mod.ts";

const site = lume({
  location: new URL("https://quacau-thesphere.github.io/GW-vat-ly-an-du-trong-triet-hoc"),
});

site.use(wiki());

export default site;
oscarotero commented 2 months ago

Ups, sorry. I misunderstood your initial comment. Yes, GitHub ignores the folders starting with _ (I think it's inherited from Jekyll).

The best way to use GitHub pages is using the GitHub Actions method. You have the complete instructions here: https://lume.land/docs/advanced/deployment/#github-pages

ooker777 commented 2 months ago

I didn't know that page, thanks. You can also bypassing Jekyll on GitHub Pages by having a .nojekyll file at the root.

Still, I wonder why Lume picks the _site as the build folder? Can I change it?

oscarotero commented 2 months ago

You can change the dest folder: https://lume.land/docs/configuration/config-file/#dest