Skip to content

Fetch an up-to-date Bootstrap automatically #5

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

boronine
Copy link

Like the title says, I've included Bootstrap as a git submodule and added a Makefile to build the up-to-date CSS. README updated accordingly.

Choosing a theme is no longer possible.

I don't expect you to merge this change, but thought you should see it anyways.

@kylefinley
Copy link
Member

@boronine, Thank you for taking the time to put this together. I think this type of approach is definitely needed. A couple other possible solutions would be:

BootstapCDN would be the easiest to maintain, but there might be users that are using this on internal networks, where they wouldn't have access.

What do you think?

Also, I would like to keep the themes, which definitely complicates things. In another project I'm using LESS to compile bootstrap-less-themes. Maybe that could work here too.

Thanks again for getting the ball rolling on this. I would love to hear your thoughts on Bower or BootstrapCDN

@boronine
Copy link
Author

Thanks for your work, by the way, our docs will soon be live in all their Bootstrap glory :)

I actually haven't tried Bower yet, but it looks like a better way to fetch Bootstrap than a submodule. If you want to ship sphinx-bootstrap with themes, I think automating your bootstrap-less-themes repo and including it in sphinx-bootstrap would be the best option.

For our website, we are maintaining our own fork of Bootstrap. Today I actually ended up giving up on the submodule and simply hardcoding a link to our global CSS file into layout.html. Dirty, but since I don't feel like familiarizing myself with Sphinx customization right now, I'm keeping it.

I think the best solution is to include a copy of Bootstrap with the repo to make sure that the generated site is self-contained and will work offline, but at the same time document how one might override the stylesheet, perhaps as a build argument.

In our case it would be perfect, our public documentation repo will be perfectly cloneable and buildable with no external dependencies, but when we are actually building the docs for the site, we will slip our stylesheet into the build.

This is, of course, just one use case.

Thanks again!

@kylefinley
Copy link
Member

our docs will soon be live in all their Bootstrap glory :)

Awesome, I would like to add them to Projects using it section, if you don't mind.

I actually haven't tried Bower yet, but it looks like a better way to fetch Bootstrap than a submodule. If you want to ship sphinx-bootstrap with themes, I think automating your bootstrap-less-themes repo and including it in sphinx-bootstrap would be the best option.

Good idea, I think i'll modify your make file to have bower install bootstrap and bootstrap-less-themes, and then build the themes from LESS. It might be a little while before I can get it though.

I think the best solution is to include a copy of Bootstrap with the repo to make sure that the generated site is self-contained and will work offline, but at the same time document how one might override the stylesheet, perhaps as a build argument.

In our case it would be perfect, our public documentation repo will be perfectly cloneable and buildable with no external dependencies, but when we are actually building the docs for the site, we will slip our stylesheet into the build.

OK, I'll see what I can do to accommodate that scenario.

Thank you for the feedback. I'll post to this issue once I have made the changes.

Kyle

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.

2 participants