Add `lektor dev new-theme` command
See original GitHub issueThis 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:
- Created 5 years ago
- Reactions:1
- Comments:8 (5 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It does make a lot sense now. 🎉
After cleaning the mass (
setup.py
,theme_module
, etc) I’m working towards the creation oftheme.ini
and how to populate it. Thanks for the explanation and for double checking everything.@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 atpluginsystem.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 noclass Theme
that needs importing in a theme module. Themes won’t have asetup.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 aredevcli.py
,test_devcli.py
, andquickstart.py
. If you do think of a helper function, it could go inthemesystem.py
, but you don’t need to copypluginsystem.py
.Make sense?