Customizing my code repo?

Unsolved General Discussion
  • Okay, I've got a new pile of questions I'd like to ask.

    I have a working NodeBB installation on OpenShift using this guide as recommended, and I'd like to customize it a little bit using CSS, JS and custom pages.
    I know I can do all of those things live on the ACP, wich is nice, but only seems useful when I want to change very little, for more complex stuff this would be very cluttered and unproductive.

    Where could I put custom CSS on my local repo?
    I created a custom page on my live version, but could I add and customize one directly in source?

    And the most important one, how do I make those changes persistent through version upgrades?
    I'm a bit of a git noob, and the only change I made to my repo so far are desired plugins in the package.json, wich are gone once I pull a new NodeBB version. I wouldn't want that to happen if I customize my repo further.

  • @N-kay You'll want to clone the theme you're currently using, rename it, and edit that.

  • And custom pages?

  • @N-kay Same thing, you'll want to clone an existing plugin repo that has custom pages and edit them/add more. nodebb-plugin-kitchen-sink is one I use often.

  • Still trying to wrap my head around this concept, maybe I'm just stupid. Please bare with me here.

    Currently, I'm dealing with 4 git repos.
    The OpenShift and NodeBB repos on GitHub, wich I pull into my local repo, wich I then push into my 'live' repo on OpenShift.

    My live repo differs from my local repo, because it has file uploads(logo, favicon, user uploads) and probably templates and widgets I created through the ACP, right?. Or are those even part of the repo?
    Should I pull/copy these changes into my local repo? Or create a new repo for them? Or just leave those there?

    And for new themes/custom pages(/widgets?), the idea is to make a new (split or all in one? )git repo, and pull it directly into my local repo? Or as a dependency in the package.json?

    Could you maybe give me an example of what an ideal setup would look like?

    This is so confusing 😐

  • You could definitely include them in the same repo. In your local, put the renamed repos in your nodebb/node_modules folder. (make sure you change the name in their package.json and plugin.json too) Then put an exclusion in your .gitignore for that directory, example !node_modules/nodebb-theme-my-persona then git add node_modules/nodebb-theme-my-persona and when you push your changes, it should include the plugin.

    What you set in the ACP is saved in the database, so it should persist. For user uploads, you should be using an external service like imgur, or the uploads may not persist between pushes.

Suggested Topics

  • 0 Votes
    10 Posts

    @phenomlab Doesn't hurt.

    If you execute .ready() and the page is already ready, then it will just fire the callback immediately.

  • 0 Votes
    1 Posts

    I can successfully connect and work with a local instance of mongodb.
    However, when from local dev machine I change the mongodb connection string to point to Mongodb Atlas I get the following error:

    not authorized on admin to execute command { create: "", capped: true, size: 5242880 } {"name":"MongoError","ok":0,"errmsg":"not authorized on admin to execute command { create: \"\", capped: true, size: 5242880 }","code":8000,"codeName":"AtlasError"}

    The database is hosted on Mongodb Atlas cluster.

    The user is assigned a role: atlasAdmin @ admin.

    { "url": "http://localhost:4567", "secret": "somesecret", "database": "mongo", "mongo": { "host": "", "port": 27017, "username": "", "password": "", "database": "", "uri": "mongodb+srv://<user>:<password>" }, "port": "4567" }

    MongoDb npm package version: 3.2.3

    MongoDb version on Atlas: 4.0.8

    enter image description here

  • Conversion tracking code

    General Discussion
    1 Votes
    9 Posts

    @baris : Thanks !
    I was still running nodebb v1.6.1 so i was unable to find the place you mentioned in the ACP.
    But after a (difficult) upgrade to v1.7.1, i can now clearly see it :

    0_1512482872773_Capture d’écran 2017-12-05 à 14.38.08.png

    That should do the job ! 🙂

  • 1 Votes
    2 Posts

    Here you go!

    howto: inject hidden data into composer?

    This is on master now, here is how it works. You can edit composer.tpl and add a new input field. Then you will use the new hook action:composer.submit. // i...


    NodeBB Community (

    This should get you started. You'll need to edit the composer.tpl, or inject html at composer load, checking if the post is a new topic.

  • Home Page custom

    General Discussion
    1 Votes
    4 Posts

    That's the Majestic theme... Well, an old version of it. Not really for sale any more, there's a v6 (possibly) coming at some point. The githubs here

    But, no files.