Autogenerate services.m3o.com (#37)

* Autogenerate services.m3o.com

* Openapi for all

* Gen

* Fix

* Whaat

* Fix dep

* Fix

* Hmm

* Install make

* Debug

* Debug 1

* Location -> locations

* Fix

* Intall protoc gen micro

* F

* F

* F

* Push

* Rename secret

* Fix npm install

* Fix script

* Fix v2

* Ignore errors

* Ignore v2

* F

* F

* F

* Docs index

* Add hugo theme

* Hugo tania fixes

* Change gen

* Change gen 2

* Install hugo

* Change gen

* Gen fix

* Change hugo install

* Change hugo install

* CNAME

* Change articles wording

* Tiny fix

* Fix gen

* Redoc it all

* Fix gen

* Fixing up protos

* Fix proto

* Fix gen

* Fix

* Trigger build

* Fix copy

* Openapi docs

* Flatten

* Changes

* No date vol2

* Changes

* Add make to chat

* Fixes

* Change

* api spec

* replace RSS

* fix link

* Dont continue on error

* increase the width

* use micro at master

* change box colours

* move some things

* Pushing new readmes to see how they look like

* Add skip file

* Readmes

* Nicer api link

* Remove stutter

* FIx mistake

* set service font weight

* Messages readme fix

* add other font bold

* Notes

* Remove post from url

* Revert "Remove post from url"

This reverts commit 5fea2c23d0bafa910f5dc4d4cc63f71f578530e3.

* move exampleSite to site

* replace exampleSite with site

* update readme

* use filename for post

* update index

* Add source urls

* set source as params

* set source as params

* Fix entries

* Generator in go

* Fixes to generator

* F

* Change doc gen

* FIx cname

* Fixing protos

* Change to makefiles

* Fix gen script

Co-authored-by: Asim Aslam <asim@aslam.me>
This commit is contained in:
Janos Dobronszki
2021-01-19 16:59:25 +00:00
committed by GitHub
parent ec81db0753
commit 40b71a9cf9
174 changed files with 10914 additions and 3157 deletions

View File

@@ -0,0 +1,41 @@
{{ define "main" }}
<header>
<div class="container">
<h1>{{ .Title }}</h1>
<p class="subtitle">{{ .Params.subtitle }}</p>
</div>
</header>
{{ $pages := where .Site.RegularPages "Type" "in" .Site.Params.mainSections }}
<section>
<div class="container">
<section>
{{ range $pages.GroupByDate "2006" }}
<section>
<div class="posts">
{{ range.Pages }}
<div class="post">
<a href="{{ .RelPermalink }}">
<div class="post-row">
<h3>
{{ .Title }}
</h3>
<!-- <time>{{ .Date.Format "Jan 02" }}</time>-->
</div>
<!--<div class="new-post">New!</div>-->
</a>
<div style="padding-left: 1em; margin-bottom: 2em;">
<span style="color: #444">{{ .Summary }}</span>
</div>
</div>
{{ end }}
</div>
</section>
{{ end }}
</section>
</div>
</section>
{{ end }}

View File

@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="{{ .Site.LanguageCode }}">
{{ partial "head.html" . }}
<body class="dark">
{{ partial "header.html" . }}
<main>
{{ block "main" . }}{{ end }}
</main>
{{ partial "footer.html" . }}
</body>
</html>

View File

@@ -0,0 +1,92 @@
{{ define "main" }}
<div class="container">
<section class="my">
<div class="content">
{{ with.Content }}
{{ . }}
{{ end }}
<div class="bio-social">
{{ range $name, $path := $.Param "socialOptions" }}
{{ if (and $path (ne $name "email")) }}
<a
href="{{ $path | safeURL }}"
target="_blank"
rel="noreferrer"
title="{{ $name }}"
aria-label="{{ $name }}"
>
{{ partial (print "svgs/social/" $name ".svg") (dict "width" 25 "height" 25) }}
</a>
{{ end }}
{{ end }}
</div>
</div>
</section>
</div>
{{ $pages := where .Site.RegularPages "Type" "in" .Site.Params.mainSections }}
{{ $projects := where .Site.RegularPages "Section" "projects" }}
{{ $pages = first (default 100 .Site.Params.homePosts) (sort (where .Site.RegularPages "Type" "in" .Site.Params.mainSections) "Date" "desc") }}
<div class="container">
<section>
<div class="posts">
{{ range $i,$e := $pages }}
{{if modBool $i 2}}
<div class="container">
<nav class="flex container suggested">
<a rel="prev" href="{{ .RelPermalink }}" title="{{ $e.Title }}">
<span style="font-size: 1.5em; font-weight: bold;">
{{ $e.Title }}</span
>
<span style="color: #777">{{ $e.Summary }}</span>
</a>
{{ end }}
{{if not (modBool $i 2)}}
<a rel="next" href="{{ .RelPermalink }}" title="{{ $e.Title }}">
<span style="font-size: 1.5em; font-weight: bold;">
{{ $e.Title }}</span
>
<span style="color: #777">{{ $e.Summary }}</span>
</a>
</nav>
</div>
{{ end }}
{{ end }}
</div>
</section>
{{ if gt (len $projects) 0}}
<section>
<h2>Projects</h2>
<div class="projects">
{{ range $projects.ByWeight }}
<div class="project">
<div>
<a href="{{ .Params.link }}" target="_blank" rel="noreferrer">
<div class="icon">{{ .Params.icon }}</div>
<h3>{{ .Title }}</h3>
</a>
<div class="description">{{ .Params.description }}</div>
</div>
<div class="flex">
<a
href="{{ .Params.repo }}"
class="button"
target="_blank"
rel="noreferrer"
>Source</a
>
</div>
</div>
{{ end }}
</div>
</section>
{{ end }}
</div>
{{ end }}

View File

@@ -0,0 +1,37 @@
{{ define "main" }}
{{ $pages := .Pages }}
{{ $pages = (.Paginate $pages).Pages }}
<header>
<div class="container">
<h1>{{ .Title }}</h1>
<p class="subtitle">
<span class="count">{{ len $pages }}</span> posts found.
</p>
</div>
</header>
<section>
<div class="container">
<section>
<section>
<div class="posts">
{{ range $pages }}
<div class="post">
<a href="{{ .RelPermalink }}">
<div class="post-row">
<time>{{ .Date.Format "Jan 02" }}</time>
<h3>{{ .Title }}</h3>
</div>
<!--<div class="new-post">New!</div>-->
</a>
</div>
{{ end }}
</div>
</section>
</section>
</div>
</section>
{{ end }}

View File

@@ -0,0 +1,55 @@
{{ define "main" }}
<div class="container">
<article>
<header class="article-header">
<div class="thumb">
<div>
<h1>{{ .Title }}</h1>
<div>
<a href="/{{ .Title }}/api"><u>API Spec</u></a>
&nbsp;
<a href="{{ $.Site.Params.source }}/tree/master/{{ .Title }}"><u>Source</u></a>
</div>
<div class="post-meta">
<!-- <div>
By {{ .Params.author }} on <time>{{ .Date.Format "January 02, 2006" }}</time>
</div> -->
<div class="tags">
{{ range (.GetTerms "tags") }}
<a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>
{{ end }}
</div>
</div>
</div>
</div>
</header>
</article>
<div class="article-post">
{{ .Content }}
</div>
</div>
<div class="container">
{{ if .Section }}
<nav class="flex container suggested">
{{ with .PrevInSection }}
<a rel="prev" href="{{ .RelPermalink }}" title="Previous post (older)">
<span>Previous</span>
{{ .Title }}
</a>
{{ end }}
{{ with .NextInSection }}
<a rel="next" href="{{ .RelPermalink }}" title="Next post (newer)">
<span>Next</span>
{{ .Title }}
</a>
{{ end }}
</nav>
{{ end }}
</div>
</main>
{{ end }}

View File

@@ -0,0 +1,22 @@
{{ define "main" }}
{{ $pages := .Pages }}
{{ $pages = (.Paginate $pages).Pages }}
<header>
<div class="container">
<h1>{{ .Title }}</h1>
</div>
</header>
<section>
<div class="container">
<div class="terms">
{{ range (index .Site.Taxonomies (.Title | lower)) }}
<a href="{{ .Page.RelPermalink }}">{{ .Page.Title }} <span class="bg-number">{{ .Count }}</span></a>
{{ end }}
</div>
</div>
</section>
{{ end }}