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

Select default theme #95

Closed
tekjar opened this issue Jan 12, 2016 · 14 comments · Fixed by #804
Closed

Select default theme #95

tekjar opened this issue Jan 12, 2016 · 14 comments · Fixed by #804
Labels
A-JavaScript Area: Javascript A-Rendering Area: Rendering C-enhancement Category: Enhancement or feature request E-Easy Experience: Easy S-Wishlist Status: Wishlist

Comments

@tekjar
Copy link

tekjar commented Jan 12, 2016

Hi. Is it possible to select a theme during init?

@tekjar tekjar changed the title Select theme during mdbood init Select theme during mdbook init Jan 12, 2016
@azerupi
Copy link
Contributor

azerupi commented Jan 12, 2016

You mean picking the default theme or adding a custom one?
It's not yet possible to choose which theme will be the default, but it shouldn't be to hard to add that option to the book.json configuration file.

@tekjar
Copy link
Author

tekjar commented Jan 12, 2016

Yeah. I mean the default theme. For example I want my book to be in 'rust' theme by default.

@azerupi azerupi changed the title Select theme during mdbook init Select default theme Jan 12, 2016
@azerupi
Copy link
Contributor

azerupi commented Jan 12, 2016

Ok, I have added this to the wishlist I will try to add this option when I am done with my exams in two weeks :)

@tekjar
Copy link
Author

tekjar commented Jan 12, 2016

Thanks 👍 . All the best for your exams

@azerupi
Copy link
Contributor

azerupi commented Jan 12, 2016

Thank you 😊

@azerupi azerupi added this to the 0.1.0 milestone Jan 21, 2016
@azerupi azerupi removed this from the 0.1.0 milestone Nov 3, 2016
@azerupi azerupi added A-JavaScript Area: Javascript A-Rendering Area: Rendering E-Easy Experience: Easy S-Wishlist Status: Wishlist C-enhancement Category: Enhancement or feature request and removed JavaScript labels May 16, 2017
@Michael-F-Bryan
Copy link
Contributor

This sounds like a nice first contribution for someone and I'd be more than happy to help with mentoring if need be.

It sounds like you'll need to do the following:

  • Add an extra field to the HtmlConfig which specifies the default theme
  • Tweak the index.hbs template so you can specify the default theme.
    • An easy solution would be to add an extra <script> tag at the bottom which will set the theme to our default if it hasn't already been specified in previous visits (there may be more elegant solutions).
  • Update the config format's documentation to mention the new key in book.toml.

@DeltaManiac
Copy link

I'd like to work on this issue.

@Michael-F-Bryan
Copy link
Contributor

@DeltaManiac awesome! Would you like a hand getting started or finding your way around the code base?

@DeltaManiac
Copy link

@Michael-F-Bryan
So i have been going through the code and have an idea of whats is going on but it would be great if yoy could give a hand.

@Michael-F-Bryan
Copy link
Contributor

Sure thing! The easiest way would probably be to open a pull request and prefix its name with something like "WIP" so we know not to merge it.

That way we've got a place to discuss and can review what you've done without spamming this issue. How does that sound?

@DeltaManiac
Copy link

DeltaManiac commented Nov 27, 2017

Yeah thats cool.
Done

@Bassetts
Copy link
Contributor

It seems like this is no longer being worked on, am I ok to pick this up? Thought I should check before going ahead so I don't step on anyone's toes.

@Michael-F-Bryan
Copy link
Contributor

As long as @DeltaManiac is okay with it, i don't see why you can't pick up the issue. The discussion in #497 should also contain enough information to help get you started.

@DeltaManiac
Copy link

@Bassetts You can go ahead..
This issue had totally slipped my mind somehow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-JavaScript Area: Javascript A-Rendering Area: Rendering C-enhancement Category: Enhancement or feature request E-Easy Experience: Easy S-Wishlist Status: Wishlist
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants