Last updated: Aug 1, 2025, 02:00 PM UTC

Web Publishing Guide: Share Your Documentation with the World

Status: Complete
Purpose: Business-friendly guide for publishing documentation to a professional website
Target Users: Project managers, stakeholders, and team members who need to share documentation externally


What Does "Publish to Web" Mean?

Simply put: Transform your markdown documentation into a professional, shareable website that anyone can access with a web link.

The Business Translation

When you say "publish", here's what actually happens:

What You Have What You Get
Markdown files in folders Professional website with navigation
Local-only documentation Public URL anyone can visit
Technical file structure Beautiful, responsive web pages
Team-only access Stakeholder-ready presentation

Business Benefits

  • Client Presentations: Share polished documentation with clients instantly
  • Investor Relations: Professional presentation of project progress and planning
  • Stakeholder Updates: Easy access for partners, advisors, and team members
  • SEO Benefits: Search-discoverable content with proper meta tags
  • Mobile-Friendly: Responsive design works on all devices
  • Search Functionality: Built-in search helps users find content quickly

Important: User Verification Required

Before any publishing happens, we need to confirm you understand what you're doing:

Content Privacy Check

Are you sure you want to publish your documentation to an external website?

This will make your content:

  • Publicly accessible via a web URL
  • Searchable by search engines (if SEO enabled)
  • Shareable with anyone who has the link
  • Potentially discoverable by unauthorized users

Pre-Publishing Checklist

Before proceeding, verify:

  • Content Review: All documentation is ready for external viewing
  • Sensitive Information: No confidential data, API keys, or internal details
  • Quality Check: Documents follow proper formatting and are complete
  • Stakeholder Approval: Team/management has approved external sharing
  • Private Content: Confirm private directories are properly configured

Confirmation Protocol

When a user says "publish", ask them:

"Are you ready to publish your documentation to an external website? This will make your content publicly accessible via a web URL that you can share with clients, stakeholders, and team members. Type 'YES, PUBLISH' to confirm you want to proceed."

Only proceed if they explicitly confirm their intent.


The Publishing Process

Step 1: Understanding the Command

The Magic Command:

npx -y @knowcode/doc-builder@latest deploy

What Each Part Does:

  • npx: Downloads and runs the latest version of the tool
  • -y: Automatically confirms any prompts (streamlined deployment)
  • @knowcode/doc-builder@latest: The documentation publishing tool
  • deploy: The command to publish to the web

Step 2: Where to Run It

Always run from the project root directory (where your doc-builder.config.js file is located):

# Correct location - project root
/Users/your-name/your-project/
β”œβ”€β”€ doc-builder.config.js  ← Config file should be here
β”œβ”€β”€ docs/                  ← Your documentation folder
β”œβ”€β”€ html/                  ← Generated website files
└── package.json           ← Project file

Step 3: What Happens Behind the Scenes

The Automated Process:

  1. Content Processing

    • Reads all markdown files from the docs/ directory
    • Converts markdown to beautiful HTML pages
    • Processes images, diagrams, and attachments
    • Applies your configured styling and branding
  2. Website Generation

    • Creates responsive web pages with navigation
    • Generates search functionality and SEO meta tags
    • Applies your chosen theme and design system
    • Builds mobile-friendly responsive layouts
  3. Vercel Deployment

    • Uploads generated website to Vercel hosting platform
    • Configures custom domain and SSL certificates
    • Sets up CDN for fast global access
    • Provides you with a shareable URL
  4. Verification & Notification

    • Confirms successful deployment
    • Provides the live website URL
    • Enables real-time monitoring and analytics

Your Current Configuration

Based on your doc-builder.config.js settings:

Website Features Enabled

  • Dark Mode Support - Users can toggle light/dark themes
  • Mermaid Diagrams - Technical diagrams render beautifully
  • PDF Downloads - Users can download pages as PDFs
  • Tooltips - Enhanced user experience with helpful hints
  • Responsive Design - Works perfectly on mobile and desktop
  • SEO Optimization - Search engine friendly with meta tags

Security Settings

  • Authentication Disabled - Website is publicly accessible
  • Private Directory Auth Disabled - Private folders need manual review
  • Review Needed: Ensure sensitive content is properly excluded

Deployment Platform

  • Platform: Vercel (professional hosting with global CDN)
  • Output Directory: html/ (where the generated website files live)
  • Domain: Will be provided after deployment

Step-by-Step Deployment Instructions

‍♂️ Quick Deployment (2 Minutes)

  1. Open Terminal/Command Prompt

    cd /path/to/your/project
    
  2. Verify You're in the Right Location

    ls -la
    # You should see: doc-builder.config.js
    
  3. Run the Deployment Command

    npx -y @knowcode/doc-builder@latest deploy
    
  4. Monitor Progress

    • Watch for "Building documentation..." messages
    • Look for "Deploying to Vercel..." status
    • Wait for "Deployment successful!" confirmation
  5. Get Your Website URL

    • Copy the provided URL (e.g., https://your-docs-abc123.vercel.app)
    • Test the link in your browser
    • Share with stakeholders as needed

What Success Looks Like

You'll see output similar to:

βœ… Documentation built successfully
πŸš€ Deploying to Vercel...
🌐 Deployment complete!
πŸ“ Your website is live at: https://your-project-xyz789.vercel.app
πŸ“Š Analytics available at: [dashboard URL]

After Publishing: Next Steps

Immediate Actions

  1. Test Your Website

    • Visit the provided URL
    • Navigate through different sections
    • Test on mobile and desktop
    • Verify all images and links work
  2. Share with Stakeholders

    • Send the URL to relevant team members
    • Include it in client communications
    • Update project documentation with the link
    • Add to investor update materials
  3. Monitor Performance

    • Check Vercel dashboard for analytics
    • Monitor page load speeds
    • Review search functionality
    • Track visitor engagement

Ongoing Maintenance

When to Republish:

  • After significant content updates
  • πŸ†• When adding new documentation sections
  • After fixing errors or broken links
  • When updating styling or branding

How Often:

  • Weekly: For active projects with frequent updates
  • Monthly: For stable documentation with occasional changes
  • As Needed: For urgent fixes or critical updates

Troubleshooting Common Issues

Problem: "Command not found" Error

Symptoms:

npx: command not found

Solution:

  1. Install Node.js from nodejs.org
  2. Restart your terminal
  3. Verify installation: node --version
  4. Try the deploy command again

Problem: "No such file or directory" Error

Symptoms:

Error: Cannot find doc-builder.config.js

Solution:

  1. Navigate to the correct directory: cd /path/to/project
  2. Verify config file exists: ls doc-builder.config.js
  3. If missing, you're in the wrong directory

Problem: Deployment Fails with Authentication Error

Symptoms:

Error: Vercel authentication failed

Solution:

  1. Check your internet connection
  2. Verify Vercel account settings
  3. Try again in a few minutes (may be temporary)
  4. Contact support if persistent

Problem: Website Shows 404 Errors

Symptoms:

  • Pages exist locally but show "Not Found" online
  • Navigation links break

Solution:

  1. Check File Names: Ensure no special characters or spaces
  2. Verify Links: Update any absolute paths to relative paths
  3. Rebuild: Run the deploy command again
  4. Clear Cache: Try accessing the site in an incognito browser

Problem: Images Don't Display

Symptoms:

  • Broken image icons on website
  • Images work locally but not online

Solution:

  1. Check Image Paths: Verify images are in _images/ directories
  2. File Extensions: Ensure proper extensions (.png, .jpg, .svg)
  3. Case Sensitivity: Match exact filename capitalization
  4. File Size: Large images may fail to upload (>10MB limit)

Security and Privacy Considerations

Content Security Review

Before Each Publish:

  • API Keys: Remove any authentication tokens or secrets
  • Internal URLs: Replace internal server references
  • Personal Information: Scrub any personal contact details
  • Financial Data: Remove budget or cost information
  • Strategic Plans: Consider if competitive information should be public
  • Client Data: Ensure no client-confidential information

Private Content Management

Your Current Setup:

  • Private directories: docs/private/ - Review needed
  • Authentication: Disabled - Content is publicly accessible
  • Directory auth: Disabled - Manual review required

Recommendations:

  1. Move Sensitive Content: Keep truly private docs outside the docs/ folder
  2. Review Private Directories: Ensure they contain only shareable content
  3. Consider Authentication: Enable if you need access control
  4. Regular Audits: Review published content monthly

Advanced Features and Customization

Branding and Styling

Current Configuration:

  • Site Name: "Documentation" (can be customized)
  • Favicon: (emoji favicon)
  • Theme: Dark mode enabled with subtle colors
  • Icons: Phosphor icon system with regular weight

Customization Options:

  • Update siteName in config for better branding
  • Replace favicon with company logo
  • Modify siteDescription for better SEO
  • Add keywords array for search optimization

Analytics and Tracking

Built-in Features:

  • Vercel provides deployment analytics
  • Page view tracking available in dashboard
  • Performance monitoring included

Enhancement Options:

  • Add Google Analytics integration
  • Set up conversion tracking
  • Monitor search queries and popular content
  • Track user engagement and session duration

SEO Optimization

Current SEO Settings:

  • SEO Enabled: Meta tags and descriptions generated
  • Sitemap Generation: Automatic XML sitemap creation
  • Robots.txt: Search engine crawling instructions
  • Auto Keywords: Intelligent keyword extraction from content

SEO Enhancement Tips:

  1. Update Site URL: Add your custom domain to config
  2. Add Author Information: Include author and organization details
  3. Social Media: Configure Twitter handle and OpenGraph images
  4. Structured Data: Rich snippet support for better search results

πŸ“ž Support and Resources

Getting Help

If You Encounter Issues:

  1. Documentation: Check the @knowcode/doc-builder documentation
  2. Search: Look for similar issues in GitHub discussions
  3. Community: Ask questions in relevant developer forums
  4. Support: Contact the doc-builder support team

Related Guides

In This Documentation System:

External Resources


Success Stories and Best Practices

Effective Publishing Workflows

Weekly Documentation Review:

  1. Monday: Review and update content
  2. Wednesday: Test locally and fix issues
  3. Friday: Publish updates and notify stakeholders

Stakeholder Communication:

  • Send weekly digest emails with documentation updates
  • Include direct links to specific sections that changed
  • Provide context for major updates or new content
  • Request feedback and incorporate suggestions

Quality Maintenance:

  • Monthly content audits for accuracy and relevance
  • Quarterly design and branding reviews
  • Annual comprehensive restructuring if needed
  • Continuous monitoring of user feedback and analytics

Pro Tips for Professional Results

  1. Content Quality

    • Write for your audience (clients, investors, team members)
    • Use consistent terminology and styling
    • Include clear navigation and section summaries
    • Add relevant images and diagrams for clarity
  2. Performance Optimization

    • Optimize images for web (compress large files)
    • Use appropriate heading hierarchy for SEO
    • Include descriptive alt text for accessibility
    • Test loading speed on mobile devices
  3. User Experience

    • Organize content logically with clear categories
    • Use search-friendly titles and descriptions
    • Include a comprehensive table of contents
    • Provide clear next steps and calls to action

Remember: Publishing documentation is about sharing your expertise and progress with the world. Make it count by ensuring quality, accuracy, and professional presentation.


This guide ensures your documentation publishing process is smooth, secure, and successful. Great documentation deserves a great presentation!