Skip to content

feat(markdown): prioritize README.md files over _index.md files#70

Merged
monotykamary merged 1 commit into
mainfrom
feat/prioritize-readme-files
Mar 21, 2025
Merged

feat(markdown): prioritize README.md files over _index.md files#70
monotykamary merged 1 commit into
mainfrom
feat/prioritize-readme-files

Conversation

@monotykamary

@monotykamary monotykamary commented Mar 21, 2025

Copy link
Copy Markdown
Collaborator

Summary

  • Modified export_markdown.ex to prioritize README.md files over _index.md files
  • When a README.md file exists in a directory, it will be converted to _index.md in the export path
  • If both README.md and _index.md exist in the same directory, README.md is used and _index.md is ignored

Technical Implementation

  • Updated the file processing logic to handle the README.md → _index.md conversion as part of the export process
  • Modified the directory processing to filter out _index.md files when a README.md exists in the same directory
  • Fixed the slugification process to ensure that converted _index.md files are not slugified to lowercase
  • Ensured that frontmatter validation is still applied to all files including README.md files

Test Plan

  • Verify that a README.md file in a directory is properly converted to _index.md in the export path
  • Confirm that when both files exist, README.md content appears in the _index.md output
  • Check that the proper Hugo compilation occurs with the converted files

🤖 Generated with Claude Code

- Added logic to convert README.md files to _index.md during export
- Ensured proper prioritization when both files exist in same directory
- Fixed slugification process to maintain _index.md special filename

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@monotykamary monotykamary merged commit 8378e22 into main Mar 21, 2025
@tieubao tieubao deleted the feat/prioritize-readme-files branch April 2, 2025 16:28
tieubao pushed a commit that referenced this pull request Apr 3, 2025
- Added logic to convert README.md files to _index.md during export
- Ensured proper prioritization when both files exist in same directory
- Fixed slugification process to maintain _index.md special filename

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant