Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Created "ghost:theme [name]" command and improved README.md file #15

Closed
wants to merge 1 commit into from
Closed

Conversation

tonnyorg
Copy link

Per my main proposal on this PR for the Ghost-Cli and per all the feedback received, the first step for me was to get familiar with your generator for Yeoman, which I feel like we can keep maintaining it so users have 2 ways to create/generate stuff for Ghost: through Yeomain (this generator) and through Ghost-Cli (which is going to call this generator somehow, still working on this portion).

Anyway, back to the point, here is my proposal to create a very basic scaffolding for a Ghost theme from scratch, let me know what do you think about it :)

To test it yourself, use npm/yarn link command from the inside of this project folder, update the dependencies with npm install or yarn command, and later just run yo ghost:theme [your_new_themes_name].

The next step is to actually move everything to support ES6 and work with the latest practices/standards/version of Yeomain (per the tutorials I followed when I was doing a generator from scratch the code look a little bit different).

Later once I get this done and also implemented on Ghost-Cli, my goal is to create a command like yo ghost:theme-export [src_folder] [dest_filename] that basically performs npm run build (this will require a minor improvement on the skeleton theme) script in your theme to compile the assets and later compress the theme folder into a zip file so you can share your theme with anyone else.

What do you think?

@acburdine
Copy link
Member

acburdine commented Aug 28, 2018

@tonnyorg thanks for the PR! gonna hold off for a bit before merging though - I need to clean up this repo first 😄 Will get to it as soon as I can though!

@tonnyorg
Copy link
Author

Sounds good, I'll keep an eye here as well. TY!

@kevinansfield
Copy link

Hey @tonnyorg 👋 There's a new gallery feature coming in Ghost 2.1.0 that has some required JS and CSS in themes. You can see the changes in this Casper PR, I would suggest that the CSS used in Casper for the gallery layout should be used as-is in the generated template TryGhost/Casper#475

Let me know if you have any questions 😄

@tonnyorg
Copy link
Author

tonnyorg commented Aug 31, 2018

@kevinansfield I totally agree but there's something to consider:

@JohnONolan suggested here to keep the CSS at minimal possible so I'm worried about adding this because it would mean that we will have to add more "base" style in the future, and that might be not "ideal".

What do you think? A workaround of this would be to create a separated [theme]/assets/css/koenig/gallery-card.css file that we can easily import into the main css file (screen.css) and put the style in there so further developers can understand that this is "optional" but all the classes to work with the gallery are there for further customization. This will allow maintainers to push new styles (for further cards or utilities) without affecting the basic CSS for new themes. How does that sounds?

@kevinansfield
Copy link

@tonnyorg in this case the CSS isn't optional, it's part of the base style for a theme. The idea here is to avoid theme developers having to go to the docs to copy/paste required CSS and JS by ensuring that the empty theme generator includes the minimal needed for Ghost to work and pass validation.

John's previous comment was correct at the time because there wasn't any Ghost functionality that required CSS.

@tonnyorg
Copy link
Author

tonnyorg commented Sep 1, 2018

@kevinansfield gotcha, that makes sense now. I'm going to work on the improvement tonite. TY!

@tonnyorg
Copy link
Author

tonnyorg commented Sep 1, 2018

@kevinansfield all set, feel free to review it and share your feedback with me 👍

@JoeeGrigg JoeeGrigg deleted the branch TryGhost:master January 11, 2022 09:58
@JoeeGrigg JoeeGrigg closed this Jan 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants