Migrate tags to blog posts

This commit is contained in:
Oliver Davies 2020-05-06 02:00:02 +01:00
parent b5c2b72412
commit 608039b407
3 changed files with 46 additions and 16 deletions

View file

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="SaveActionSettings">
<option name="actions">
<set>
<option value="activate" />
<option value="activateOnShortcut" />
<option value="organizeImports" />
<option value="reformatChangedCode" />
<option value="rearrange" />
</set>
</option>
</component>
</project>

View file

@ -4,53 +4,69 @@ source:
plugin: url
data_fetcher_plugin: http
data_parser_plugin: json
urls: http://localhost:9000/posts.json
urls: https://deploy-preview-213--opdavies.netlify.app/posts.json
ids:
id:
type: integer
item_selector: posts/
fields:
-
name: id
- name: id
selector: id
label: Node ID
-
name: title
- name: title
selector: title
label: Title
-
name: created
- name: created
selector: created
label: Created
-
name: status
- name: status
selector: status
label: Status
-
name: content
- name: content
selector: content
label: Content
-
name: path
- name: path
selector: path
label: Path
- name: tags
selector: tags
label: Tags
process:
body/0/format:
plugin: default_value
default_value: full_html
body/0/value: content
title: title
created: created
changed: created
path: path
status: status
field_tags:
plugin: migration_lookup
migration: tag_term
source: tags
type:
plugin: default_value
default_value: post
uid:
plugin: default_value
default_value: 1
destination:
plugin: 'entity:node'
plugin: 'entity:node'

View file

@ -6,8 +6,8 @@ source:
data_parser_plugin: json
urls: https://deploy-preview-213--opdavies.netlify.app/tags.json
ids:
id:
type: integer
name:
type: string
item_selector: tags/
fields:
-