OneDrive Source
The OneDrive plugin lets you sync photos from a shared OneDrive folder directly into your Revela project. Share a folder on OneDrive, paste the link, and your photos are downloaded automatically.
Overview
โ๏ธ Cloud Sync
Download photos from any OneDrive shared folder link.
๐ Folder Structure
Preserves the original folder hierarchy as galleries.
โก Smart Sync
Only downloads new or changed files โ skips what's already there.
Installation
The Standalone edition has the OneDrive plugin built in. In the Full edition, install it from the bundled packages:
revela plugin install Source.OneDrive
Setup
# Interactive setup (recommended)
revela config onedrive
# In scripts and CI, pass the link as an option
revela config onedrive --share-url https://1drv.ms/f/your-shared-folder-link
config onedrive writes project.json, so run it inside your project. Without a terminal and without --share-url it doesn't prompt; it shows the option to pass and exits with 1. The link must be an https address on 1drv.ms or onedrive.live.com.
Or add the share URL directly to project.json below plugins.oneDrive:
{
"plugins": {
"oneDrive": {
"shareUrl": "https://1drv.ms/f/your-shared-folder-link"
}
}
}
Usage
Sync Photos
# Download new and changed files
revela source onedrive sync
# Preview what would be downloaded (no changes)
revela source onedrive sync --dry-run
# Force re-download all files
revela source onedrive sync --force
# Remove local files that are no longer in OneDrive (asks first)
revela source onedrive sync --clean
# Same without asking, e.g. in scripts and CI (-y)
revela source onedrive sync --clean --yes
# Remove all local files that are not in OneDrive, ignoring include/exclude patterns
revela source onedrive sync --clean-all
# List every affected file (combine with --dry-run to preview)
revela source onedrive sync --dry-run --show-files
# Use a different share link for this run only
revela source onedrive sync --share-url https://1drv.ms/f/another-link
The short aliases are -n (--dry-run), -f (--force), -u (--share-url) and -y (--yes).
Careful with
--clean: local images and Markdown files that aren't in the OneDrive folder count as orphans. If yoursourcefolder also has photos or pages that don't come from OneDrive, preview with--dry-run --show-filesfirst. Outside a terminal (scripts, CI) Revela cannot ask, so--cleanstops before downloading or deleting anything unless you add--yes.
Full Workflow
# 1. Configure share link
revela config onedrive
# 2. Sync photos
revela source onedrive sync
# 3. Generate site
revela generate all
In the Full edition, run revela plugin install Source.OneDrive first. You can also connect OneDrive while creating a project: the project wizard offers it as an optional step.
Configuration
{
"plugins": {
"oneDrive": {
"shareUrl": "https://1drv.ms/f/your-link",
"defaultConcurrency": 4,
"includePatterns": ["*.jpg", "*.jpeg", "*.png", "*.tiff", "*.md", "_index.revela"],
"excludePatterns": ["*.tmp"]
}
}
}
| Option | Required | Default | Description |
|---|---|---|---|
shareUrl |
Yes | โ | OneDrive shared folder URL |
defaultConcurrency |
No | 4 |
Parallel downloads (increase for fast connections) |
includePatterns |
No | All files | File-name patterns to download (*, ?, case-insensitive) |
excludePatterns |
No | None | File-name patterns to skip; exclusion wins over inclusion |
Patterns match the file name only, not the folder path. Without includePatterns,
--clean only considers local images (.jpg, .jpeg, .png, .webp) and
Markdown files; excluded files are never downloaded or cleaned up.
Supported Link Formats
https://1drv.ms/f/...โ short linkshttps://onedrive.live.com/...โ full links
Both public and organization-shared folders are supported.
Progress Display
The plugin shows a two-phase progress display:
- Scanning โ discovers files and folders with a spinner
- Downloading โ progress bar with file count and remaining time
โ Scanning OneDrive folder...
โ Found 142 files in 8 folders
Downloading (42/142) vacation/sunset.jpg โโโโโโโโโโโโโโโโโโ 29% ETA 02:15
When the output is not a terminal (CI logs, > sync.log), the spinner and progress bar are replaced by plain lines, one about every 10 %.
Environment Variables
All settings can be overridden with environment variables:
SPECTARA__REVELA__PLUGINS__ONEDRIVE__SHAREURL=https://1drv.ms/f/...
SPECTARA__REVELA__PLUGINS__ONEDRIVE__DEFAULTCONCURRENCY=8
Requirements
- OneDrive shared folder link (public or organization-shared)
- Internet connection for syncing
- Files up to 1 GB each; a larger file stops the sync with an error and keeps any existing local copy