Description
While building the OSSIE website on Windows, the build fails with the following exception:
ValueError: Invalid format string
The error originates from the homepage template:
{{ post.date.strftime('%B %-d, %Y') }}
The %-d format specifier is supported on Unix-like platforms but is not supported by Python's strftime() implementation on Windows.
As a result, mkdocs serve and mkdocs build fail on Windows.
Steps to Reproduce
- Clone the repository on Windows.
- Install the project dependencies.
- Run:
or
Actual Result
The build fails with:
ValueError: Invalid format string
Expected Result
The website should build successfully on Windows, Linux, and macOS.
Possible Solution
Use a cross-platform date formatting approach instead of %-d.
One possible implementation is:
post.date.strftime("%B %d, %Y").replace(" 0", " ")
This preserves the existing output format (for example, July 3, 2026) while remaining compatible across Windows, Linux, and macOS.
Alternatively, another platform-independent formatting approach could be used if preferred.
Description
While building the OSSIE website on Windows, the build fails with the following exception:
The error originates from the homepage template:
{{ post.date.strftime('%B %-d, %Y') }}The
%-dformat specifier is supported on Unix-like platforms but is not supported by Python'sstrftime()implementation on Windows.As a result,
mkdocs serveandmkdocs buildfail on Windows.Steps to Reproduce
or
Actual Result
The build fails with:
Expected Result
The website should build successfully on Windows, Linux, and macOS.
Possible Solution
Use a cross-platform date formatting approach instead of
%-d.One possible implementation is:
This preserves the existing output format (for example,
July 3, 2026) while remaining compatible across Windows, Linux, and macOS.Alternatively, another platform-independent formatting approach could be used if preferred.