mirror of https://github.com/lxndrblz/anatole.git

Eric Park
24.46.2024 297bcc825d97cad41359d047e02d310d3fcdf8a1
feat: add config option to disable title capitalization (#408)

* feat: add config option to disable title casing on the single.html
* feat: disable title capitalisation on archive page

Co-authored-by: Alexander Bilz <mail@alexbilz.com>
3 files modified
9 ■■■■ changed files
assets/scss/partials/components/_archive.scss 1 ●●●● patch | view | raw | blame | history
layouts/_default/list.html 4 ●●●● patch | view | raw | blame | history
layouts/_default/single.html 4 ●●●● patch | view | raw | blame | history
assets/scss/partials/components/_archive.scss
@@ -32,7 +32,6 @@
    &-title {
      display: inline-block;
      flex: 0.96;
      text-transform: uppercase;
      @include themed() {
        color: t('primary');
layouts/_default/list.html
@@ -11,7 +11,11 @@
      {{ range .Pages }}
        <ul class="archive__list">
          <li class="archive__list-item">
            {{ if (eq .Site.Params.disableArchiveTitleStyling true) }}
            <a class="archive__list-title" href="{{ .RelPermalink }}" title="{{ .Title }}">{{ .Title }}</a>
            {{ else }}
            <a class="archive__list-title" href="{{ .RelPermalink }}" title="{{ .Title }}">{{ upper .Title }}</a>
            {{ end }}
            <div class="archive__list-date">
              {{ if isset .Site.Params "listdateformat" }}
                {{ if .Site.Params.localizedDates }}
layouts/_default/single.html
@@ -12,7 +12,11 @@
      </div>
    {{ end }}
    <div class="post__content">
      {{ if (eq .Site.Params.disableTitleCapitalization true) }}
        <h1>{{ .Title }}</h1>
      {{ else }}
      <h1>{{ title .Title }}</h1>
      {{ end }}
      {{ if or (eq .Type "post") (eq .Type .Site.Params.postSectionName) }}
        <ul class="post__meta">
          <li class="post__meta-item">