Xcode 13 的 DocC 文档存档可以使用自定义 Apache.htaccess
文件进行托管,如向外部开发人员分发文档和托管和自动化您的 DocC 文档 - WWDC21中所述。
在 macOS / M1 Mac 上为SlothCreator示例项目进行设置的步骤是什么,以便您可以在浏览器中查看文档?
Xcode 13 的 DocC 文档存档可以使用自定义 Apache.htaccess
文件进行托管,如向外部开发人员分发文档和托管和自动化您的 DocC 文档 - WWDC21中所述。
在 macOS / M1 Mac 上为SlothCreator示例项目进行设置的步骤是什么,以便您可以在浏览器中查看文档?
获取SlothCreator示例项目并在 Xcode 或命令行中构建文档存档,如向外部开发人员分发文档中所述
通过 Homebrew 安装 httpd:
brew install httpd
复制SlothCreator.doccarchive
到/opt/homebrew/var/www/
(路径适用于 M1 Mac)
编辑/opt/homebrew/etc/httpd/httpd.conf
:
允许AllowOverride All
DocumentRoot 目录
使能够LoadModule rewrite_module
编辑/opt/homebrew/var/www/.htaccess
并使用 Apple 在向外部开发人员分发文档中提供的示例配置
重启阿帕奇:sudo apachectl restart
您现在应该能够打开http://localhost:8080/documentation/slothcreator/
并http://localhost:8080/tutorials/slothcreator/
享受!