Releases: 11ty/eleventy-import
Releases · 11ty/eleventy-import
Eleventy Import v1.0.8
- Adds
--assetrefs=disabled
option to skip asset downloads from HTML content.
Full Changelog: v1.0.7...v1.0.8
Eleventy Import v1.0.7
- Skip markdown conversion on
text
content types. Fix Bluesky import issue that manifested as unescaped output.
Full Changelog: v1.0.6...v1.0.7
Eleventy Import v1.0.6
- Revert changes in
v1.0.5
(a little too eager here, sorry folks!). This release matchesv1.0.4
.
Full Changelog: v1.0.5...v1.0.6
Reverted: Eleventy Import v1.0.5
Fix issue with entity processing in XML Parser (affecting RSS import types), manifested as unescaped output after markdown conversion.Reverted in v1.0.6
Full Changelog: v1.0.4...v1.0.5
Eleventy Import v1.0.4
- Markdown conversion improvements:
- Use
prettier
to format code blocks (when language is known) turndown
dependency fix: incorrect unescaping of escaped markdown content, thanks @bjones1 for mixmark-io/turndown#438- Keep more HTML tags by default (abbr, address, audio, cite, dd, del, details, dfn, form, iframe, ins, kbd, object, q, sub, s, samp, svg, table, time, var, video, wbr)
- Use
- Adds
--assetrefs=colocate
option to put content files and assets in the same folder structure (for easier passthrough copy) - Fix to make sure URL encoded file names are escaped properly
- Automatically download assets in
metadata.media
entries (currently WordPress Featured and Open Graph images)
Full Changelog: v1.0.3...v1.0.4
Eleventy Import v1.0.3
- Fixes #3, issue with Programmatic API (missing exports 😭)
Full Changelog: v1.0.2...v1.0.3
Eleventy Import v1.0.2
- Adds
--assetrefs=absolute
CLI option to use absolute paths for downloaded assets (instead of relative paths)
Full Changelog: v1.0.1...v1.0.2
Eleventy Import v1.0.1
- Adds support for
media:content
in RSS feeds. - Cleanup for BlueskyUser and FediverseUser internals (inherits from Rss)
- Update to Eleventy Fetch v5.0 stable (previously v5.0.0-beta)
Full Changelog: v1.0.0...v1.0.1
Eleventy Import v1.0.0
A small utility (and CLI) to import content files from various content sources. Requires Node 18 or newer.
- Compatible: Works with a bunch of different data sources (see below) and more to come.
- Export your entire WordPress site statically in a single command.
- Show recent Bluesky or Mastodon posts on your own web site without an expensive third party embed component.
- Make anything on the web into a CMS for your web site using Indieweb PESOS.
- Clean: Converts imported content to markdown files in your repository (
--format=html
to use raw HTML). - Standalone: downloads all referenced assets (images, videos, stylesheets, scripts, etc) in content and co-locates assets with the content.
- Resumable: Can stop and resume a large import later, reusing a local cache (with configurable cache duration)
- Repeatable: avoids overwriting existing content files (unless you opt-in with
--overwrite
).- This allows you to continue using an import source for new content while editing the already imported content.
- Use
--dryrun
for testing without writing any files.
Usage
Published to npm.
npx @11ty/import --help
npx @11ty/import --version
# Import content
npx @11ty/import [type] [target]
# Dry run (don’t write files)
npx @11ty/import [type] [target] --dryrun
# Quietly (limit console output)
npx @11ty/import [type] [target] --quiet
# Change the output folder (default: ".")
npx @11ty/import [type] [target] --output=dist
# Allow overwriting existing files
npx @11ty/import [type] [target] --overwrite
# Change local fetch cache duration (default: 24h)
npx @11ty/import [type] [target] --cacheduration=20m
# Change output format (default: markdown)
npx @11ty/import [type] [target] --format=html
# EXPERIMENTAL: Persist *new* non-draft content
# - `github` persist type requires a `GITHUB_TOKEN` environment variable.
npx @11ty/import [type] [target] --persist=github:zachleat/wp-awesome
Service Types
atom
(URL)bluesky
(username)fediverse
(username)rss
(URL)wordpress
(blog home page URL)youtubeuser
(user id)
Example: YouTube
# Import recent YouTube Videos for one user
npx @11ty/import youtubeuser UCskGTioqrMBcw8pd14_334A
Example: WordPress
# Import *all* posts from the WordPress API
# Draft posts available when WORDPRESS_USERNAME and WORDPRESS_PASSWORD environment
# variables are supplied, read more: https://www.11ty.dev/docs/environment-vars/
npx @11ty/import wordpress https://blog.fontawesome.com
Example: Atom Feeds
# Import Atom feed posts
npx @11ty/import atom https://www.11ty.dev/blog/feed.xml
# Import GitHub releases (via Atom)
npx @11ty/import atom https://github.com/11ty/eleventy/releases.atom
Example: RSS Feeds
# Import RSS feed posts
npx @11ty/import rss https://fosstodon.org/users/eleventy.rss
Example: Fediverse
# Import recent Mastodon posts (via RSS)
npx @11ty/import fediverse [email protected]
Example: Bluesky
# Import recent Bluesky posts (via RSS)
npx @11ty/import bluesky @11ty.dev
Eleventy Import v1.0.0-beta.5
- Did an oopsie and the test suite was failing.
Full Changelog: v1.0.0-beta.4...v1.0.0-beta.5