Skip to content

Commit

Permalink
Base Documentation with Hugo (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
bbengfort authored Nov 25, 2024
1 parent 0362d32 commit 5f690a1
Show file tree
Hide file tree
Showing 36 changed files with 946 additions and 1 deletion.
Empty file added .gitmodules
Empty file.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,8 @@ BenchmarkSerialization/Small/Decode/Honu-10 343032 3421 ns/op
BenchmarkSerialization/Small/Decode/Protobuf-10 161241 7889 ns/op 8367 B/op 127 allocs/op
```

![Benchmarks](./docs/serialization-benchmark.png)
![Benchmarks](./docs/static/img/serialization-benchmark.png)

## Documentation

The docs are set up using the [Cinder](https://sourcefoundry.org/cinder/) MkDocs theme, ported (somewhat) into Hugo using the [Cinder GitHub repository](https://github.com/chrissimpkins/cinder). A lot of work still needs to be done to get these docs ready for prime time, but it serves as a quick placeholder while we're working on the database.
13 changes: 13 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Generated files by hugo
/public/
/resources/_gen/
/assets/jsconfig.json
hugo_stats.json

# Executable may be added to repository
hugo.exe
hugo.darwin
hugo.linux

# Temporary lock file while building
/.hugo_build.lock
6 changes: 6 additions & 0 deletions docs/archetypes/default.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
+++
date = '{{ .Date }}'
draft = true
title = '{{ replace .File.ContentBaseName "-" " " | title }}'
disableTOC = false
+++
Empty file added docs/assets/.gitkeep
Empty file.
9 changes: 9 additions & 0 deletions docs/content/en/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
date: 2024-11-25T13:31:01-06:00
draft: false
title: Honu Database Documentation
---

Welcome to the documentation for the Honu Database. More will be coming soon!

![HonuDB](/img/logo.png)
Empty file added docs/data/.gitkeep
Empty file.
2 changes: 2 additions & 0 deletions docs/data/en/footer.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
enabled: true
copyright: "Copyright © Rotational Labs, Inc. 2021–{year} · All Rights Reserved"
32 changes: 32 additions & 0 deletions docs/hugo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
baseURL: https://honudb.dev
title: HonuDB

params:
author: Rotational Labs
description: Documentation for the Honu Replicated Database, a document and object storage database replicated using adaptive anti-entropy and well suited for data governance and ML/AL workloads.
keywords: HonuDB, database, global replication, data storage, data governance, anti-entropy replication, LLM database, Artificial Intelligence Database, Machine Learning Database, vector database, globally distributed database
image: img/logo.png
googleAnalytics: "" # Google Analytics ID (set $HUGO_PARAMS_GOOGLEANALYTICS)

repositoryURL: https://github.com/rotationalio/honu

highlightjs:
colorscheme: null
languages: []

taxonomies:
tag: tags
category: categories

languages:
en:
languageName: "En"
languageCode: "en-us"
weight: 1

enableRobotsTXT: true

module:
hugoVersion:
extended: true
min: 0.110.0
Empty file added docs/i18n/.gitkeep
Empty file.
15 changes: 15 additions & 0 deletions docs/layouts/_default/baseof.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!DOCTYPE html>
<html lang="{{ with site.LanguageCode }}{{ . }}{{ else }}en-us{{ end }}">
<head>
{{ block "head" . }}{{ partial "site-head.html" . }}{{ end }}
</head>
<body>
{{ block "header" . }}{{ partial "site-header.html" . }}{{ end }}
<main class="container">
{{ block "main" . }}{{ end }}
</main>
{{ block "footer" . }}{{- partial "site-footer.html" . -}}{{ end }}
{{ block "scripts" . }}{{- partial "site-scripts.html" . -}}{{ end }}
{{ block "appcode" . }}{{ end }}
</body>
</html>
14 changes: 14 additions & 0 deletions docs/layouts/_default/home.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{{ define "main" }}
<style>
img {
margin: 128px 0;
}
</style>

<div class="col-md-12 text-center" role="main">
{{ range .Pages }}
<h2>{{ .Title }}</h2>
{{ .Content }}
{{ end }}
</div>
{{ end }}
8 changes: 8 additions & 0 deletions docs/layouts/_default/list.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{{ define "main" }}
{{ range .Pages }}
<article>
<h2>{{ .Title }}</h2>
{{ .Content }}
</article>
{{ end }}
{{ end }}
39 changes: 39 additions & 0 deletions docs/layouts/_default/rss.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{{- $pctx := . -}}
{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}}
{{- $pages := slice -}}
{{- if or $.IsHome $.IsSection -}}
{{- $pages = (where (where $pctx.RegularPages ".Section" "blog") "Kind" "page") -}}
{{- else -}}
{{- $pages = (where (where $pctx.Pages ".Section" "blog") "Kind" "page") -}}
{{- end -}}
{{- $limit := .Site.Config.Services.RSS.Limit -}}
{{- if ge $limit 1 -}}
{{- $pages = $pages | first $limit -}}
{{- end -}}
{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}</title>
<link>{{ .Permalink }}</link>
<description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description>
<generator>Hugo -- gohugo.io</generator>
<language>{{ site.Language.LanguageCode }}</language>{{ with .Site.Author.email }}
<managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }}
<webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }}
<copyright>{{ replace . "{year}" now.Year | markdownify }}</copyright>{{end}}{{ if not .Date.IsZero }}
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
{{- with .OutputFormats.Get "RSS" -}}
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
{{- end -}}
{{ range $pages }}
<item>
<title>{{ .Title }}</title>
<link>{{ .Permalink }}</link>
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
{{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
<guid>{{ .Permalink }}</guid>
<description>{{ .Summary | html }}</description>
</item>
{{ end }}
</channel>
</rss>
12 changes: 12 additions & 0 deletions docs/layouts/_default/single.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{{ define "title" }}
{{ .Title }} &ndash; {{ .Site.Title }}
{{ end }}

{{ define "main" }}
{{ if .Params.disableTOC }}
<div class="col-md-12" role="main">{{ block "content" . }}{{ end }}</div>
{{ else }}
<div class="col-md-3">{{ block "toc" . }}{{ end }}</div>
<div class="col-md-9" role="main">{{ block "content" . }}{{ .Content }}{{ end }}</div>
{{ end }}
{{ end }}
24 changes: 24 additions & 0 deletions docs/layouts/index.humans.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{{ $data := index site.Data site.Language.Lang }}
{{- with $data.team.team -}}
/* TEAM */

{{ range .team_member }}
{{ .designation }}: {{ .name }}
Bio: {{ .bioLink | absURL }}
{{ end }}
{{ end }}

/* SITE */

Last update: {{ now.Format "2006-01-02" }}
Site name: {{ .Site.Title }}
URL: {{ .Site.BaseURL }}
CMS: Hugo
Host: GitHub Pages
Language: {{ range $i, $l := site.Languages }}{{ if $i }}, {{ end }}{{ .LanguageName }}{{ end }}
Doctype: HTML5
Standards: HTML5, CSS3, Open Graph protocol, Schema.org
Components: Hugo, FontAwesome, Flowbite, HighlightJS, Lunr.js
IDE: VSCode, Atom, Vim, MacVim

[Credit for this page: http://humanstxt.org/]
12 changes: 12 additions & 0 deletions docs/layouts/partials/site-footer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{{- block "footer" . }}
{{- $data := (index site.Data site.Language.Lang).footer }}
{{- if $data.enabled }}
<footer class="col-md-12 text-center">
<hr />
<p>
<small>{{ replace $data.copyright "{year}" now.Year | safeHTML }}</small><br />
<small>Documentation built with <a href="https://gohugo.io/">Hugo</a></small>
</p>
</footer>
{{- end }}
{{- end }}
68 changes: 68 additions & 0 deletions docs/layouts/partials/site-head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>{{ block "title" . }}{{ .Site.Title }}{{ with .Params.Title }} | {{ . }}{{ end }}{{ end }}</title>
<base href="{{ .Site.BaseURL }}" target="_self">

{{- $title := .Params.Title -}}{{ if not .Params.Title }}{{ $title = .Site.Title }}{{ end }}
{{- $description := .Params.description -}}{{ if not .Params.description }}{{ $description = .Site.Params.description }}{{ end }}
{{- $author := .Params.author -}}{{ if not .Params.author }}{{ $author = .Site.Params.author }}{{ end }}
{{- $keywords := .Params.keywords -}}{{ if not .Params.keywords }}{{ $keywords = .Site.Params.keywords }}{{ end }}
{{- $image := .Params.Image -}}{{ if not .Params.Image }}{{ $image = .Site.Params.image }}{{ end }}

{{ "<!-- Document Metadata -->" | safeHTML -}}
{{ with $author }}<meta name="author" content="{{ . }}">{{ end }}
{{ with $description }}<meta name="description" content="{{ . }}">{{ end }}
{{ with $keywords }}<meta name="keywords" content="{{ . }}">{{ end }}
<link type="text/plain" rel="author" href="{{ "humans.txt" | absURL }}" />

{{ "<!-- OpenGraph Metadata -->" | safeHTML }}
{{ with $title }}<meta property="og:title" content="{{ . }}" />{{ end }}
{{ with $description }}<meta property="og:description" content="{{ . }}" />{{ end }}
{{ with $image }}<meta property="og:image" content="{{ . | absURL }}" />{{ end }}
{{ if $title }}<meta property="og:url" content="{{ .Permalink }}" />{{ end }}
{{ if $title }}<meta property="og:type" content="website" />{{ end }}

{{ "<!-- Twitter Metadata -->" | safeHTML }}
{{ with $title }}<meta name="twitter:title" content="{{ . }}" />{{ end }}
{{ if $title }}<meta name="twitter:card" content="summary">{{ end }}
{{ with $description }}<meta name="twitter:description" content="{{ . }}" />{{ end }}
{{ with $image }}<meta name="twitter:image" content="{{ . | absURL }}" />{{ end }}

{{ "<!-- Favicon and Iconography -->" | safeHTML }}
<link rel="shortcut icon" href="{{ `img/favicon.png` | absURL }}" type="image/x-icon">
<link rel="icon" href="{{ `img/favicon.png` | absURL }}" type="image/x-icon">

{{ "<!-- RSS Feeds -->" | safeHTML }}
<link rel="alternate" type="application/rss+xml" href="{{.Site.BaseURL }}/index.xml" title="{{ .Site.Title }} RSS Feed">

{{ "<!-- Fonts -->" | safeHTML }}
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.12.0/css/all.css">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.12.0/css/v4-shims.css">
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/[email protected]/build/web/hack.min.css">
<link href='//rsms.me/inter/inter.css' rel='stylesheet' type='text/css'>
<link href='//fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,700italic,400,300,600,700&subset=latin-ext,latin' rel='stylesheet' type='text/css'>


{{"<!-- Main Stylesheet -->"|safeHTML}}
<link href="{{ `css/bootstrap-custom.min.css` | absURL }}" rel="stylesheet">
<link href="{{ `css/base.min.css` | absURL }}" rel="stylesheet">
<link href="{{ `css/cinder.min.css` | absURL }}" rel="stylesheet">

{{- if .Site.Params.highlightjs.colorscheme }}
<link href="//cdn.jsdelivr.net/gh/highlightjs/[email protected]/build/styles/{{ .Site.Params.highlightjs.colorscheme }}.min.css" rel="stylesheet">
{{- else }}
<link href="//cdn.jsdelivr.net/gh/highlightjs/[email protected]/build/styles/github.min.css" rel="stylesheet">
{{- end -}}

{{- if .Site.Params.googleAnalytics }}
{{ "<!-- Google Analytics -->" | safeHTML }}
<script src="https://www.googletagmanager.com/gtag/js?id={{ .Site.Params.googleAnalytics }}" defer></script>
<script type="module">
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());
gtag('config', '{{ .Site.Params.googleAnalytics }}');
</script>
{{- end -}}
21 changes: 21 additions & 0 deletions docs/layouts/partials/site-header.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>

<a class="navbar-brand" href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a>
</div>

<div class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-right">
<li><a href="{{ .Site.Params.repositoryURL }}"><i class="fab fa-github"></i> GitHub</a></li>
</ul>
</div>

</div>
</div>
12 changes: 12 additions & 0 deletions docs/layouts/partials/site-scripts.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

{{ "<!-- Application Scripts -->" | safeHTML }}
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="{{ `js/bootstrap-3.0.3.min.js` | absURL }}"></script>
<script src="//cdn.jsdelivr.net/gh/highlightjs/[email protected]/build/highlight.min.js"></script>
{{- if site.Params.highlightjs.languages }}
{{- range site.Params.highlightjs.languages }}
<script src="//cdn.jsdelivr.net/gh/highlightjs/[email protected]/build/languages/{{ . }}.min.js"></script>
{{- end }}
{{- end }}
<script>hljs.initHighlightingOnLoad();</script>
<script src="{{ `js/base.js` | absURL }}"></script>
4 changes: 4 additions & 0 deletions docs/layouts/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
User-agent: *
Allow: /

Sitemap: {{ "sitemap.xml" | absURL }}
Empty file added docs/static/.gitkeep
Empty file.
1 change: 1 addition & 0 deletions docs/static/css/base.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions docs/static/css/bootstrap-custom.min.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/static/css/cinder.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions docs/static/css/highlight.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added docs/static/fonts/fontawesome-webfont.eot
Binary file not shown.
Loading

0 comments on commit 5f690a1

Please sign in to comment.