Code Monkey home page Code Monkey logo

devportal-content-v2's Introduction

devportal-content

User content for Ambassador Edge Stack Dev Portal.

V2 is compatible with Edge Stack 1.13+.

If using an earlier version, use v1 of the DevPortal content here.

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
.CurrentServicePath Relative service path for currently displayed service default/quote

devportal-content-v2's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.