Graph View is a React-based WordPress plugin that visualizes your site's content as interactive graphs using Cytoscape.js. Inspired by tools like Obsidian, it provides a dynamic way to explore relationships between posts, pages, taxonomies, and internal links both in the admin dashboard and on the frontend.
⚠️ Warning: This plugin is currently in early development and is NOT ready for production use. It is being actively developed and may contain bugs, security issues, or incomplete features. Use at your own risk in development/testing environments only.
- Interactive Graph Visualization: Visualize your WordPress content relationships in a dynamic graph interface.
- Admin Dashboard Integration: Access and manage your site's graph directly from the WordPress admin panel.
- Gutenberg Editor Sidebar: Enhance the Gutenberg editing experience with a sidebar panel displaying related content graphs.
- Frontend Display: Automatically insert interactive graphs above or below your posts and pages.
- Customizable Settings: Configure graph display options, including automatic insertion and positioning.
- Responsive Design: Ensures optimal viewing across various devices and screen sizes.
- REST API Endpoints: Efficiently fetch graph data with customizable REST API routes.
-
Download the Plugin
Download the latest version of the Graph View plugin from the GitHub repository or the WordPress plugin repository.
-
Upload to WordPress
-
Via WordPress Admin:
- Navigate to
Plugins > Add New
. - Click on
Upload Plugin
. - Choose the downloaded
my-graph-view.zip
file. - Click
Install Now
and thenActivate
.
- Navigate to
-
Via FTP:
- Extract the
my-graph-view.zip
file. - Upload the
my-graph-view
folder to the/wp-content/plugins/
directory. - Navigate to
Plugins
in the WordPress admin and activate Graph View.
- Extract the
-
-
Build Assets (Developer Setup Only)
If you're modifying the plugin's source code:
cd my-graph-view npm install npm run build
-
Access Graph View
- Navigate to
Graph View
in the WordPress admin sidebar. - Explore the interactive graph representing your site's content relationships.
- Navigate to
-
Settings
- Go to
Graph View > Settings
. - Automatically Insert Mini-Graph: Toggle whether to display a graph on single posts/pages.
- Graph Position: Choose to display the graph above or below the content.
- Click
Save Settings
to apply changes.
- Go to
-
Open Gutenberg Editor
- Edit or create a new post/page using the Gutenberg editor.
-
Graph Panel
- In the document settings sidebar, find the
Graph View
panel. - View a miniature graph highlighting relationships related to the current post/page.
- In the document settings sidebar, find the
- Based on your settings, an interactive graph will automatically appear above or below your post/page content.
- Interactivity:
- Hover: Display information about nodes (posts/pages) and edges (relationships).
- Click: Open the related post/page in a new tab or navigate to it directly.
- Theme Colors: The plugin adapts to your theme's primary and secondary colors. You can define custom colors in the settings or modify the
graphview_get_theme_colors
function inplugin.php
.
-
Full Graph:
/wp-json/graphview/v1/full-graph
- Method: GET
- Permissions:
manage_options
- Description: Retrieves the entire site graph data.
-
Local Graph:
/wp-json/graphview/v1/local-graph/{post_id}
- Method: GET
- Permissions: Public
- Description: Retrieves graph data related to a specific post/page.
-
Scripts:
npm run build
: Builds production assets.npm run dev
: Watches and builds assets during development.npm run bundle
: Builds and packages the plugin into a zip file.
-
Webpack Configuration: Located in
webpack.config.js
, customize entry points, output directories, and externals as needed.
Contributions are welcome! Please follow these steps:
-
Fork the Repository
-
Create a Feature Branch
git checkout -b feature/YourFeature
-
Commit Your Changes
git commit -m "Add some feature"
-
Push to the Branch
git push origin feature/YourFeature
-
Open a Pull Request
If you encounter any issues or have questions, please open an issue in the GitHub repository or contact the author.
- Major update with React-based admin interface.
- Introduced Gutenberg editor sidebar panel.
- Enhanced frontend graph visualization with automatic insertion options.
- Improved REST API endpoints for fetching graph data.
- Added comprehensive settings page for customization.
This plugin is licensed under the GPL-2.0+ license.
Author: James LePage
Website: https://www.j.cv
Version: 2.0.0
Note: Ensure that your theme supports the necessary styles and scripts for optimal integration with Graph View.