AliceProxy / devportal-content

User content for Ambassador Dev Portal

Home Page:https://www.getambassador.io/pro

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

devportal-content

User content for Ambassador Edge Stack Dev Portal

How to customize

  • Fork this repository.

  • Update the DEVPORTAL_CONTENT_URL environment variable in your Ambassador Edge Stack deployment.

  • Modify your fork. Note: for now it's necessary to restart ambassador to refresh the portal content. We'll fix this in the next release.

kinds of content

Kinds of information you can put on dev portal:

Kind Location Preprocessing Go templates
landing page /landing.gomd Markdown Yes
page /pages/name.gomd Markdown Yes
site layout /layout.gohtml Yes
template fragments /fragments/name.gohtml Yes
CSS stylesheets /styles/ No
Assets /assets/ No

Golang Templating

As shown in the table above, much of the content that you are able to customize supports Golang templating. You can see examples of this in layout.gohtml.

Templating allows you to customize how pages look, create variables to use in static content throughout the site, and use control loops to display multiple kinds of content.

Variables

These variables are available in all template-able file types

Name Description Values (example)
.Ctx The current type of page being served "landing", "page", or "doc"
.Prefix The url prefix of the current request /docs/
.Pages List of static pages in the pages/ directory [Content Introduction]
.CurrentPage The current page being accessed Content
.CurrentNamespace The namespace of the service for the current OpenAPI documentation default
.CurrentService The name of the service for the current OpenAPI documentation quote

About

User content for Ambassador Dev Portal

https://www.getambassador.io/pro

License:Apache License 2.0


Languages

Language:CSS 66.1%Language:HTML 33.9%