How do I modify or create a theme from scratch?

Hello,

I bought Ghost Pro Creator subscription which allows custom themes.

But I’m not sure how how to even start with modifying Casper theme or creating one from scratch.

I thought I will be able to customize the themes in my Ghost dashboard?

After going through some discussion threads and online tutorials I saw the Git repo mentioned quite a few times but still have no idea what do i do with these files? Suppose i download them, edit a bit and then what? Where do i put them?

I’m under the impression that these tutorials pointing to Git repo are for those who manually download and install Ghost on Ubuntu?

I use Windows 10 and i don’t have any server running, so how do i modify theme or create a new one from scratch?

Hi,

You can start here: https://ghost.org/docs/ and here https://ghost.org/docs/themes/.
The default theme Casper is a good starting point if you want to create your own theme.

From those links it’s still not clear how to start creating custom themes.
I’m using GhostPro which is “the fastest way to get started is to set up a site”, but if i click on its icon there, i am redirected to Ghost(Pro) - Official managed hosting for Ghost which is of no use since i’ve already purchased the subscription.

And in the Settings – Code Injection i am offered to modify only header and footer of the website:

I don’t know what’s the point of allowing users to modify only 2 parts of the website - how about allowing them to modify any aspect of their website?

A good idea might be to go to the rather popular website Google.com and type in the words “create ghost theme from scratch”. Doing so will give you results. This is the first:

Have fun!

4 Likes

You’ve created 3 separate topics on this forum in less than 24 hours in which you discuss how extremely disappointed you are with Ghost, and how much functionality is missing. Please take a moment to consider that using something like Ghost, which is new to you, is going to have a learning curve. The software isn’t perfect, but it’s better than any comparable alternatives that I’m aware of. Coming in and saying things like:

So I bought Ghost Pro Creator subscription, after allowing myself to be influenced by positive reviews and general touting of this platform as “extremely easy to use”. Well, let’s see how easy it is to remove default posts that come with some free theme. As you see, there is no “Delete” button which would allow to get rid of these default posts - I can only “unpublish” them, which means they will still stay in my dashboard as drafts. Whose idea was this? Why would I need a default post in my blog, even as a draft?

i can’t post more than one printscreen here in the discussion post, which is ridiculous.

How difficult is for the devs of this dashboard to allow linking a new page to the desired navigation… So where is the extreme simplicity and ease of use?

May not be the best approach. I would suggest moving forward with an understanding that the Ghost platform, user interface, features and functionality will take a little bit of time to learn. It’s not touted (as far as I’m aware) as an easy and comparable alternative to drag-and-drop website builders like Squarespace or Weebly, or at least it shouldn’t be. If you are looking for that drag-and-drop type functionality to design a theme or create a website from scratch, a website builder made for that purpose might be more suitable.

6 Likes

calm down

Ghost probably isn’t what you want if you want to modify “any aspect” of your site. It’s still possible! Ghost is open source:

But modifying anything isn’t (necessarily) easy. Depending on what exactly you want to do, you might need to modify the Ghost code itself.

The Code Injection settings page explains what it’s for too [emphasis mine]:

Ghost allows you to inject code into the top and bottom of your theme files without editing them.

I’m not personally familiar with Ghost theme development, but the Code Injection settings are for extra code ‘on top’ of any them you’re using.

But like anything else, it can be arbitrarily difficult to make Ghost do anything – it’s intended to be a CMS, and thus it’s going to, at least roughly, follow the general conventions of almost any CMS. If you want to do something that’s not easily supported by a CMS, it’s not going to be easy.

If you have a Ghost Pro subscription, you should have a managed ‘instance’ for your site, i.e. a copy of the Ghost software running on some server somewhere.

It seems like the easiest way for you to get started is to use Ghost’s Starter Theme:

You do need to download or ‘clone’ the Git repo for the above onto your computer.

If you’re using a Windows computer, you might want to look into installing and setting up WSL or the Ubuntu app – the tools that the Ghost Starter Theme uses will probably work much better ‘inside a Unixy environment’ and WSL/Ubuntu are probably the easiest way to do that on a Windows computer.

Once you have downloaded/cloned the starter theme, and installed/setup WSL/Ubuntu (on your Windows computer), then you need to install some tools used by the starter theme:

You’ll need Node, Yarn and Gulp installed globally.

Then you can run yarn to install more tools used by the theme.

When you’re ready to start editing, run yarn dev – that will build the files when you edit them.

When you’re ready to update your site’s theme with your customizations, you need to run yarn zip. That will create a ZIP file under the dist sub-directory (of the Git repo you downloaded/cloned). You will need to upload the ZIP file to your Ghost instance to install it there.

I think maybe part of the confusion you’re running into is because Ghost is ‘easy’ for developers of similar CMS systems – not (necessarily) for people that aren’t already familiar with that. I know a lot of people with Ghost sites hire outside developers to customize their themes and make similar changes to their sites.

But it’s definitely possible to learn enough to do everything yourself. But some of that stuff is going to be a bit ‘outside of the scope’ of this forum, e.g. learning Git, or Node.js, or JavaScript generally. I think you could get a lot of great help here with that stuff anyways, especially if you’re friendly.

I’m curious about the license for the “Starter” theme:

Copyright (c) 2013-2021 Ghost Foundation

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

I’m not a lawyer. Does this mean that any custom theme developed using the Starter theme as a foundation needs to include the same copyright notice and permissions, granting anyone the legal right to then distribute and sell that custom theme to others?

If that is the case, would I be correct in assuming that anyone developing custom themes for Ghost and selling them on the Marketplace is not using the Starter theme as a foundation?

1 Like

Good catch!

Yes, any theme developed from the Starter theme would be covered by the same license basically.

And I think you’re exactly right that the developers of custom themes being sold aren’t using the Starter theme. (They probably have their own version of a Ghost theme ‘skeleton’.)

I think the license is a little unfortunate. The Starter theme itself is freely available. That seems perfectly sufficient to me. I’m not sure why the Ghost people involved want to encumber any derivative works, e.g. custom themes. There’s no way someone could ‘fork’ the Starter theme and then demand people pay for it. And I don’t think it would hurt Ghost or its users to let them (try to) sell any themes they make based on it. I think the ‘MIT license’ (either/any of its minor variants) would be perfect – i.e. ‘do with it whatever you want’.

Maybe it’s a sneaky strategy to prevent people listing low-effort Starter theme variants on Marketplace?

Thank you :blush:

I agree, it is a little unfortunate for anyone wanting to use the Starter theme as a foundation to start developing custom themes for sale on the official Ghost Marketplace or elsewhere.

However, I highly doubt the Ghost team had any bad or sneaky intentions. I think it’s more likely that it could be a bit of an oversight, perhaps.

Nobody could do this anyway, because the Ghost team has control over which third party themes appear on the official Marketplace, and not every custom theme is approved (which makes sense, of course). There are themes available to buy elsewhere, but I imagine that those don’t sell anywhere near as well, because to prospective Ghost theme buyers they would be comparatively invisible (pun intended). :ghost:

My other thought is that perhaps the Ghost team didn’t and/or don’t want people using that Starter theme as a foundation for custom themes, as I imagine it would foreseeably make it more likely that these themes would end up looking similar? I haven’t had a close look at the Starter theme though.

I do recall reading somewhere, here on this forum I think, quite some time ago, that one of the criteria that the Ghost team use for selecting which third party themes appear on the Marketplace is originality/freshness/novelty.

Also, perhaps the Ghost team, or whoever wrote the license didn’t anticipate custom theme developers wanting to use the Starter theme as a foundation. I noticed that Casper, the OG theme, the spookiest of them all, is released under the same license.

But I’d be interested to hear from the Ghost team regarding this. As I am thinking about developing at least one custom theme, and possibly looking to sell it at some point, if it’s good enough, and I was thinking about using Casper as a base, which is why I looked at the license, but modifying the theme heavily, and it would end up very different to the Casper theme (and actually intended for a small online store, not a blog). So it would be good to know more about this.

I just looked at the license again – I was going to open an issue on the GitHub project to change the license – and I noticed that the license is already an ‘MIT license’!

From GitHub’s description of the license, emphasis mine:

A short and simple permissive license with conditions only requiring preservation of copyright and license notices. Licensed works, modifications, and larger works may be distributed under different terms and without source code.

I think I must have ‘hallucinated’ the additional clauses that require derivative works to publish the source code – that’s the part that would make selling a theme hard (but not impossible), as people could just use the source code without paying.

So, just the code that’s copied needs to include the original license – but just in the source code of the ‘derivative work’, i.e. the custom version of the repo. No source code is required to be provided to the users of any of the code, original or derivative.

I completely retract a lot of my earlier comments – they, Ghost, definitely did want and probably expect people to use it to make themes that they could then sell to others.

You, or anyone, can totally use the starter theme for developing a custom theme and you can sell that custom theme without issue.

1 Like

@kenny-evitt Thanks! I’m very grateful to you for following up and clarifying things for me :slightly_smiling_face: :pray:

1 Like

You’re welcome!

Hi, is the only way to create/edit custom themes with the Creator plan?