From 90a7b113bf6f9e49ccd55fde0d43744564c82223 Mon Sep 17 00:00:00 2001 From: Alexis Viscogliosi Date: Sun, 19 May 2024 10:47:12 +0200 Subject: [PATCH] doc: upgrade --- docs/README.md | 39 ++------------------------------------- docs/docs/index.md | 25 ++++++++++++++++--------- readme.md | 2 +- 3 files changed, 19 insertions(+), 47 deletions(-) diff --git a/docs/README.md b/docs/README.md index aaba2fa..7973a81 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,41 +1,6 @@ -# Website +# Documentation -This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator. +This website is built using [Docusaurus 3](https://docusaurus.io/), a modern static website generator. -### Installation -``` -$ yarn -``` -### Local Development - -``` -$ yarn start -``` - -This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server. - -### Build - -``` -$ yarn build -``` - -This command generates static content into the `build` directory and can be served using any static contents hosting service. - -### Deployment - -Using SSH: - -``` -$ USE_SSH=true yarn deploy -``` - -Not using SSH: - -``` -$ GIT_USER= yarn deploy -``` - -If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch. diff --git a/docs/docs/index.md b/docs/docs/index.md index e8208b1..22aec08 100644 --- a/docs/docs/index.md +++ b/docs/docs/index.md @@ -1,7 +1,12 @@ --- sidebar_position: 1 --- + +[![Go Report Card](https://goreportcard.com/badge/github.com/alexisvisco/amigo)](https://goreportcard.com/report/github.com/alexisvisco/amigo) [![GoDoc](https://pkg.go.dev/badge/alexisvisco/mig)](https://pkg.go.dev/alexisvisco/mig) +[![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT) +[![GitHub release](https://img.shields.io/github/v/release/alexisvisco/amigo.svg)](https://github.com/alexisvisco/amigo/releases) +[![Tests](https://github.com/alexisvisco/amigo/actions/workflows/tests.yml/badge.svg)](https://github.com/alexisvisco/amigo/actions/workflows/tests.yml) # Introduction @@ -11,6 +16,8 @@ A Migration In Golang (AMIGO) is a library that allows you to write migrations i It provides you with all the benefits of Go, including type safety, simplicity, and strong tooling support. AMIGO is designed to be easy to use and integrate into existing projects. +General documentation: [https://amigo.alexisvis.co](https://amigo.alexisvis.co) + ## Why another migration library? First thing, I don't have anything against SQL migrations file library. I appreciate them but somethimes with SQL files you are limited to do complex migrations that imply your models and business logic. @@ -50,26 +57,26 @@ mit migrate # apply the migration package migrations import ( - "github.com/alexisvisco/amigo/pkg/schema/pg" - "github.com/alexisvisco/amigo/pkg/schema" - "time" + "github.com/alexisvisco/amigo/pkg/schema/pg" + "github.com/alexisvisco/amigo/pkg/schema" + "time" ) type Migration20240502155033SchemaVersion struct {} func (m Migration20240502155033SchemaVersion) Change(s *pg.Schema) { - s.CreateTable("public.mig_schema_versions", func(s *pg.PostgresTableDef) { - s.String("id") - }) + s.CreateTable("public.mig_schema_versions", func(s *pg.PostgresTableDef) { + s.String("id") + }) } func (m Migration20240502155033SchemaVersion) Name() string { - return "schema_version" + return "schema_version" } func (m Migration20240502155033SchemaVersion) Date() time.Time { - t, _ := time.Parse(time.RFC3339, "2024-05-02T17:50:33+02:00") - return t + t, _ := time.Parse(time.RFC3339, "2024-05-02T17:50:33+02:00") + return t } ``` diff --git a/readme.md b/readme.md index 800d470..562cd73 100644 --- a/readme.md +++ b/readme.md @@ -5,7 +5,7 @@ [![GoDoc](https://pkg.go.dev/badge/alexisvisco/mig)](https://pkg.go.dev/alexisvisco/mig) [![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT) [![GitHub release](https://img.shields.io/github/v/release/alexisvisco/amigo.svg)](https://github.com/alexisvisco/amigo/releases) -[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/alexisvisco/amigo/CI)](https://github.com/alexisvisco/amigo/actions) +[![Tests](https://github.com/alexisvisco/amigo/actions/workflows/tests.yml/badge.svg)](https://github.com/alexisvisco/amigo/actions/workflows/tests.yml) # Introduction