0

我正在尝试为我工作的公司执行 POC,以了解在我们的项目中使用 DocC 可以获得的潜在价值。

在我开发之前,我看过 WWDC 2021 中与 DocC 相关的 4 个视频,访问Apple 开发者网站并阅读一些页面和博客以收集一些信息和想法。

对于我的开发,在将工作推送到服务器之前,我开始在我的开发机器上使用 MAMP。

到目前为止,我认为我已经完成了在网站上托管文档档案的所有必要步骤。但是,我想知道我是否错过了一些东西,因为我的 index.html 看起来是空白的。

我使用的代码是:

index.html(主要)

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>DocC POC</title>
</head>
<body>
    <h2>Welcome</h2>
    <button onclick="location.href = 'documentation/index.html';" id="myButton" class="float-left submit-button" >Read data framwework documentation</button>
</body>
</html>

.htaccess

# Enable custom routing.
RewriteEngine On
# Route documentation and tutorial pages.
RewriteRule ^(documentation|tutorials)\/.*$ Data.doccarchive/index.html [L]
# Route files and data for the documentation archive.
#
# If the file path doesn't exist in the website's root ...
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# ... route the request to that file path with the documentation archive.
RewriteRule .* Data.doccarchive/$0 [L]

文件结构

在此处输入图像描述

图片证明doccarchive不是空的

在此处输入图像描述

空白页图片

在此处输入图像描述

有任何想法吗??

4

0 回答 0