Skip to content

Add Remote Content Integration for Docusaurus #54

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Jun 25, 2025

Conversation

petecheslock
Copy link
Collaborator

@petecheslock petecheslock commented Jun 18, 2025

🎯 Overview

This PR implements a modular remote content system for the Docusaurus site that automatically syncs documentation from the main llm-d repository. This replaces manually maintained copies with an automated solution that keeps content fresh and reduces maintenance overhead.

This fixes #47

🚀 What's New

Remote Content System

  • Automated syncing of CONTRIBUTING.md and CODE_OF_CONDUCT.md from the main llm-d repo
  • Source attribution with direct edit links on every synced page
  • Modular architecture allowing easy addition of new remote content sources
  • Independent plugin management that doesn't interfere with existing Docusaurus configuration

Key Features

  • ✅ Automatic content updates from remote repositories
  • ✅ Source callouts with GitHub edit links on each page
  • ✅ Consistent formatting via shared utilities
  • ✅ Broken link fixing (relative → absolute URLs)
  • ✅ Proper sidebar positioning and navigation

📁 New Structure

remote-content/
├── remote-content.js              # Main plugin configuration
├── remote-sources/
│   ├── utils.js                   # Shared utilities for consistent formatting
│   ├── contribute.js              # Contributing guide sync
│   ├── code-of-conduct.js         # Code of conduct sync
│   └── example-readme.js.template # Template for adding new sources
└── README.md                      # Complete documentation

🔧 Changes Made

Content Updates

  • Removed manually maintained docs/community/contribute.md (now auto-synced)
  • Updated sidebar positioning: Contributing (1) → Code of Conduct (2) → Talk to us (3)
  • Fixed broken relative link in quickstart guide

Technical Implementation

  • Added docusaurus-plugin-remote-content dependency
  • Created modular remote content system with utilities
  • Updated .gitignore to exclude auto-generated files
  • Modified docusaurus.config.js to load remote content plugins

🧪 Testing

  • Content syncs correctly from remote repositories
  • Source attribution appears on all remote pages
  • Edit links point to correct GitHub URLs
  • Sidebar navigation works properly
  • Site builds and runs without errors
  • Relative links are properly transformed

📖 Usage

Adding new remote content is now a simple 3-step process:

  1. Copy the template file
  2. Edit placeholders with your values
  3. Add import to remote-content.js

See remote-content/README.md for complete documentation.

@petecheslock petecheslock self-assigned this Jun 18, 2025
Copy link

netlify bot commented Jun 18, 2025

Deploy Preview for elaborate-kangaroo-25e1ee ready!

Name Link
🔨 Latest commit aef87d5
🔍 Latest deploy log https://app.netlify.com/projects/elaborate-kangaroo-25e1ee/deploys/685c10c05644230008268655
😎 Deploy Preview https://deploy-preview-54--elaborate-kangaroo-25e1ee.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@petecheslock
Copy link
Collaborator Author

@petecheslock
Copy link
Collaborator Author

I'm not sure how i feel about the callout at the top of the files to be honest - if we feel like its too much we could adjust it or change the color. If we put it at the end then it might be lost and folks may not realize they can edit or submit an issue.

@jessicachitas
Copy link
Collaborator

I don't mind the colour of the callout. I was doing a bit of research and I believe you can change the colour with CSS but I don't think it's something to worry about for the moment! Great to see it working!

petecheslock and others added 6 commits June 25, 2025 10:38
Remove community/contribute.md - this is pulled via remote-content plugin
Add remote-content plugin and pull from sources files in project
rewrite any links that are broken
Create a utils to easily manage the links to the source

Signed-off-by: Pete Cheslock <[email protected]>
Looks like I got it working!

Signed-off-by: JJ Asghar <[email protected]>
Remove community/contribute.md - this is pulled via remote-content plugin
Add remote-content plugin and pull from sources files in project
rewrite any links that are broken
Create a utils to easily manage the links to the source

Signed-off-by: Pete Cheslock <[email protected]>
Signed-off-by: Pete Cheslock <[email protected]>
Signed-off-by: Pete Cheslock <[email protected]>
@petecheslock petecheslock force-pushed the feat/remote-content branch from 99055d6 to a620a58 Compare June 25, 2025 14:39
- Added security.md to .gitignore to prevent tracking of the file.
- Updated docusaurus.config.js to improve plugin organization and clarity.
- Removed the security.md file as it is no longer needed.

Signed-off-by: Pete Cheslock <[email protected]>
@petecheslock petecheslock merged commit 53ad2bb into llm-d:main Jun 25, 2025
5 checks passed
@petecheslock petecheslock deleted the feat/remote-content branch June 25, 2025 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement the remote-content plugin for Docusaurus to pull docs directly from GitHub
3 participants