Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

📝Docs - Guide to migrate from WordPress #2411

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

Lewkans
Copy link

@Lewkans Lewkans commented Nov 4, 2024

Closes #2386

General Contributing:

All New Content Submissions: (To be confirmed by reviewer)

  • Title is short & specific
  • Headers are logically ordered & consistent
  • Purpose of document is explained in the first paragraph
  • Procedures are tested and work
  • Any technical concepts are explained or linked to
  • Document follows structure from templates
  • All links work
  • The spelling and grammar checker has been run
  • Graphics and images are clear and useful
  • Any prerequisites and next steps are defined.

@Lewkans Lewkans requested a review from a team as a code owner November 4, 2024 06:17
Copy link

vercel bot commented Nov 4, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
tina-io ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 4, 2024 6:55am

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

1\. Navigate to your output's posts folder `output/post`, and run:

```powershell
ren * *.mdx
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we have a MacOS command as well?

Copy link
Contributor

@isaaclombardssw isaaclombardssw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really good v1


Other conversion options that are not covered in this guide include:

- Using the WordPress Rest API - best for extracting the pure html for page or post content in JSON format
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this make sense? Afaik it's just the content data we get back this kind of API (or is it also passing over html css all this other stuff?)

Comment on lines +19 to +20
- [Node.js](https://nodejs.org/) is installed
- You have set up a [Tina starter](https://tina.io/docs/introduction/using-starter)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be a warning callout that says the scope of this guide. Or specifically why we're using the Tina starter (creating a new site, whereas someone might expect we can somehow copy the old one's html/css implementation).

i.e. this is largely a data transfer guide.

Comment on lines +48 to +50
> 💡 **Note 1:** You can rename the folder before dragging to prevent duplicate image names being replaced
> 💡 **Note 2:** You can also set up alternative hosting with your preferred media manager.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we trying to make "Note" happen on the Tina docs? We could, but there's no precedent anywhere else – needs some discussion on what tone we want and how we want to enforce it.

Currently
I've been auditing every docs change and trying to keep the same style – not really sustainable.


#### Migrating Pages

<WarningCallout body="If you are having trouble with this step, feel free to contact a developer for assistance in the chat, or through one of our community channels." />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't believe they can talk to a real person via the chat – should link to our discord maybe


### Import data to TinaCMS

#### Migrating images to TinaCloud
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TinaCloud isn't involved here. Also capitalisation.

Suggested change
#### Migrating images to TinaCloud
#### Migrating Images

Comment on lines +52 to +62
#### Migrating Posts

1\. Navigate to your output's posts folder `output/post`, and run:

```powershell
ren * *.mdx
```

Which will convert your files from Markdown to MDX.

2\. Drag all the MDX files in `output/post` to your Tina app's `content/posts` folder, now your posts have been migrated to Tina!
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we mention it's a happy accident that the WP post format happens to match the one in the starter? It's not usually this easy


1\. Create a new folder in your Tina app's `content` folder named `wp-pages`.

2\. Create a new file in your Tina app's `tina/collection` folder named `wp-page.ts` and use the template below, you can change this later to fit your page's schemas better.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a big reduction – what kind of data do we get in these WP markdown files specifically? Should they set up block based editing? How can we look at the converted data and turn it into a schema?

Do we want a seperate guide that goes over general migration tips (ex. this is the markdown we have, how can we create a schema that fits it) – then we could just link that and use the wordpress markdown as the example

Counterargument
This guide looks really straightforward as is – which is great.


## Next Steps

- Adding a coverImage field to your post schema to read the image
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should probably be included in the guide

## Next Steps

- Adding a coverImage field to your post schema to read the image
- Update the image links in the Markdown and MDX files to match how Tina uses them, uploads/image.png
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should probably be included in the guide

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.

📝 Guide: How to migrate from Wordpress to TinaCMS
4 participants