Documentation on making changes to core?

I’ve built ghost and ghost-admin from source and wondering if there’s any documentation that would aid in familiarizing ones self with the scope of making changes to the core.

Specifically I’m looking to:

  • Add two new items to the database (similar to Twitter URL in terms of data type, etc)
  • Add two new text inputs in the Post Settings slideout panel
  • Extend the API and/or Ember capabilities so those two items become accessible via .hbs templates for theming

That’s the simple version. I’m guessing in order to fully support a change like this there are many many places that would require changes (e.g. ES Lint testing, db migration).

So is this just try and become as familiar as you can and use the server tail to discover errors or is there documentation to guide this process?


Getting familiar with a codebase works differently for people. My method to quickly familiarize with the codebase is searching for similar features (adding new field) that were already done previously.

In your case if you want to add a field to post one feature I could think of is canonical URL support that was added lately ( Sample changes on the server side:

Would suggest working your way from migrations, to handling in model, then all the way to serializers (this filters what API accepts and responds with). For me it works best if I stop with breakpoins in different places that are modified and figure how it effects the output.

And the changes that went into making this new field happen on the Admin part can be found here:

Would also start working from mapping a new field in the model layer - app/models/post.js and then work it’s way into views :slight_smile:

Hope this helps as a starter!

If you are thinking of adding to the posts table one thing to be aware of is that the table is very close to the MySQL maximum row size, we don’t plan on adding anything further there until we have a better solution for attaching data to posts.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.