Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add short snippet for missing summary #73

Merged
merged 2 commits into from
Jul 21, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion docfx_yaml/extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -586,6 +586,10 @@ def _update_friendly_package_name(path):
top_summary = _extract_docstring_info(summary_info, summary, name)
datam['summary'] = top_summary

# If there is no summary, add a short snippet.
else:
datam['summary'] = "API documentation for {} {}.".format(name, _type)

if args or sig or summary_info:
datam['syntax'] = {}

Expand Down Expand Up @@ -1126,7 +1130,7 @@ def convert_module_to_package_if_needed(obj):
'langs': ['python'],
'type': 'package',
'kind': 'distribution',
'summary': '',
'summary': 'Reference API documentation for `{}`.'.format(app.config.project),
'children': index_children
}],
'references': index_references
Expand Down