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

RELATIVE_URLS not respected for css styling in local preview (WIndows) #233

Open
maphew opened this issue Jan 1, 2023 · 1 comment
Open

Comments

@maphew
Copy link

maphew commented Jan 1, 2023

I'm on Windows 10 and have applied m.css to Pelican as per the guide, I think. When I preview output using local server (pelican --listen or via vs-code live server) there is no css styling applied. I've replaced the symlinked files in m.css/pelican-theme/static/ with the source files in m.css/css: no change.

In firefox developer console there are messages about it failing to fetch .css from the www.mydomain.ca. I expected it to be using the local machine. RELATIVE_URLS is true in pelicanconf.py.

image

(Additional note: favicon respects the SITEURL path but M_CSS_FILES is trimming the path, putting /static at the top of the domain.)

Relevant settings in pelicanconf.py (let me know if I missed any):

SITEURL = 'https://maphew.com/p'
THEME = '../m.css/pelican-theme'
THEME_STATIC_DIR = 'static'
M_CSS_FILES = ['https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,600,600i%7CSource+Code+Pro:400,400i,600',
               '/static/m-dark.css']
RELATIVE_URLS = True

Folder structure:

+---m.css
|   +---pelican-theme
|   |   +---static
|   |   +---templates
|   |   +---test
\---pcan
    f---pelicanconf.py   
    +---content
    +---output

PS: new to m.css, excellent presentation and docs, love the philosophy, It makes me work to use the theme even though the look isn't what I'm after at present.

@maphew
Copy link
Author

maphew commented Jan 1, 2023

Workaround: comment out SITEURL in pelicanconf.py.

After that styling works. Page to page navigation seems okay too. Images aren't loading but that might be my source documents (I'm migrating from another cms).

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

1 participant