xref: /aosp_15_r20/external/stardoc/stardoc/html_tables_stardoc.bzl (revision b2fa42943c124aa9c7163734493fc7a7559681cf)
1# Copyright 2019 The Bazel Authors. All rights reserved.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#    http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15"""Macro for Pure Markdown Stardoc Output Format"""
16
17load(":stardoc.bzl", "stardoc")
18
19def html_tables_stardoc(name, **kwargs):
20    """Outputs documentation using html_tables templates.
21
22    Args:
23      name: A unique name for this target.
24      **kwargs: Attributes to be passed along to the stardoc() rule. (May not include the attributes
25          for the stardoc and renderer binaries, format, or templates.)
26    """
27
28    stardoc(
29        name = name,
30        format = "markdown",
31        aspect_template = Label("//stardoc:templates/html_tables/aspect.vm"),
32        func_template = Label("//stardoc:templates/html_tables/func.vm"),
33        header_template = Label("//stardoc:templates/html_tables/header.vm"),
34        provider_template = Label("//stardoc:templates/html_tables/provider.vm"),
35        rule_template = Label("//stardoc:templates/html_tables/rule.vm"),
36        **kwargs
37    )
38