question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add `lektor dev new-theme` command

See original GitHub issue

This command should be very similar to the existing lektor dev new-plugin command, and use the same style prompts to query for basic information that will be used in creating a very basic theme. This theme should then be placed in themes/ with a specified name, and contain a theme.ini. The theme.ini should be populated by the answers to the prompts.

I think there should also be a trivial amount of content in the new theme. Perhaps a single layout.html template file with very basic contents.

Like lektor dev new-plugin, this new command should be able to accept a --path option, and a theme_name argument.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
lsrdgcommented, May 7, 2018

It does make a lot sense now. 🎉

After cleaning the mass (setup.py, theme_module, etc) I’m working towards the creation of theme.ini and how to populate it. Thanks for the explanation and for double checking everything.

1reaction
nixjdmcommented, May 4, 2018

@lsrdg Sure, I expect the tests will come at the end. They’re just ready when you get there. 😃

We probably don’t need a themesystem.py. Taking a look at pluginsystem.py, I don’t think any of that is really relevant for themes. Themes don’t have any python, and really are much simpler because of it. We don’t need to load them in the same way as plugins, there’s no event hooks, and there’s no class Theme that needs importing in a theme module. Themes won’t have a setup.py or module.

I double checked and searched the code base for pluginsystem to look at all of the imports. I don’t think themes will have any corresponding imports. That should save quite a bit of complexity. The only python files you should need to touch are devcli.py, test_devcli.py, and quickstart.py. If you do think of a helper function, it could go in themesystem.py, but you don’t need to copy pluginsystem.py.

Make sense?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Creating a Theme | Documentation - Lektor
Not implemented yet. You could create a basic empty theme with the following command: $ lektor dev new-theme. Theme Components: A theme could...
Read more >
lektor/CHANGES.md at master - GitHub
Contribute to lektor/lektor development by creating an account on GitHub. ... Added a new CLI command lektor dev new-theme .
Read more >
lektor/lektor - Gitter
I was thinking Lektor needs a new, basic, unoffensive (is that the word?) theme. Joseph Nix ... command to conform to the existing...
Read more >
lektor/lektor 3.2.0 on GitHub - NewReleases.io
New release lektor/lektor version 3.2.0 3.2.0 Many improvements, bugfixes, and video thumbnailing on ... Added a new CLI command lektor dev new-theme ....
Read more >
Lektor/CHANGELOG and Lektor Releases | LibHunt
Command Line. When running lektor dev new-theme : fix check for ability to create symlinks under Windows. (#996); Fix rsync publisher when deletion...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found