Where do I find ghost-admin in Production version?


I am running a production version, but I have to modified markdown editor to fit my personal needs.
I know we are expected to use local/dev version, but my blog is running and you guys will NOT merge my PR.

This is the file I may need to modify:

It should be in /var/www/ghost/versions/1.24.8/core/clients, but there is no such folder in production.

Would you please tell me the correct path?
Thank you

I have modified markdown-converter.js in ghost-core to add markdown-it-container.


@andy1247008998 production versions only include the built version of the admin. If you want to modify it you will need to set up your local development version of Ghost, make the changes you want and then build a new release.



Thank you.

Will you add markdown-it-container to Ghost-core?
It’s an official plugin written by Vitaly Puzrin.

I know you may worry about casually adding one plugin will result in 1000 more plugins, but we can offer a switch panel in Ghost-Admin.

Further, we DO need a plugin system.

We won’t be adding any other markdown-it plugins to core.

The new Koenig editor will eventually have the ability to add custom cards and to override core cards so you could create your own markdown card that has all the markdown-it plugins you want in it. Or you could create your own “container” cards that mimic the functionality you want from markdown-it-container without having to do all of your editing inside of a markdown card.

I don’t think Koeing editor is a good idea for expert markdown writers.
We need two panels, one for writing, the other for preview, so I don’t believe changing an editor would do anything for good. Your company should have a meeting talking about abandon Koeing editor, seriously.

Since we are talking about extending core functions, and I don’t want to pollute your ghost-core either, let’s look at what your staff has done: add markdown-it-footnote, markdown-it-lazy-headers, and markdown-it-mark into your core. There is even a workaround for your legacy Showdown parser. You may think more about what is pollution and what is the privilege.

The best way to solve this problem is simple and stupid => a robust plugin system with plenty of hooks.
Then users will be able to use ALL npm packages in www.npmjs.com
When I search markdown-it-container, and click install, it will appear in my plugin list.

That’s similar to how for example NodeBB’s successful Node.js’ npm plugin system works, however with currently 899 NodeBB-specific—rather than general—packages (741 plugins, 131 themes…), all available on npm, mostly developed by the user community.

@Kevin I have done these things:

  1. git clone Ghost-Admin
  2. yarn install
  3. ember build (to verify it works)
  4. edit app/utils/format-markdown.js (just a few line)
  5. ember build again (Built project successfully. Stored in “dist/”.)

Now I am looking for ghost.min-6898dae0b1632b7fa1f7dcf1a7ff2543.js but found nothing.
dist/assets/ghost.js won’t work for me.

Thank you

ember build “–environment=production” “–silent”

Is html_sanitize in Ghost-Admin necessary?

I installed markdown-it-container to make my custom block.
It replaces :::: flexbox box to <div style="width:100%;display:flex;flex-flow:row wrap" id="box"></div>
This line of code removes flex-flow:row wrap so I can’t see the expected result in preview.
Since the editor is able to use arbitrary HTML code, I believe this line is not necessary.

html_sanitize is there to prevent easy privilege escalation attacks by other authors and to protect against JS/CSS breaking the admin panel and making posts un-openable.

Of course you’re free to remove it at your own risk if you’re creating your own custom build.

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