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

Problems with bootstrap3 #1953

Closed
quijot opened this issue Aug 19, 2015 · 9 comments
Closed

Problems with bootstrap3 #1953

quijot opened this issue Aug 19, 2015 · 9 comments

Comments

@quijot
Copy link
Contributor

quijot commented Aug 19, 2015

Nikola v7.6.3 recently installed.
Did

$ nikola init --demo mysite
$ cd mysite
$ nikola auto

with default conf.py (THEME="bootstrap3"), but is not showing styles.
Installed any other theme (material-theme for example) and it worked just fine.
Then I build my old sites based on bootstrap3 and the same problem.
2015-08-19--1439999977_1366x768_scrot

@Kwpolska
Copy link
Member

What OS are you on? Is the CSS linked in the source? Do you get any errors
in the web inspector?

Also, could you put up a tarball of your site up somewhere? That would help
us debug.

Chris Warrick https://chriswarrick.com/
Sent from my Galaxy S3.
On 19 Aug 2015 18:00, "Santiago Pestarini" notifications@github.com wrote:

Nikola v7.6.3 recently installed.
Did

$ nikola init --demo mysite
$ cd mysite
$ nikola auto

with default conf.py (THEME="bootstrap3"), but is not showing styles.
Installed any other theme (material-theme for example) and it worked just
fine.
Then I build my old sites based on bootstrap3 and the same problem.
[image: 2015-08-19--1439999977_1366x768_scrot]
https://cloud.githubusercontent.com/assets/1616997/9361535/3511ce3c-4672-11e5-835e-824bda441ddd.png


Reply to this email directly or view it on GitHub
#1953.

@da2x
Copy link
Contributor

da2x commented Aug 19, 2015

Do you open the output/index.html manually? or do you use the -b option with the auto command?

@quijot
Copy link
Contributor Author

quijot commented Aug 19, 2015

My mistake! I found the problem.

Default conf.py had SITE_URL="https://example.com/" so stylesheets where linked to https://example.com/assets/...
I edited conf.py and set BASE_URL to my output dir and problem solved.

I'm not used to set BASE_URL different from SITE_URL. Until now, didn't understand well that difference.

Thank you!

@da2x
Copy link
Contributor

da2x commented Aug 19, 2015

User error. :)

@da2x da2x closed this as completed Aug 19, 2015
@Kwpolska
Copy link
Member

You should just set SITE_URL, and leave BASE_URL commented out. (BTW, is there any reason to keep the distinction?)

@quijot
Copy link
Contributor Author

quijot commented Aug 20, 2015

I did just that, which is the default conf that always worked, then opened the output/index.html manually (as I always did) instead of using the -b option, only this time something changed in Nikola between v7.5.1 and v7.6.3: <base href=...> tag was added inside the <head> tag of the bootstrap3 template, so stylesheets are linked in relation to that url.

If I just use the -b option it works well.

@ralsina
Copy link
Member

ralsina commented Aug 20, 2015

@Aeyoun see previous comment. We forgot about the case of people just opening the files.

@da2x
Copy link
Contributor

da2x commented Aug 20, 2015

The user is running a server via Nikola and still opening the files in their browsers manually. Isn’t serve and auto the intended mechanisms for viewing Nikola sites locally? Sites configured to use root-relative or absolute URLs will also fail when opened manually regardless of the base tag or not.

@ralsina
Copy link
Member

ralsina commented Aug 20, 2015

Sure, we just may have to discourage it somehow.

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

No branches or pull requests

4 participants