Skip to content

Latest commit

 

History

History
100 lines (86 loc) · 2.89 KB

README.md

File metadata and controls

100 lines (86 loc) · 2.89 KB

ImportWXR

This Bolt Extension is an Import filter for WXR files, as created by Wordpress or PivotX.

How to use this extension, in a few simple steps:

  1. Acquire a .wxr file, and place it in the folder extensions/vendor/bolt/importwxr/files.
  2. In the Bolt backend, go to 'Extras' > 'Import WXR'.
  3. Follow the steps on screen.
  4. Tweak the configuration file, if needed. It can be found at app/config/extensions/importwxr.bolt.yml, or using the 'Configure Extensions' option in the backend of Bolt.
  5. Repeat until satisfied with the results.

Note: After importing, scroll down to check if the script completed. If categories were found in the .wxr-file, the script will tell you which should be added to your taxonomy.yml-file.

If you're importing a .wxr file that was generated by a recent version of Wordpress, the 'mapping' as defined in the importwxr.bolt.ymlconfiguration should be good as-is. You might need to make a few modifications to your contenttypes.yml, to make sure all fields are present. See the example below, for a working example.

If you already have set up your own contenttypes, just make sure of the following:

  • The fields teaser and body need to be present in your pages and entries contenttypes.
  • Make sure the taxonomy is present, otherwise the extension will not import your existing categories and tags.
  • Add the attachments contenttype, if you want to import the attachments from Wordpress.

Example of contenttypes.yml, if importing from Wordpress:

pages:
    name: Pages
    singular_name: Page
    fields:
        title:
            type: text
            class: large
            group: content
        slug:
            type: slug
            uses: title
        image:
            type: image
        teaser:
            type: html
            height: 150px
        body:
            type: html
            height: 300px
        template:
            type: templateselect
            filter: '*.twig'
    taxonomy: [ categories, chapters ]
    recordsperpage: 100


entries:
    name: Entries
    singular_name: Entry
    fields:
        title:
            type: text
            class: large
            group: content
        slug:
            type: slug
            uses: title
        teaser:
            type: html
            height: 150px
        body:
            type: html
            height: 300px
        image:
            type: image
            group: media
        video:
            type: video
    taxonomy: [ categories, tags ]
    recordsperpage: 10

attachments:
    name: Attachments
    singular_name: Attachment
    fields:
        title:
            type: text
            class: large
        slug:
            type: slug
            uses: title
        image:
            type: image
        body:
            type: html
            height: 300px
        url:
            type: text
            variant: inline