mirror of https://github.com/knative/docs.git
Add feature stable label macro and document that DomainMapping is beta (#3913)
* Add feature stable label macro * Put description in expandable section, tweak padding
This commit is contained in:
parent
95d291af57
commit
a24b819f1c
|
@ -1,5 +1,7 @@
|
|||
# Configuring custom domains
|
||||
|
||||
{{ feature(beta="0.24") }}
|
||||
|
||||
Each Knative Service is automatically assigned a default domain name when it is created. However, you can map any custom domain name that you own to a Knative Service, by using _domain mapping_.
|
||||
|
||||
You can create a `DomainMapping` object to map a single, non-wildcard domain to a specific Knative Service.
|
||||
|
|
|
@ -236,3 +236,21 @@
|
|||
.footer-links a {
|
||||
margin: 0.4em;
|
||||
}
|
||||
|
||||
/* Feature State Labels */
|
||||
.feature-alpha, .feature-beta, .feature-stable {
|
||||
font-variant: small-caps;
|
||||
padding: 0.1em;
|
||||
border-bottom: 1px dotted #999;
|
||||
display: inline-block;
|
||||
font-weight: bold;
|
||||
}
|
||||
.feature-alpha {
|
||||
background: rgb(255, 218, 218);
|
||||
}
|
||||
.feature-beta {
|
||||
background: rgb(251, 244, 182);
|
||||
}
|
||||
.feature-stable {
|
||||
background: rgb(228, 255, 218);
|
||||
}
|
||||
|
|
|
@ -2,6 +2,21 @@ import os
|
|||
|
||||
def define_env(env):
|
||||
|
||||
@env.macro
|
||||
def feature(alpha="", beta="", stable=""):
|
||||
versions = []
|
||||
descriptions = []
|
||||
if alpha != "":
|
||||
versions.append('<span class="feature-alpha">alpha</span> since Knative v{version}'.format(version=alpha))
|
||||
descriptions.append(' - <span class="feature-alpha">alpha</span> features are experimental, and may change or be removed without notice.')
|
||||
if beta != "":
|
||||
versions.append('<span class="feature-beta">beta</span> since Knative v{version}'.format(version=beta))
|
||||
descriptions.append(' - <span class="feature-beta">beta</span> features are well-tested and enabling them is considered safe. Support for the overall feature will not be dropped, though details may change in incompatible ways.')
|
||||
if stable != "":
|
||||
versions.append('<span class="feature-stable">stable</span> since Knative v{version}'.format(version=stable))
|
||||
descriptions.append(' - <span class="feature-stable">stable</span> features will be maintained for many future versions.')
|
||||
return '??? info "Feature Availability: ' + ', '.join(versions) + '"\n' + '\n'.join(descriptions)
|
||||
|
||||
@env.macro
|
||||
def artifact(repo, file, org="knative"):
|
||||
"""Generates a download link for the current release version.
|
||||
|
|
Loading…
Reference in New Issue