Skip to content

Commit

Permalink
chore: migrate to Nextra framework for docs (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulobressan committed May 9, 2024
1 parent 0fcb5d2 commit 494b542
Show file tree
Hide file tree
Showing 15 changed files with 6,959 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Docs Docker Image

on:
push:
branches:
- "main"

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v5
with:
context: ./docs
platforms: linux/amd64
push: true
tags: ghcr.io/txpipe/hollow-docs:${{ github.sha }}
2 changes: 2 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
.next
7 changes: 7 additions & 0 deletions docs/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM node:18-alpine
WORKDIR /usr/app
COPY package*.json ./
RUN npm install
COPY . ./
RUN npm run build
CMD ["npm", "start"]
29 changes: 29 additions & 0 deletions docs/components/hero.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
export function Hero() {
return (
<div className="py-10 md:p-20">
<div className="mb-5 text-center">
<div className="flex justify-center">
<img src="/logo.png" alt="Hollow logo" className="mb-4" />
</div>
<h1 className="flex flex-col flex-wrap font-bold text-4xl md:text-6xl lg:text-7xl dark:text-gray-200">
SDK for building dApps
</h1>
</div>

<div className="mb-8 max-w-3xl text-center mx-auto">
<p className="md:text-lg text-gray-600 dark:text-gray-400">
Hollow SDK streamlines the development of headless Cardano dApps by providing essential components out-of-the-box. Developers can focus on their business logic while leveraging the SDK's plumbing for on-chain interactions, promoting code reusability and scalability.
</p>
</div>

<div className="flex justify-center">
<a
className="bg-gradient-to-tl from-emerald-600 to-cyan-600 border border-transparent text-white text-sm rounded-md focus:outline-none focus:ring-2 focus:ring-blue-600 focus:ring-offset-2 focus:ring-offset-white py-3 px-4 dark:focus:ring-offset-gray-800"
href="/introduction"
>
Documentation
</a>
</div>
</div>
);
}
7 changes: 7 additions & 0 deletions docs/next.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const withNextra = require('nextra')({
theme: 'nextra-theme-docs',
themeConfig: './theme.config.jsx'
})

module.exports = withNextra()

0 comments on commit 494b542

Please sign in to comment.