-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #782 from centrapay/draft-page
Draft page
- Loading branch information
Showing
12 changed files
with
100 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,7 +27,7 @@ jobs: | |
- run: yarn install --frozen-lock-file | ||
- run: yarn lint | ||
- run: yarn test | ||
- run: ./build.sh | ||
- run: ./build.sh --prod | ||
- uses: JamesIves/[email protected] | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.JEKYLL_PAT }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
title: API Introduction | ||
description: Introduction to the API Reference | ||
nav: | ||
path: API/Getting Started | ||
order: 1 | ||
--- | ||
|
||
The Centrapay API is an [RMM](https://en.wikipedia.org/wiki/Richardson_Maturity_Model) | ||
level 2 RESTful web service which expresses operations in terms of HTTP verbs on | ||
resource-oriented URLs. API endpoint definitions in these docs are grouped by resource | ||
type along with definitions for the associated resource types. | ||
|
||
Most API calls require [authentication](https://docs.centrapay.com/api/auth) using an API key or | ||
JWT. HTTP requests and responses usually have JSON payloads and use | ||
"application/json" as the content type. | ||
|
||
Some API features may be flagged as **EXPERIMENTAL**. These API features may be | ||
removed or changed without warning and should not be relied on in a production | ||
setting. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
--- | ||
import { getCollection } from '../../utils/getCollection'; | ||
import Prose from '../../components/Prose.vue'; | ||
import TocNav from '../../components/TocNav.vue'; | ||
import BaseLayout from '../../layouts/BaseLayout.astro'; | ||
import customComponents from '../../utils/customComponents'; | ||
export async function getStaticPaths() { | ||
const api = await getCollection('api'); | ||
return api.map(entry => ({ | ||
params: { slug: entry.slug }, | ||
props: { entry }, | ||
})); | ||
} | ||
const { entry } = Astro.props; | ||
const { Content, headings } = await entry.render(); | ||
const { title, description } = entry.data; | ||
--- | ||
<BaseLayout title={title} description={description}> | ||
<div class="relative mx-auto desktop-gutters flex justify-center"> | ||
<div class="min-w-0 max-w-2xl flex-auto px-8 pb-16 pt-8 xl:pt-16 lg:max-w-none"> | ||
<article> | ||
<header class="mb-9 space-y-1" > | ||
<h1 | ||
class="font-display text-3xl tracking-tight text-slate-900" | ||
> | ||
{ title } | ||
</h1> | ||
</header> | ||
<Prose client:load> | ||
<Content components={customComponents}/> | ||
</Prose> | ||
</article> | ||
</div> | ||
<div class="hidden xl:sticky border-none xl:top-[4.5rem] xl:block xl:h-[calc(100vh-4.5rem)] xl:flex-none xl:py-16 xl:pr-6 overflow-y-auto"> | ||
<TocNav client:load headings={headings} /> | ||
</div> | ||
</div> | ||
</BaseLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { getCollection as get } from 'astro:content'; | ||
|
||
export async function getCollection(collection) { | ||
return await get(collection, ({ data }) => { | ||
return import.meta.env.MODE !== 'production' || !data.draft; | ||
}); | ||
} |