lumeland / theme-simple-wiki

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

Which is the correct way to get started? #7

Closed thdoan closed 1 week ago

thdoan commented 1 week ago

If you use deno run -A https://lume.land/init.ts to set up a project, there is an option for the Simple Wiki theme. However, the generated _config.ts file is different from the one in this repo. Compare...

_config.ts generated by init.ts:

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

const site = lume();

site.use(wiki());

export default site;

_config.ts in this repo:

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

const site = lume({
  src: "./src",
});
site.use(notes());

export default site;

Which version should I use? The documentation can be improved to clarify this matter.

oscarotero commented 1 week ago

You should use the _config.ts file generated by the init command.

The _config.ts file in this repository is different because it's in the same directory than the theme. That's why the theme is loaded from the ./mod.ts file (relative url) instead of wiki/mod.ts (absolute url defined in the import maps).

thdoan commented 1 week ago

Thanks for the explanation. I found out by trial and error I still need to copy over the files inside _includes from this repo if I wanted to override the default theme since the init command didn't generate any for me.

I'm going to close this issue, but hope you have a quick solution to this question that I posted:

https://github.com/lumeland/lume/discussions/627

oscarotero commented 1 week ago

If you want to make big changes in this theme, I recommend to clone this repo and edit the files, instead of importing it remotely.