Open anlar opened 1 year ago
When using i18n_subsites with the following pelicanconf.py:
i18n_subsites
pelicanconf.py
AUTHOR = 'Author' SITENAME = 'Site name' SITEURL = '' PATH = 'content' TIMEZONE = 'Europe/Rome' DEFAULT_LANG = 'en' PLUGINS = ['i18n_subsites'] I18N_SUBSITES = { 'en': { 'SITENAME': 'Eng', 'AUTHOR': 'Author Eng', }, 'fr': { 'SITENAME': 'Fr', 'AUTHOR': 'Author Fr' }, }
It generates following content:
$ tree output/ -L 2 output/ ├── archives.html ├── authors.html ├── categories.html ├── en │ ├── archives.html │ ├── authors.html │ ├── categories.html │ ├── feeds │ ├── index.html │ └── tags.html ├── feeds │ └── all.atom.xml ├── fr │ ├── archives.html │ ├── authors.html │ ├── categories.html │ ├── feeds │ ├── index.html │ └── tags.html ├── index.html ├── tags.html └── theme ├── css ├── fonts └── images
Problem is that each subsite refers to incorrect path for the theme:
<link rel="stylesheet" href="/en/./theme/css/main.css" />
<link rel="stylesheet" href="/fr/../en/theme/css/main.css" />
So http://127.0.0.1:8000/ displays correct them but http://127.0.0.1:8000/en/ and http://127.0.0.1:8000/fr/ can't find CSS.
http://127.0.0.1:8000/
http://127.0.0.1:8000/en/
http://127.0.0.1:8000/fr/
As a workaround, configuring THEME_STATIC_DIR works:
THEME_STATIC_DIR
I18N_SUBSITES = { 'fr': { 'SITENAME': 'Fr', 'AUTHOR': 'Author Fr' 'THEME_STATIC_DIR': '../theme' }, }
Versions
Details
When using
i18n_subsites
with the followingpelicanconf.py
:It generates following content:
Problem is that each subsite refers to incorrect path for the theme:
<link rel="stylesheet" href="/en/./theme/css/main.css" />
<link rel="stylesheet" href="/fr/../en/theme/css/main.css" />
So
http://127.0.0.1:8000/
displays correct them buthttp://127.0.0.1:8000/en/
andhttp://127.0.0.1:8000/fr/
can't find CSS.