picocms / Pico

Pico is a stupidly simple, blazing fast, flat file CMS.
http://picocms.org/
MIT License
3.81k stars 616 forks source link

Add meta data attribute LANG to support multi language websites #683

Closed dipohl closed 6 months ago

dipohl commented 6 months ago

I added this for my multi language blog. I think it can be useful also for other users and will be glad when you integrate the addition.

PhrozenByte commented 6 months ago

Thank you for your contribution! :+1:

The pre-registered meta headers exist for backwards compatibility reasons only, since Pico 2.1 you can use pico-theme.yml (see default theme) to register additional meta headers. The only difference is that you can't access it via {{ page.lang }}, but {{ page.meta.lang }} (just for the record, {{ page.title }} also exists for backwards compatibility reasons only, one should use {{ page.meta.title }} instead).

dipohl commented 6 months ago

ah, ok. Thanks for the hint and explanation. I will have a look at the new method then. I appreciate that you implemented a more flexible one! :+1: