bazelbuild / stardoc

Stardoc: Starlark Documentation Generator
Apache License 2.0
106 stars 42 forks source link

Support module docstrings #25

Open c-parsons opened 5 years ago

c-parsons commented 5 years ago

Code change made in https://github.com/bazelbuild/bazel/commit/5faf9525ff1a9f3127139c8f5f5db3e2eb1481fe to support adding module docstrings to Stardoc output. The templates still need to be updated to reflect this new feature.

deeglaze commented 5 years ago

Would it be possible to include a way to add jekyll header content too? Likely in the module docstring, but elsewhere could be fine. I currently have a post-processing script that takes the output md and original .bzl file to translate a comment block into the md's header.

bzl file:

[...]
# magic-tag
# ---
# title: The title
# overview: Snappy overview
# ---

[...]

md file:

---
title: The title
overview: Snappy overview
---
<!-- the rest of the file -->
c-parsons commented 5 years ago

As in you'd like Stardoc to retrieve and relay information about a top-level comment? Lets file a separate FR for that, if you need it.

Are you able to get by just modifying your own header vm template to manually add this metadata?