[i18n_subsites] Incorrect reference to parent theme from subsites
anlar opened this issue · 1 comments
anlar commented
Versions
- Pelican 4.8.0
- pelican-i18n-subsites 0.9.0
Details
When using i18n_subsites
with the following 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:
- en:
<link rel="stylesheet" href="/en/./theme/css/main.css" />
- fr:
<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.
JulienPalard commented
As a workaround, configuring THEME_STATIC_DIR
works:
I18N_SUBSITES = {
'fr': {
'SITENAME': 'Fr',
'AUTHOR': 'Author Fr'
'THEME_STATIC_DIR': '../theme'
},
}