mosra / m.css

A no-nonsense, no-JavaScript CSS framework, site and documentation theme for content-oriented websites
https://mcss.mosra.cz
Other
409 stars 92 forks source link

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

Open maphew opened 1 year ago

maphew commented 1 year ago

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 commented 1 year ago

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).