Changelog
1.5.0
localesNames
, since with updated locales
structure it's easy to extract locale names.shell:jspm_config
and shell:jspm_install
tasks. Those steps will be done automatically during npm postinstall
.grunt-gray-matter
module in favour of published to NPM version.|number
and |currency
. Use new global function numbro
instead.gettext
and nunjucks-extensions
modules.locales
option in Gettext
. Class will determinate available l10n files based on directories structure you have in /source/locales
. Note, that Gettext
will load all messages, even for not declared in Grunt config locales, but for which you have l10n files.src
option in Gettext
. Expected directories structure hardcoded in Gettext
. Path to locales still have to be specified with cwd
, but everything beyond will be resolved by Gettext
itself.en-US:nav:bar
in dgettext()
, which were used before to workaround inability of node-gettext
to sustain few locales in single instance. With updated Gettext
you can use provided methods to switch locales on the go, and access domains as normal, sane person.textdomain()
method of Gettext
and it's Nunjucks counterpart. Use new setTextdomain()
instead to set domains, and setLocale()
to change locale.resolveDomain()
method of Gettext
.load()
method of Gettext
in favour of new methods.<link>
referencing sitemap.xml
from header, since none of search providers supports this method. See #88. Sitemap referenced in robots.txt
instead.npm run
scripts.numbro
.nunjucks-task
module, which encapsulates l10n-specific logic stored in Grunt Nunjucks task itself before. Module exposes a single method to which should be passed usual Nunjucks options and some new, module-specific, options (mostly related to l10n). Module will return prepared configuration for task target with injected l10n and matter data and configurated Kotsu and l10n Nunjucks environment extensions.setLocale()
method for Gettext
and it's counterpart for Nunjucks. Use it to switch current locale. Don't forget to switch it back, though... Note, that you have to call setLocale
with locale of you environment at least once on top level of your project to invoke proper Gettext instance. For Nunjucks it already does updated nunjucksIExtensions()
of Gettext
.setTextdomain()
method for Gettext
, and same global for Nunjucks. Call it to change default locale to specified one. If you have any, except default.bindTextdomain()
method for Gettext
, similar to GNU one. So far it used externally to load messages for active locales, but you can join the party and spawn more domains based on your delicate preferences. It expects your l10n files to be under {localeName}/LC_MESSAGES/..
or {localeName}/..
paths.autobindTextdomain()
method for Gettext
. It crawls active locale directory and automatically discovers all files, then loads them as domains. For example, en-US/nav/bar.po
l10n file will end up as nav/bar
domain of en-US
locale. Used externally, during Gettext
invocation to load all l10n files.regioncode
and isoLocale
to Nunjucks filters.grunt
instance. This allows to invoke gruntfile in other environments and use Gruntfile config and methods.grunt-standard
with standard
.grunt-stylelint
with stylelint
.jspm
modules will be installed automatically during npm postinstall
step.^7.9.0
.nunjucks-extensions
module will set numbro
locale, default formatting and currency formatting to current locale's parameters on initialization.moment
now exposed to Nunjucks as pure function and no longer sets locale to current locale internally.nunjucks-extensions
module will set moment
locale to current locale on initialization.Gettext
, so now it handles locales and domains in similar to GNU gettext way, by creating new instance for each locales. Finally you don't need to use domain to store locale any more.nunjucksExtensions()
of Gettext
on invocation will now set locale to current locale of task and set domain to default.load
method of Gettext
has been split into bindTextdomain()
and autobindTextdomain()
methods, and it's discovery mechanism now works slightly different.dgettext()
and other domain-related gettext functions now expects as domain not :nav:bar
for current locale or en-US:nav:bar
for specific one, but nav/bar
... for both cases. If you want to call domain from other locale, change it with new setLocale()
first.i18-tools
to be completely static and class-less, so it no longer requires invocation with new
. Instead of providing locales properties for whole class, now only relevant properties should be provided for invoked methods.i18-tools
-related Nunjucks extensions to be declared by newly added method nunjucksExtensions()
to i18-tools
. This finally removed all manual declarations of extensions from Nunjucks task, leaving clear space for projects-specific filters and globals.i18-tools
method getLocaleDir()
with declared as Nunjucks global localeDir()
. Now it will always output ''
for base locale and '/' + localeName
('/' + localeUrl
) for others.printf
to more appropriate sprintf
.gettext.installNunjucksGlobals
to gettext.nunjucksExtensions
to be unified with other similar calls.gettext.nunjucksExtensions()
will now require current locale as second argument, and it will set gettext default textdomain to it during invoking, so there is no need to call gettext.textdomain(currentLocale
) in Grunt task.locales
to be normalized database-like, with accessible locale names as keys for each locale object, instead of being just an array. It makes working with locales much easier, both in JavaScript and Nunjucks environments.locales
, baseLocale
and gettext
config properties one level higher, thus removing i18n
property. There is no reason to keep those mandatory properties so deep.grayMatter
task no longer uses expand: true
option, since it writes to single file, thus doesn't need expanding.nunjucks-task
. This allowed to make Nunjucks task file much cleaner and to contain mostly options with minimum of logic.options.i18n.*
and options.humanReadableUrls.*
directly to options
.options.files.matter
of Nunjucks task moved to options.matter
and now excepts function, which will return prepared object, or matter object itself instead of path to matter file.onlyActiveOnIndex
option to Nav
and NavItem
components, which allows to force item be active only when current route matches link route not partially, but completely. Disabled by default.crumble
last characters of path with file extension.numbro
deprecation of setLanguage
method warning.this.orig.cwd
when grunt-newer
used.Changelog
1.4.0
example.json
. Finally there won't be need to delete it every time new project bootstrapped with Kotsu..o-show-grid
to exceptions in uncss
task.themeColor
via themeColor
in Gray Matter.[ci] Switched to alpine
linux distribution as base layer for nginx container.
[package] Updated dependencies.
[package] Moved linting and testing dependencies to devDependencies
.
[misc] Upated Stylelint scss rules to 1.4.1.
[styles] Updated Ekzo to 2.4.0
[styles] Since Ekzo 2.4.0 doesn't provide spacing for icons and sprites any more, added them to Kotsu in form of .Icon--left
and .Icon--right
.
[styles] Renamed _Icons.scss
to _Icon.scss
.
[styles] Since Ekzo 2.4.0 also doesn't provide .o-btn
size variations and default paddings for buttons, added them in form of .Btn*
component.
[styles] .Btn
by default extends .o-btn
.
[styles] Followed Ekzo changes:
null
;$ekzo-line-height
to $ekzo-line-heights
map and using new ekzo-line-height()
to retrieve values from it;.o-svg-icon
to imports.[templates] Used new .Btn*
instead of .o-btn*
and .Icon*
instead of .o-icon*
.
Changelog
1.3.1
devDependencies
section and all packages moved to dependencies
section since it's impossible to use kotsu with npm install --production
or --only
flag, seeuncss
rules to ignore not only .is-*
, but also .*is-*
, .*has-*
and .*not-*
. This allow to use more specific selectors, like .nav-is-active
when needed.Changelog
1.3.0
env.SITENAME
variable to setup site domain name in nginx and templates.env.STAGING
which returns true
if --staging
flag provided or environment variable is set (example: grunt build --staging
).robots.txt
in staging environment will disallow everything..Wrapper--bleed
.env.DEPLOY_SERVER
renamed to env.DEPLOY_IP
robots.txt
now points to sitemap.xml
as per Google guidelines. See https://github.com/LotusTM/Kotsu/issues/88 for details.robots.txt
into template and moved to source/temaplates
. Now it can be formatted based on any data, provided to Nunjucks..Wrapper--contain
to .Wrapper--content
.pre
will no longer show in full width on hover by default.14px
to 16px
..Wrapper
on page.applyWrapper: false
instead of true
.grunt-nunjucks-2-html
at 2.0.0.