A WordPress block plugin for displaying responsive book cover grids. Fetches cover images automatically from OpenLibrary API by title, with customizable captions, columns, margins, and responsive layout settings.
- π Automatic Cover Fetching - Search books by title and fetch covers from OpenLibrary
- π¨ Responsive Grid Layout - Customize columns for desktop, tablet, and mobile
- βοΈ Custom Captions - Add overlay captions with custom text
- π Clickable Links - Make book covers link to any URL
- πΌοΈ Manual Upload - Replace fetched covers with custom images
- π¨ Customizable Design - Adjust margins and background colors
- π Translation Ready - Includes Spanish translation, ready for more
Add books by title and customize the layout directly in the WordPress editor.
Beautiful book cover displays that adapt to any screen size.
- Go to Plugins β Add New in your WordPress admin
- Search for "Book Grid"
- Click Install Now and then Activate
- Download the latest release
- Go to Plugins β Add New β Upload Plugin
- Choose the ZIP file and click Install Now
- Activate the plugin
- Create or edit a post/page
- Click the + button to add a block
- Search for "Book Grid" and add it
- Enter book titles to fetch covers automatically
- Customize columns, margins, and colors in the sidebar settings
- Click Details on any book to add captions and links
- Node.js 14+ and npm
- WordPress 6.0+
- PHP 7.2+
book-grid/
βββ src/ # Source files
β βββ edit.js # Block editor component
β βββ save.js # Block save function
β βββ index.js # Block registration
β βββ view.js # Frontend JavaScript
β βββ style.scss # Frontend styles
β βββ editor.scss # Editor styles
βββ build/ # Compiled files (generated)
βββ languages/ # Translation files
βββ book-grid.php # Main plugin file
βββ block.json # Block metadata
βββ webpack.config.js # Build configuration
# Clone the repository
git clone https://github.com/vianasw/book-grid.git
cd book-grid
# Install dependencies
npm install
# Build the plugin
npm run build
# Create plugin ZIP
npm run plugin-zip# Start development mode with hot reload
npm run start
# Build for production
npm run build
# Format code
npm run format
# Lint JavaScript
npm run lint:js
# Lint CSS
npm run lint:cssTo test in a local WordPress installation:
- Copy
sync-dev.sh.exampletosync-dev.sh - Update the path to your WordPress plugins directory
- Run
./sync-dev.shto sync files
The plugin is translation-ready and currently includes:
- πͺπΈ Spanish (es_ES)
Community translations are welcome! See languages/README.md for instructions.
This plugin uses the OpenLibrary Covers API to fetch book cover images. The API is free and doesn't require authentication.
- Chrome/Edge (latest)
- Firefox (latest)
- Safari (latest)
- Modern mobile browsers
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Automatic book cover fetching from OpenLibrary
- Responsive grid layout with customizable columns
- Custom captions and links
- Manual image upload option
- Spanish translation included
This project is licensed under the GPL-2.0-or-later License - see the LICENSE file for details.
- Built with @wordpress/scripts
- Book covers from OpenLibrary
- Developed by vianasw
- π Report bugs
- π‘ Request features
- WordPress.org Plugin Page (Coming Soon)
- GitHub Repository
The distributed build/ assets are compiled from the human-readable source in src/. Build scripts rely on @wordpress/scripts. Install dependencies with npm install and run npm run build to regenerate the production assets.
This plugin calls Open Library to fetch book covers automatically:
- Service: Open Library Search and Covers APIs (
openlibrary.org,covers.openlibrary.org) - Data sent: The book title entered in the block is sent as a search query when you add or update a book. Cover image requests include the returned cover ID. No other data is transmitted.
- Purpose: Retrieve book cover images so the grid can display artwork without manual uploads.
- Policies: Terms of Service | Privacy Policy