如何使用devdocs.io在本地生成自己的文档

时间:2014-08-29 13:49:42

标签: documentation thor

我们的组织希望尝试使用devdocs.io来集成我们的API文档。我在本地安装了devdocs.io并让它在我的浏览器中运行。我这样做:

$ thor list
assets
------
thor assets:clean [--keep=<n>] [--verbose]              # Clean old assets
thor assets:compile [--clean] [--keep=<n>] [--verbose]  # Compile all assets

console
-------
thor console:      # Start a REPL
thor console:docs  # Start a REPL in the "Docs" module

docs
----
thor docs:clean                                           # Delete documentation packages
thor docs:download (<doc> <doc>... | --all)               # Download documentations
thor docs:generate <doc> [--verbose] [--debug] [--force]  # Generate a documentation
thor docs:list                                            # List available documentations
thor docs:manifest                                        # Create the manifest
thor docs:package (<doc> <doc>... | --all)                # Package documentations
thor docs:page <doc> [path] [--verbose] [--debug]         # Generate a page (no indexing)

test
----
thor test:all  # Run all tests

这似乎表明你做了托尔文档:生成并传递“doc”。什么是文档?文件路径?一个URL?一个名字?如果我传递一个URL,Thor似乎认为我正在尝试执行子命令:

$ thor docs:generate http://host/path/to/resource

devdocs/lib/docs.rb:40:in `const_get': wrong constant name Http:::::::::HOST::Path::To::Resource:: (NameError)

这是怎么回事?我是否必须注册我在某处生成的文档的名称并将其传递给该名称?关于如何做到这一点的基本文档将是真正有用的。我没有看到任何。可能我只是错过了某个地方,但我确实在网上搜索并阅读了github上的README.md文件。

0 个答案:

没有答案