Windows build fails due to unsupported strftime("%-d") format in homepage template
- Dominant language
- HTML
- Stars
- 6
- Forks
- 21
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 9
Description
## Description
While building the OSSIE website on Windows, the build fails with the following exception:
```text
ValueError: Invalid format string
```
The error originates from the homepage template:
```jinja
{{ 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
1. Clone the repository on Windows.
2. Install the project dependencies.
3. Run:
```bash
mkdocs serve
```
or
```bash
mkdocs build
```
## Actual Result
The build fails with:
```text
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:
```python
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.
Contributor guide
No contributing guide indexed for this repository
Research direction
Locate the homepage template containing the post.date.strftime('%B %-d, %Y') expression and review how MkDocs renders it. Replace the platform-specific date formatting with a cross-platform approach, then run mkdocs build or mkdocs serve; done means the site builds successfully and dates retain the existing format on Windows, Linux, and macOS.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100