Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong archive date group #4389

Closed
5 tasks done
tamasgt opened this issue Sep 22, 2022 · 2 comments
Closed
5 tasks done

Wrong archive date group #4389

tamasgt opened this issue Sep 22, 2022 · 2 comments
Labels
bug Issue reports a bug resolved Issue is resolved, yet unreleased if open

Comments

@tamasgt
Copy link

tamasgt commented Sep 22, 2022

Contribution guidelines

I've found a bug and checked that ...

  • ... the problem doesn't occur with the mkdocs or readthedocs themes
  • ... the problem persists when all overrides are removed, i.e. custom_dir, extra_javascript and extra_css
  • ... the documentation does not mention anything about my problem
  • ... there are no open or closed issues that are related to my problem

Description

Hello, can you look at this? I first noticed the 2022 one, then I tried it with 2021 as well.

Post date Archive date Ok?
2021-01-01 2020 Wrong
2021-01-02 2020 Wrong
2021-01-03 2020 Wrong
2021-01-04 2021 Ok
2022-01-01 2021 Wrong
2022-01-02 2021 Wrong
2022-01-03 2022 Ok
... ... Ok
2022-01-07 2022 Ok

Expected behaviour

To a correct archive date.

Actual behaviour

Snag_19669ee
Snag_1967c1e
Snag_1968ebc

Steps to reproduce

Minimal project: test-material.zip

Package versions

mkdocs: 1.3.1
mkdocs-material: 8.5.3+insiders.4.23.5

Configuration

site_name: Test Material

# Theme
theme:
  name: material
  language: en
  custom_dir: overrides
  features:
    # Navigation settings
    - navigation.instant
    - navigation.tracking
    - navigation.tabs
    # - navigation.tabs.sticky kikapcsolva, így kisebb a fejléc.
    - navigation.top
  palette:
    # Palette toggle for automatic mode
    - media: "(prefers-color-scheme)"
      toggle:
        icon: material/brightness-auto
        name: Switch to light mode
    # Palette toggle for light mode
    - media: "(prefers-color-scheme: light)"
      # scheme: youtube
      scheme: default
      primary: teal
      accent: orange
      toggle:
        icon: material/brightness-7
        name: Switch to dark mode
    # Palette toggle for dark mode
    - media: "(prefers-color-scheme: dark)"
      scheme: slate
      primary: teal
      accent: orange
      toggle:
        icon: material/brightness-4
        name: Switch to system preference
  #Font
  font:
    text: Roboto
    code: Roboto Mono

plugins:
  - search:
      lang: hu
  - blog:
      enabled: true
      # post_url_date_format: YYYY-MM-dd
      # Default url format
      # post_url_format: "{date}/{slug}"
      # post_url_format: "{slug}"
      # post_readtime: false
  #- rss:
      #match_path: blog/posts/.*

nav:
  - Home: index.md
  - Sample 1:
    - Page 1: sample-1/page-1.md
    - Page 2: sample-1/page-2.md
  - Sample 2:
    - Page 1: sample-2/page-1.md
    - Page 2: sample-2/page-2.md
  - Blog:
    - blog/index.md

System information

Windows 10
Chrome

@squidfunk squidfunk added needs investigation Issue must be investigated by the maintainers bug Issue reports a bug and removed needs investigation Issue must be investigated by the maintainers labels Sep 22, 2022
@squidfunk
Copy link
Owner

squidfunk commented Sep 22, 2022

Thanks for reporting! This is expected behavior for YYYY according to Babel (which I didn't knew). Switching to yyyy fixes the problem. Fixed in squidfunk/mkdocs-material-insiders@be490bb64. I've also adjusted our documentation in 9de5885.

@squidfunk squidfunk added the resolved Issue is resolved, yet unreleased if open label Sep 22, 2022
@squidfunk
Copy link
Owner

Released as part of 8.5.3-insiders-4.23.6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue reports a bug resolved Issue is resolved, yet unreleased if open
Projects
None yet
Development

No branches or pull requests

2 participants