importantimport / lume_theme_shiraha

❄️ Material 3-inspired Lume Blog Theme. [WIP]
https://lume.shiraha.js.org
Do What The F*ck You Want To Public License
11 stars 2 forks source link

Lume themes registry #1

Closed oscarotero closed 6 months ago

oscarotero commented 7 months ago

Hi! I've created a new section in lume.land for themes (https://lume.land/themes/) and would like to add this one :)

Themes are registered in this repository https://github.com/lumeland/themes (themes.json file).

I temporarily saved shiraha in https://github.com/lumeland/themes/blob/main/failing.json because it doesn't work with Lume 2. I can see that you're making changes (and adding a CMS), so when you decide to publish a new version, I will include it in the registry, if you're okay with that :)

Thanks!

kwaa commented 7 months ago

OK. Since I'm in the middle of a complete rewrite, v0.1.0 with Lume 2 support probably won't be released that soon.

kwaa commented 6 months ago

I just released v0.1.0-alpha.0.

https://deno.land/x/lume_theme_shiraha@v0.1.0-alpha.0

oscarotero commented 6 months ago

Great! I just checked it and got this error:

TypeError: Deno.dlopen is not a function
    at dlopen (https://deno.land/x/plug@1.0.0-rc.3/mod.ts:145:15)
    at eventLoopTick (ext:core/01_core.js:168:7)
    at async https://deno.land/x/skia_canvas@0.5.5/src/ffi.ts:966:10

Looks like it needs the --unstable-ffi flag to work. I'll update the themes.json file to include required unstable flags in deno.json file.

oscarotero commented 6 months ago

also, I noted that remote files are not configured. They are defined here: https://github.com/importantimport/lume_theme_shiraha/blob/main/mod.ts#L41 but not added to the Site instance.

kwaa commented 6 months ago

also, I noted that remote files are not configured. They are defined here: main/mod.ts#L41 but not added to the Site instance.

Normally, the order of calls should look like this: lts => templates => pages (and other remote files)

Is there a problem? my test blog: https://github.com/kwaa/blog_next

oscarotero commented 6 months ago

hmm, to me the index.html page is not generated:

imaxe

It's not defined as a remote file.

kwaa commented 6 months ago

hmm, to me the index.html page is not generated:

It looks like everything in the pages is not loading... I'm not quite sure why that is.

oscarotero commented 6 months ago

You can run:

deno run -A https://lume.land/init.ts init

to install the theme (choose "Installl theme > Shiraha"

The theme manifest is here: https://github.com/lumeland/themes/blob/main/themes.json#L143-L154

The array src are files that will be copied directly (not remote files).

oscarotero commented 6 months ago

I think the problem is in _config.ts the shiraha plugin is not used, but the init script does.

kwaa commented 6 months ago

Looks like https://lume.land/init.ts doesn't set up the jsx correctly, LTS uses a customized hono_jsx plugin.

https://github.com/importantimport/lume_theme_shiraha#usage

Even setting it up correctly won't fix the bug though.

kwaa commented 6 months ago

I think the problem is in _config.ts the shiraha plugin is not used, but the init script does.

I think this _config.ts only applies to the example site.

Everything works fine on my test blog (https://github.com/kwaa/blog_next), which is weird.

kwaa commented 6 months ago

I found the reason!

The articles folder needs this data: https://github.com/kwaa/blog_next/blob/main/posts/articles/_data.yml

oscarotero commented 6 months ago

Okay, I just added support for more Deno configuration options when installing a theme: https://github.com/lumeland/themes/blob/main/themes.json#L153-L162

And I sent you a PR to fix the articles/_data.yml issue. Once merged, the theme should be installed correctly.

oscarotero commented 6 months ago

The theme is available in Lume site: https://lume.land/theme/shiraha/ and works like a champ. Thank you!