{"id":22304991,"url":"https://github.com/bhagyeshsp/wordpress-to-jekyll-md-prep-tool","last_synced_at":"2026-04-08T16:31:13.204Z","repository":{"id":266295122,"uuid":"897944411","full_name":"bhagyeshsp/wordpress-to-jekyll-md-prep-tool","owner":"bhagyeshsp","description":"Prepares wordpress-exported markdown files for importing in jekyll","archived":false,"fork":false,"pushed_at":"2024-12-03T14:28:50.000Z","size":6,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-12T06:58:46.260Z","etag":null,"topics":["gatsby","jekyll","markdown","tool","wordpress","wsl2","yaml"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bhagyeshsp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"License.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-03T14:12:52.000Z","updated_at":"2025-02-05T14:34:36.000Z","dependencies_parsed_at":"2024-12-03T15:35:44.888Z","dependency_job_id":"e4612c13-a768-4bd2-a86f-aadfbaa3d802","html_url":"https://github.com/bhagyeshsp/wordpress-to-jekyll-md-prep-tool","commit_stats":null,"previous_names":["bhagyeshsp/wordpress-to-jekyll-md-prep-tool"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bhagyeshsp/wordpress-to-jekyll-md-prep-tool","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bhagyeshsp%2Fwordpress-to-jekyll-md-prep-tool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bhagyeshsp%2Fwordpress-to-jekyll-md-prep-tool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bhagyeshsp%2Fwordpress-to-jekyll-md-prep-tool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bhagyeshsp%2Fwordpress-to-jekyll-md-prep-tool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bhagyeshsp","download_url":"https://codeload.github.com/bhagyeshsp/wordpress-to-jekyll-md-prep-tool/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bhagyeshsp%2Fwordpress-to-jekyll-md-prep-tool/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31564795,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"ssl_error","status_checked_at":"2026-04-08T14:31:17.202Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gatsby","jekyll","markdown","tool","wordpress","wsl2","yaml"],"created_at":"2024-12-03T19:09:19.281Z","updated_at":"2026-04-08T16:31:13.184Z","avatar_url":"https://github.com/bhagyeshsp.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WordPress to Jekyll Markdown Cleaner (WSL2 Friendly)\r\n\r\n## Overview\r\n\r\nThis Ruby script is specifically designed for users working with WordPress markdown exports in a Windows Subsystem for Linux 2 (WSL2) environment. It converts exported WordPress markdown files (via [Gatsby exporter](https://wordpress.org/plugins/wp-gatsby-markdown-exporter/)) into Jekyll-ready blog post files while handling Windows and WSL2 path conversions seamlessly.\r\n\r\n## Key Features\r\n\r\n- Extracts YAML front matter\r\n- Filters to specific allowed keys\r\n- Adds 'layout: post'\r\n- Cleans HTML content\r\n- Renames files with date prefix\r\n- Converts paths for WSL2 compatibility\r\n\r\n## WSL2-specific concerns handled\r\n\r\n- Automatically converts Windows paths (e.g., `C:\\path\\to\\files`) to WSL2 paths (e.g., `/mnt/c/path/to/files`)\r\n- Handles path separators (`\\` to `/`)\r\n- Supports mixed Windows and WSL2 path inputs\r\n\r\n## Prerequisites\r\n\r\n- Windows Subsystem for Linux 2 (WSL2)\r\n- Ruby (version 3.0 or later recommended)\r\n- Required gems:\r\n  - nokogiri\r\n  - fileutils\r\n  - cgi\r\n  - yaml\r\n  - date\r\n\r\n## Installation\r\n\r\n1. Ensure WSL2 is set up on your Windows machine\r\n2. Clone the repository in your WSL2 environment\r\n3. Install required gems:\r\n   ```bash\r\n   gem install nokogiri fileutils\r\n   ```\r\n\r\n## Usage\r\n\r\n1. Set your input and output directories in the script\r\n   - Works with both Windows-style paths (e.g., `C:\\path\\to\\input`)\r\n   - Works with WSL2 paths (e.g., `/mnt/c/path/to/input`)\r\n2. Run the script:\r\n   ```bash\r\n   ruby wpMdCleaner.rb\r\n   ```\r\n\r\n### Configuration\r\n\r\nModify these variables in the script:\r\n- `input_directory`: Path to directory containing exported WordPress markdown files\r\n- `output_directory`: Path where cleaned Jekyll-compatible files will be saved\r\n\r\n### Path Conversion Example\r\n\r\nThe script automatically converts:\r\n- `C:\\Users\\YourName\\Documents\\files` → `/mnt/c/Users/YourName/Documents/files`\r\n- `D:\\Blog\\WordPress\\exports` → `/mnt/d/Blog/WordPress/exports`\r\n\r\n### Allowed YAML Keys\r\n- title\r\n- date\r\n- status\r\n- permalink\r\n- author\r\n- excerpt\r\n- type\r\n- id\r\n- category\r\n- tag\r\n- layout\r\n\r\n## Compatibility\r\n\r\n- Tested with WordPress exports via Gatsby exporter\r\n- Works with Jekyll static site generator\r\n- Fully compatible with WSL2 environments\r\n\r\n## Contributing\r\n\r\nContributions are welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for details.\r\n\r\n## License\r\n\r\nThis software is licensed under the Standard [MIT License](License.txt).\r\n\r\n## Troubleshooting WSL2 Paths\r\n\r\n- Ensure you're using absolute paths\r\n- Double-check drive letter mapping in WSL2\r\n- Verify file permissions in your WSL2 environment","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbhagyeshsp%2Fwordpress-to-jekyll-md-prep-tool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbhagyeshsp%2Fwordpress-to-jekyll-md-prep-tool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbhagyeshsp%2Fwordpress-to-jekyll-md-prep-tool/lists"}