如果我无法将 human.txt 文件放在站点根目录中,该将其放置在哪里?

发布于 2024-11-29 13:04:19 字数 1059 浏览 2 评论 0原文

背景


  • 我正在为客户构建一个网络应用程序。
  • 该应用程序将可供全世界访问,并将被放置在 Web 根目录中的目录(例如,/my-app)中。子域名不是一个选择,因为他们不想花钱购买另一个 SSL 证书。
  • /my-app 是我唯一可以接触的目录(不讲理的IT人员)。
  • 我正在使用需要归属的图标集。
  • 我已经联系了图标集的原始作者,并获得了在 people.txt 文件。
  • 我还觉得我应该提一下其他人的工作。这些信息与上述内容相结合可能会占用 20 行,因此考虑到我将提供缩小的标记、CSS,像 humans.txt 这样的单独文件似乎是放置此信息的理想位置。和脚本文件。

问题


  1. 因为我不允许将humans.txt 文件放置在web根目录中,(即使我是,将它放在那里也没有多大意义,因为它仅适用于网站的 /my-app 部分)是否可以执行以下操作:

    • 创建:/my-app/ humans.txt
    • 位置: 在我的标记中
  2. 我将提供严格的 HTML 4.01 和 authorrel 属性似乎不是该规范中可识别的链接类型。我是否需要做任何额外的事情来定义 author 链接类型,或者使用它的行为就足够了吗?

我什至不知道目前是否有任何非蜘蛛工具实际使用此文件,但我想最大程度地减少将来出现问题时无法正常工作的可能性。

Background


  • I'm building a web application for a client.
  • This app will be accessible to the world and will be placed in a directory (e.g., /my-app) in web-root. A subdomain isn't an option as they don't want to cough up the dough for another SSL cert.
  • /my-app is the only directory that I'm allowed to touch (unreasonable IT guys).
  • I'm using an icon set which requires attribution.
  • I've contacted the original author of the icon set and have gotten permission to link back to his work in the THANKS section of a humans.txt file.
  • I also feel like I should mention some other people's work. This information combined with the above will probably take up a good 20 lines, so a separate file like humans.txt seems like an ideal place to put this considering that I'll be serving minified markup, CSS, and script files.

Questions


  1. Since I'm not allowed to place a humans.txt file in web-root, (and even if I was, it wouldn't really make much sense to put it there as it only applies to the /my-app portion of the site) is it acceptable to do the following:

    • Create: /my-app/humans.txt
    • Place: <link rel="author" href="//example.com/my-app/humans.txt"> in my markup
  2. I'll be serving strict HTML 4.01 and the author value for the rel attribute doesn't seem to be a recognized link type in that specification. Do I need to do anything extra to define the author link type, or is the act of using it enough?

I don't even know if there are any non-spider tools that actually use this file at the moment, but I'd like to minimize the chance of this not working in the future when something does come along.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

隐诗 2024-12-06 13:04:19
  1. 我认为将文件放在应用程序自己的目录中是可以的,因为它澄清了它特定于目录内的内容,而不是您可能在根目录中找到的所有其他内容。

  2. 当然,如果 HTML 严格模式下错误为 0 就好了。然而,在这种情况下,您必须决定是否要这样做

    • 遵循标准,不要插入元标记(可以将其放在评论中或作为制作人员名单页面中的真实链接)
    • 忽略标准,因为标准很好,但不是圣杯(你可能会犯比这更糟糕的错误)
    • 选择另一个 Doctype,它允许您使用所需的元标记,但要再次测试所有浏览器是否正确呈现新的 Doctype

但是我不能这个决定适合你;)

  1. I think it is ok to put the file in the applications own directory, since it clarifies that it is specific to the content inside the directory and not all the other stuff you might find in the root directory.

  2. Of course it would be nice if there are 0 errors in HTML strict mode. However this is one situation where you have to decide if you want to

    • keep up with the standard and not insert the meta tag (maybe put it in a comment or as a real link in a credits page)
    • ignore the standard, because the standard is nice but not the holy grail (there are quite worse errors you can make than that)
    • chose another Doctype, which allows you to use the meta tag you want, but to test again if all browsers render the new Doctype correctly

However I can not make this decision for you ;)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文