{"id":20852894,"url":"https://github.com/okturtles/wordpress-to-astro","last_synced_at":"2025-04-10T20:06:39.600Z","repository":{"id":77283043,"uuid":"543818209","full_name":"okTurtles/wordpress-to-astro","owner":"okTurtles","description":"Template to convert your Wordpress blog to Astro!","archived":false,"fork":false,"pushed_at":"2024-10-14T15:55:22.000Z","size":331,"stargazers_count":7,"open_issues_count":1,"forks_count":3,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-24T17:52:37.519Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Astro","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/okTurtles.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2022-09-30T22:55:20.000Z","updated_at":"2025-03-01T14:08:02.000Z","dependencies_parsed_at":"2025-01-19T06:34:32.339Z","dependency_job_id":null,"html_url":"https://github.com/okTurtles/wordpress-to-astro","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/okTurtles%2Fwordpress-to-astro","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/okTurtles%2Fwordpress-to-astro/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/okTurtles%2Fwordpress-to-astro/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/okTurtles%2Fwordpress-to-astro/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/okTurtles","download_url":"https://codeload.github.com/okTurtles/wordpress-to-astro/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248288340,"owners_count":21078900,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-11-18T03:19:12.661Z","updated_at":"2025-04-10T20:06:39.574Z","avatar_url":"https://github.com/okTurtles.png","language":"Astro","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Wordpress → Astro Converstion Kit\n\nYou can clone/copy and modify this repo to your liking.\n\nYour markdown-exported Wordpress blog posts should be placed in: `pages/posts/`\n\nPlease see this blog for details:\n\n👉 **[How to Convert a Wordpress blog to Astro Static Site Generator](https://blog.okturtles.org/2024/10/convert-wordpress-to-static-site/)**\n\n## How to use this project\n\n1. Follow the instructions in the [companion blog post](https://blog.okturtles.org/2024/10/convert-wordpress-to-static-site/) to export your Wordpress posts and content.\n2. Clone or copy this project.\n3. Place your markdown-ified Wordpress posts in `src/posts`.\n4. Place your mirrored `wp-content` folder in `public/`. The most important subfolder of this is `wp-content/uploads`, which contains your pictures. You might or might not need the rest.\n5. Install project dependencies by running `npm install` (assuming you have Node.js installed)\n6. Disable Astro telemetry: `./node_modules/.bin/astro telemetry disable` (this only needs to be done once)\n7. Run `npm run build` to generate site in `dist/` and check for errors\n8. Run `npm run dev` to serve the site locally and monitor files for changes. You can make any modifications as needed to the files under `src/` so that your blog looks and behaves the way you'd like it\n9. Don't forget to update files `astro.config.mjs` and `config.ts` with values that are relevant to your website!\n\nWhen you run `npm run build`, your website will be saved to the `dist/` folder. How you'd like to deploy it then is up to you. There are [many options](https://docs.astro.build/en/guides/deploy/).\n\nFinally, there are some things to keep in mind:\n\n- The following frontmatter is required: `title`, `date`, `author`, `layout`, `permalink`, `categories`, `tags`\n- The following frontmatter is optional: `draft`, `id`\n- You can set `draft: true` to prevent a post from appearing on the generated website\n- **Make sure** that the URL in `permalink` begins and ends with a `/`\n- You should generate the `date` value in `date` like so: `node -e \"console.log(new Date().toISOString())\"`\n- Many of the newly added files do not fit in with the markup and styling of the original template, and probably won't fit in with the styling and markup of your Wordpress site either. You will need to modify them to look good.\n- When making changes to the template, if things suddenly don't work, try running `npm run build` instead of `npm run dev`, as that seems more likely to identify and catch bugs.\n\n## How this project differs from the official template:\n\nThis project is fork of version `1.1.0` of the [`create-astro`](https://github.com/withastro/astro/tree/main/packages/create-astro) project.\n\nThe following differences exist:\n\n- Wordpress-specific modifications:\n  - URL preservation:\n    - `pages/[...wp].astro`: preserves original wordpress permalinks for posts, as defined by the frontmatter `permalink`\n    - `pages/author/[slug].astro`: wordpress-URL for listing posts for specific author\n    - `pages/category/[slug].astro`: wordpress-URL for listing posts for specific category\n    - `pages/tag/[slug].astro`: wordpress-URL for listing posts for specific tag\n    - `pages/page/[page].astro`: wordpress-URL pagination support for listing all of your posts on the homepage\n    - The orignal template's `src/pages/blog/` folder has been removed. Posts now go in `src/posts/`\n  - Components:\n    - `src/components/WPArticleSummary.astro`: two ways of showing post summaries on main page (with or without `\u003c!--more--\u003e` comment)\n    - `src/components/PostFooter.astro`: optional footer under posts to link to related categories, tags, etc.\n    - `src/components/Sidebar.astro`: sidebar widgets to list categories and recent posts\n    - `src/components/Search.astro`: non-functioning search widget. Feel free to [implement it](https://gomakethings.com/how-to-create-a-search-page-for-a-static-website-with-vanilla-js/) and send a PR!\n- Added the following dependencies:\n  - `remark-breaks`: better newline handling in markdown files\n  - `remark-gfm`: support for rendering tables in markdown files\n  - `@remark-embedder/core` \u0026 `@remark-embedder/transformer-oembed`: support for rendering Twitter and YouTube links as embeds\n- `src/pages/rss.xml.js`: superior RSS generation\n- Added support for `@` in imports to make it easy to import files without using `../../../` etc.\n- Added `PAGE_SIZE` config variable to `src/config.ts`\n- `.npmrc` now uses `save-exact = true`\n\n# Astro Starter Kit: Blog\n\n*(What follows is the original unmodified README from the [official Astro blog template](https://github.com/withastro/astro/tree/main/packages/create-astro).)*\n\n```\n# okTurtles Note: DO NOT DO THIS!\n#                 Clone this repo, or download a zipped version of it instead.\n#                 Running the command below will install the unmodified version\n#                 of the Astro blog template, which doesn't have Wordpress support.\nnpm create astro@latest -- --template blog\n```\n\n[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/blog)\n\n\u003e 🧑‍🚀 **Seasoned astronaut?** Delete this file. Have fun!\n\n\n![blog](https://user-images.githubusercontent.com/4677417/186189140-4ef17aac-c3c9-4918-a8c2-ce86ba1bb394.png)\n\nFeatures:\n\n- ✅ Minimal styling (make it your own!)\n- ✅ 100/100 Lighthouse performance\n- ✅ SEO-friendly with canonical URLs and OpenGraph data\n- ✅ Sitemap support\n- ✅ RSS Feed support\n- ✅ Markdown \u0026 MDX support\n\n## 🚀 Project Structure\n\nInside of your Astro project, you'll see the following folders and files:\n\n```\n├── public/\n├── src/\n│   ├── components/\n│   ├── layouts/\n│   └── pages/\n├── astro.config.mjs\n├── README.md\n├── package.json\n└── tsconfig.json\n```\n\nAstro looks for `.astro` or `.md` files in the `src/pages/` directory. Each page is exposed as a route based on its file name.\n\nThere's nothing special about `src/components/`, but that's where we like to put any Astro/React/Vue/Svelte/Preact components.\n\nAny static assets, like images, can be placed in the `public/` directory.\n\n## 🧞 Commands\n\nAll commands are run from the root of the project, from a terminal:\n\n| Command                | Action                                           |\n| :--------------------- | :----------------------------------------------- |\n| `npm install`          | Installs dependencies                            |\n| `npm run dev`          | Starts local dev server at `localhost:3000`      |\n| `npm run build`        | Build your production site to `./dist/`          |\n| `npm run preview`      | Preview your build locally, before deploying     |\n| `npm run astro ...`    | Run CLI commands like `astro add`, `astro check` |\n| `npm run astro --help` | Get help using the Astro CLI                     |\n\n## 👀 Want to learn more?\n\nCheck out [our documentation](https://docs.astro.build) or jump into our [Discord server](https://astro.build/chat).\n\n## Credit\n\nThis theme is based off of the lovely [Bear Blog](https://github.com/HermanMartinus/bearblog/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fokturtles%2Fwordpress-to-astro","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fokturtles%2Fwordpress-to-astro","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fokturtles%2Fwordpress-to-astro/lists"}