/ Linux

Ghost blog

Syntaxic coloration and lines numbers for Casper

In Ghost admin panel, go to Code injection, here's header

<!-- https://cdnjs.com/libraries/prism -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.6.0/themes/prism-twilight.css">
<!-- https://github.com/PrismJS/prism-themes -->
<!-- <link rel="stylesheet" href="https://github.com/PrismJS/prism-themes/blob/master/themes/prism-atom-dark.css"> -->

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.6.0/plugins/line-numbers/prism-line-numbers.min.css">
<style>
    pre[class*=language-] {
        margin: 1.75em 0;
    }
</style>

And here's footer

<!--
<script>
    $(function() {
        $('code[class*=language-]').addClass('line-numbers');
    });
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.6.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
-->
<!-- Default include : javascript python ruby powershell bash batch c latex -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.6.0/prism.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.6.0/components/prism-json.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.6.0/components/prism-yaml.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.6.0/components/prism-ini.min.js"></script>

You can get more syntaxes adding <script> pointing to the .js listed here

Ghost 1.0 configuration

Read this doc, from 1.0 onward settings like url and mail can be set via environment variables, which is mandatory for Ghost Docker container.

Mail configuration

Gandi example

{
    mail: {
        transport: 'SMTP',
        options: {
            host: "mail.gandi.net",
            secureConnection: true,
            port: 465,
            auth: {
                user: 'user@home.com',
                pass: 'passworooordooorod'
            }
        }
    },
}
Ghost blog
Share this