在哪里可以找到 Rails API rdoc 模板

发布于 2024-11-05 18:57:37 字数 607 浏览 6 评论 0 原文

我正在尝试使用版本 3.5.3 来美化我的 rdoc 文档。我不喜欢内置的 darkfish 主题,因此我尝试找到一种方法将其替换为官方 Rails API 文档所使用的主题,网址为 http://api.rubyonrails.org/,但我没有运气以任何现成的形式找到它。我已经在 github 上进行了各种搜索。

到目前为止我发现的是

这可能有点已经过时了,而且它已经分叉

两者不错,但不完全是我想要的。因此,在我开始摆弄这些模板之前,有谁知道 Rails API 文档使用的模板是否可以在某个地方作为 gem 使用?

谢谢!

I'm trying to prettify my rdoc documentation, using version 3.5.3. I'm not a fan of the built-in darkfish theme, so I tried to find a way to replace it with the one used by the official Rails API documentation at http://api.rubyonrails.org/, but I've had no luck finding it in any readily available form. I've searched all over github, among other things.

What I've found so far is

which might be slightly out of date, and it's fork

Both are nice, but not quite what I want. So before I start fiddling with those templates, does anyone know if the template used by the Rails API docs is available as a gem somewhere?

Thanks!

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

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

发布评论

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

评论(2

拿命拼未来 2024-11-12 18:57:37

我知道这已经很晚了,但看起来新版本的 Rails 使用了名为 sdoc 的东西,它通过 JavaScript 搜索增强了输出,并且在我看来更干净一些。执行简单的“gem install sdoc”即可获得您需要的内容,然后只需使用 rdoc.options << '-f' << 'sdoc'。

位于https://github.com/voloko/sdoc/

github项目似乎 ,谢谢提问!如果没有发布最初的答案,我将永远找不到该看的地方,并且在我自己的项目中一直被那个可怕的黑鱼主题所困扰!

I know this is very late, but it looks like the new version of Rails uses something called sdoc, which enhances the output with JavaScript searching, and is a little cleaner IMO. Doing a simple "gem install sdoc" will get what you need, then just use rdoc.options << '-f' << 'sdoc'.

The github project appears to be at https://github.com/voloko/sdoc/

By the way, thanks for the question! Without the initial answer posted, I'd have never found where to look, and been stuck with that horrible darkfish theme for my own projects!

苏璃陌 2024-11-12 18:57:37

这看起来是这样的。忽略执行gem install horo --pre 的说明——这实际上会给您提供较旧的测试版。只需执行gem install horo,您将获得当前的 1.0.3 版本(编辑:我发送了一个拉取请求来更新说明,该请求已被接受)。

https://github.com/tenderlove/horo

顺便说一下,我通过查看 < a href="http://github.com/rails/rails" rel="nofollow">Rails 源代码 并查看 Rakefile 以查看 RDoc 选项。具体来说,第 67 行显示了 rdoc.options << '-f' << 'horo'。

This looks like it. Ignore the instructions that say to do a gem install horo --pre -- that'll actually give you an older beta version. Just do gem install horo and you'll get the current 1.0.3 version (Edit: I sent a pull request to update the instructions, which has already been accepted).

https://github.com/tenderlove/horo

By the way, I found this by looking at the Rails source code and viewing the Rakefile to see the RDoc options. Specifically, line 67 shows rdoc.options << '-f' << 'horo'.

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