• I'm at a loss.

    I'm trying to do my first theme. I started with a clone of vanilla and I'm trying to alter the topic template. Nothing seems to take. On a lark, I copy the lavendar version into the same place. Still no change. Switch to laendar - I see what I should see. Switch back to mine and I see the normal Vanilla theme page.

    I'm using nodebb dev starts as precaution...

    In frustration I even stuck gibberish in a number of places just on chance something was looping odd. Kinda at a loss here.

    My limited understanding of the theming here is "replace the file in your theme to override"

    Can someone point out something obvious?


  • Just to be sure, are you restarting NodeBB after changing the active theme?


  • Yeah, I'm doing a full on stop and nodebb dev.

    I just tried replacing the topic.tpl with a file containing an H1 one liner and I'm still getting the vanilla output.

    boggle


  • Meanwhile, I make the same changes I was making to the Lavender theme and it works as desired.

    Gah.

  • Plugin & Theme Dev Anime Lovers GNU/Linux

    Greetings @Shard.

    • Make sure you are using the Vanilla theme.
    • Make sure you are editing from /node_modules/nodebb-theme-vanilla/*.
    • NOTE: DO NOT EDIT FROM: /public/templates/*. THIS IS THE COMPILED OUTPUT FROM THE ABOVE DIRECTORY!

    You will need to use ./nodebb watch. You will need to install supervisor npm install supervisor -g

    Do not use dev for theming because its not really what its intended for in my opinion. You use watch to see changes live while the server restarts on every little thing you save. This is how I theme.

    When you are satisfied with the changes just run the server ./nodebb start don't forget to do this. I usually take breaks and if my internet goes out I'm screwed because my site goes down lol.


  • I sorted out the issue. The problem appears to be the lack of a "themes" key in my themes.json.

    Still other issues, but that seems to have been the big one.


  • @Shard said:

    I sorted out the issue. The problem appears to be the lack of a "themes" key in my themes.json.

    Still other issues, but that seems to have been the big one.

    Such as now none of the styling works...


  • Pebkac, as expected. 🙂

    All sorted.

    I am a little puzzled about the need for the templates entry. the docs I saw say it is assumed and then falls back to vanilla, but that doesn't seem to be what actually happened....


  • @Shard

    Maybe this will help:

    https://community.nodebb.org/topic/2382/copying-vanilla-theme/11

    The gist of it is just add "templates": "templates" to your themes theme.json file.


  • @mootzville Yeah, that's what I discovered.

    https://docs.nodebb.org/en/latest/themes/create.html Seems to be a bit out of date.

    templates: (Optional) A system path (relative to your plugin’s root directory) to the folder containing template files. If not specified, NodeBB will search for the “templates” directory, and then simply fall back to using vanilla’s template files.

    Normal learning curve stuff for me, Bump into all the oddly/un/badly documented assumptions that make perfectly good sense when you've been working with it for a while.

  • Admin

    I think as of latest (0.5.1) it does fall back. Likely the documentation has been updated ahead of time while this change hasn't shown up in latest stable


  • I'm using 0.5.1, FWIW.

Suggested Topics

  • 1
  • 2
  • 2
  • 1
  • 21
| |