Feather Wiki

A tiny tool for simple, self-contained wikis!

Extensions /

Data Import/Export

Created:

Bulk import and export of pages has been a highly-requested feature from the beginning, whether to preserve your pages in a more archival format that doesn't require JavaScript at all or to speed up the process of converting from a static site generator. Whatever your needs may be, this extension will help you get pages into and out of your Feather Wiki much faster than just adding or removing them by hand.

Installation #

To try out the data import/export extension, you can do one of the following things:

  • Go to your Wiki Settings and add
    <script src="https://feather.wiki/extensions/v1.8.x/data-import-export.js"></script>
    to the "Custom Head" text area.
  • Save the data import/export extension file to the same folder as your Feather Wiki file and add
    <script src="./data-import-export.js"></script>
    to the "Custom Head" text area in Wiki Settings.
    • (This way requires that the data-import-export.js file always remains in the same folder as your wiki file.)
  • Go to the source code for the extension, copy the code, and paste the whole script directly into the "Custom JS" text area in Wiki Settings.

After adding the extension code to your wiki, save your changes and reload the wiki. You will not be able to see the results until you save your wiki and re-load the file.

What It Does #

Once installed, a new "Data Management" section will be added to the bottom of the Wiki Settings page with buttons for "Import Files as Pages," "Export Pages," and "Export Raw JSON Data." The first 2 buttons have some explanation text below them with some details, but in a nutshell:

  • The import button allows you to select multiple HTML, Markdown, or plain text files from your computer to insert into your Feather Wiki. Depending on how the file content is formatted, the extension will try to auto-choose the correct page title.
  • The "Export Pages" button loads a copy of JSZip, gets your Feather Wiki's page contents, and zips them all into a .zip file with each page as its own file within.
  • The "Export Raw JSON Data" button does exactly that, simply dumping out the entire Feather Wiki's data as a .json file.
  • The "Export Static HTML" button exports your entire Feather Wiki as a single HTML page with no JavaScript.

Once you're done managing your data, it is recommended that you remove the extension to reduce unnecessary files from being loaded.

Note: The "Export Pages" function in this extension requires a connection to the internet because it loads JSZip from an external CDN. It is possible to modify the code to use a local version, but you will need to download the JSZip code and modify the extension yourself for that.

Other Languages #

This extension is available in the following other languages:

You can use the extension in an available language by adding _language-code before .js in any of the instructions above. For example, https://feather.wiki/extensions/v1.8.x/data-import-export_hu.js for Hungarian.


Previous Versions #

Starting with Version 1.8.0, extensions are now stored in paths that include the minor version number (i.e. extensions for version 1.8.0 are stored in extensions/v1.8.x/) to indicate that they are incompatible with lower version numbers. The version of this extension compatible with versions of Feather Wiki below 1.8.0 can still be found at https://feather.wiki/extensions/data-import-export.js, but the old version will no longer receive updates.