# How to generate RF documentation for several sources?

**URL:** <https://forum.robotframework.org/t/how-to-generate-rf-documentation-for-several-sources/7698>\
**Category:** Robot Framework\
**Created:** [14 August 2024 09:05 UTC](https://forum.robotframework.org/t/how-to-generate-rf-documentation-for-several-sources/7698 "2024-08-14T09:05:21Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gizm0](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/gizm0/32/3952_2.png) [@Gizm0](https://forum.robotframework.org/u/Gizm0)\
**Post date:** [14 August 2024 09:05 UTC](https://forum.robotframework.org/t/how-to-generate-rf-documentation-for-several-sources/7698/1 "2024-08-14T09:05:21Z")

</div>

Hello everybody,

We are using libdoc to generate our documentation of keywords for RF.  
I would need it to generate one documentation .HTML singlepage file from more than one source (two, in our case) - can libdoc do that?

If not, is there another tool/library which allows you to do that?  
Thanks for answer.

---

<div class="post-metadata">

**Author:** ![FrancisG](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/francisg/32/4247_2.png) [@FrancisG](https://forum.robotframework.org/u/FrancisG)\
**Post date:** [14 August 2024 10:07 UTC](https://forum.robotframework.org/t/how-to-generate-rf-documentation-for-several-sources/7698/2 "2024-08-14T10:07:23Z")

</div>

Would [libtoc](https://pypi.org/project/robotframework-libtoc/) do the trick?

---

<div class="post-metadata">

**Author:** ![Gizm0](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/gizm0/32/3952_2.png) [@Gizm0](https://forum.robotframework.org/u/Gizm0)\
**Post date:** [14 August 2024 10:43 UTC](https://forum.robotframework.org/t/how-to-generate-rf-documentation-for-several-sources/7698/3 "2024-08-14T10:43:19Z")

</div>

Yes it would, in case if you would show me how to put together an example command for doing so?

I tried to use it, created documentation.libtoc file in my repo, containing:

```python
[paths]
resources/pages/*.resource

```

Both of the files are in that location.

Now, I should be missing only command to generate the docs; according to documentation I have put together this one:

> _libtoc --toc\_file Keyword\_documentation.html documentation.libtoc_

But it is not working, giving me:

> _NotADirectoryError: [WinError 267] The directory name is invalid: ‘documentation.libtoc’_  
> somehow, it does not understand the _documentation.libtoc_ should be equivavelent of _example\_resources_ in their documentation.

Can you help me to fix it?

---

<div class="post-metadata">

**Author:** ![FrancisG](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/francisg/32/4247_2.png) [@FrancisG](https://forum.robotframework.org/u/FrancisG)\
**Post date:** [14 August 2024 10:57 UTC](https://forum.robotframework.org/t/how-to-generate-rf-documentation-for-several-sources/7698/4 "2024-08-14T10:57:08Z")

</div>

Not quite sure of what I am adding here, since I have not used libtoc yet.

I would say that your configuration file “documentation.libtoc” should actually simply be called “.libtoc” to be detected automatically. If you really want to rename it then you should probably use the `--config_file "documentation.libtoc"` option to provide your custom name.

That said, it seems that only mandatory argument for the command line is the name of the directory where libtoc is supposed to find the files. So something along the lines  
`libtoc --config_file custom_named_config.libtoc --toc_file output_file_name.html my_resource_directory`

---

<div class="post-metadata">

**Author:** ![Gizm0](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/gizm0/32/3952_2.png) [@Gizm0](https://forum.robotframework.org/u/Gizm0)\
**Post date:** [16 August 2024 07:58 UTC](https://forum.robotframework.org/t/how-to-generate-rf-documentation-for-several-sources/7698/5 "2024-08-16T07:58:09Z")

</div>

Thanks to your reply _libtoc --config\_file custom\_named\_config.libtoc --toc\_file output\_file\_name.html my\_resource\_directory_ it executes libtoc without errors, but it always ended with _No docs were created!_

So in the end we wrote our own script to generate documentation out of several sources using libdoc (the only downside is you cannot have two keywords with the same name), which solved our problem.

---

<div class="post-metadata">

**Author:** ![Heiko](https://avatars.discourse-cdn.com/v4/letter/h/7ab992/32.png) [@Heiko](https://forum.robotframework.org/u/Heiko)\
**Post date:** [15 January 2026 09:10 UTC](https://forum.robotframework.org/t/how-to-generate-rf-documentation-for-several-sources/7698/6 "2026-01-15T09:10:07Z")

</div>

I know this is an old issue but I was facing the same Problem. —config\_file option did not work for me. The solution was simple but hard to find. The filename for the config file must be “.libtoc” then everything works fine.

---

<div class="post-metadata">

**Author:** ![Gizm0](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/gizm0/32/3952_2.png) [@Gizm0](https://forum.robotframework.org/u/Gizm0)\
**Post date:** [15 January 2026 10:00 UTC](https://forum.robotframework.org/t/how-to-generate-rf-documentation-for-several-sources/7698/7 "2026-01-15T10:00:41Z")

</div>

Can you post example of the whole command to your post?

---

<div class="post-metadata">

**Author:** ![Heiko](https://avatars.discourse-cdn.com/v4/letter/h/7ab992/32.png) [@Heiko](https://forum.robotframework.org/u/Heiko)\
**Post date:** [15 January 2026 10:56 UTC](https://forum.robotframework.org/t/how-to-generate-rf-documentation-for-several-sources/7698/8 "2026-01-15T10:56:54Z")

</div>

Staying the the root directory of the source:

> libtoc -d .\docs\ .

.libtoc file:

 ![image](https://europe1.discourse-cdn.com/flex005/uploads/robotframework1/original/2X/c/c47dd09a064862a67964a9d91cfad4513a92650f.png)
