Running Xcode DocC documentation via Apache locally on macOS

Viewed 225
1 Answers
  • Get the SlothCreator example project and build the documentation archive in Xcode or the command line as described in Distributing Documentation to External Developers

  • Install httpd via Homebrew:

    brew install httpd
    
  • Copy SlothCreator.doccarchive to /opt/homebrew/var/www/ (paths are for M1 Macs)

  • Edit /opt/homebrew/etc/httpd/httpd.conf:

    • Allow AllowOverride All for the DocumentRoot Directory

    • Enable LoadModule rewrite_module

  • Edit /opt/homebrew/var/www/.htaccess and use the example configuration as provided by Apple in Distributing Documentation to External Developers

  • Restart Apache: sudo apachectl restart

  • You should now be able to open http://localhost:8080/documentation/slothcreator/ and http://localhost:8080/tutorials/slothcreator/

Enjoy!

Related