在 macOS 上通过 Apache 本地运行 Xcode DocC 文档 [英] Running Xcode DocC documentation via Apache locally on macOS

查看:91
本文介绍了在 macOS 上通过 Apache 本地运行 Xcode DocC 文档的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Xcode 13 的 DocC 文档档案可以使用自定义 Apache .htaccess 文件托管,如 向外部开发人员分发文档托管和自动化您的 DocC 文档 - WWDC21.

Xcode 13's DocC documentation archives can be hosted using a custom Apache .htaccess file as described in Distributing Documentation to External Developers and Host and automate your DocC documentation - WWDC21.

SlothCreator 示例项目进行设置的步骤是什么?macOS/M1 Mac 以便您可以在浏览器中查看文档?

What are the steps to get that set up for the SlothCreator example project on a macOS / a M1 Mac so you can look at the documentation in the browser?

推荐答案

  • 获取 SlothCreator 示例项目并在 Xcode 中构建文档存档或向外部开发人员分发文档中所述的命令行一个>

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

      通过 Homebrew 安装 httpd:

      Install httpd via Homebrew:

      brew install httpd
      

    • SlothCreator.doccararchive 复制到 /opt/homebrew/var/www/(路径适用于 M1 Mac)

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

      编辑/opt/homebrew/etc/httpd/httpd.conf:

      • 允许 AllowOverride All 用于 DocumentRoot 目录

      • Allow AllowOverride All for the DocumentRoot Directory

      启用LoadModule rewrite_module

      编辑 /opt/homebrew/var/www/.htaccess 并使用 Apple 在 向外部开发人员分发文档

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

      重启Apache:sudo apachectl restart

      您现在应该可以打开 http://localhost:8080/documentation/slothcreator/http://localhost:8080/tutorials/slothcreator/

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

      享受吧!

      这篇关于在 macOS 上通过 Apache 本地运行 Xcode DocC 文档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆