Skip to content

Commit

Permalink
Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
blaubaer committed Sep 4, 2024
1 parent 3bc336d commit 5ffeff6
Show file tree
Hide file tree
Showing 65 changed files with 1,708 additions and 318 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,31 @@ jobs:
path: |
var/dist/*.tgz*
var/dist/*.zip*
doc:
name: Documentation
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: true

- name: Install Python
uses: actions/setup-python@v4
with:
python-version: 3.x

- name: Install dependencies
run: |
pip install -r docs/requirements.txt
- name: Build
run: |
mkdocs --color build -c
- name: Deploy
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
command: pages deploy --project-name=bifroest-engity-org var/doc
38 changes: 32 additions & 6 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,23 @@ before:
- go generate ./...

builds:
- id: generic
- id: generic-tgz
main: ./cmd/bifroest
binary: bifroest
goos:
- linux
env:
- CGO_ENABLED=0
goarch:
- amd64
- arm64
ldflags:
- "-s -w -X main.edition=generic -X main.version={{.Version}} -X main.revision={{.Commit}} -X main.buildAt={{.Date}} -X main.vendor={{envOrDefault `BIFROEST_VENDOR` `unknown`}}"

- id: generic-zip
main: ./cmd/bifroest
binary: bifroest
goos:
- windows
env:
- CGO_ENABLED=0
Expand All @@ -24,7 +36,7 @@ builds:
ldflags:
- "-s -w -X main.edition=generic -X main.version={{.Version}} -X main.revision={{.Commit}} -X main.buildAt={{.Date}} -X main.vendor={{envOrDefault `BIFROEST_VENDOR` `unknown`}}"

- id: extended
- id: extended-tgz
main: ./cmd/bifroest
binary: bifroest
goos:
Expand All @@ -37,10 +49,24 @@ builds:
- "-s -w -X main.edition=extended -X main.version={{.Version}} -X main.revision={{.Commit}} -X main.buildAt={{.Date}} -X main.vendor={{envOrDefault `BIFROEST_VENDOR` `unknown`}}"

archives:
- id: generic
- id: generic-tgz
format: tgz
builds:
- generic
- generic-tgz
name_template: "bifroest-{{ .Os }}-{{ .Arch }}-generic"
files:
- LICENSE
- README.md
- SECURITY.md
- contrib/*
builds_info:
group: root
owner: root

- id: generic-zip
format: zip
builds:
- generic-zip
name_template: "bifroest-{{ .Os }}-{{ .Arch }}-generic"
files:
- LICENSE
Expand All @@ -51,10 +77,10 @@ archives:
group: root
owner: root

- id: extended
- id: extended-tgz
format: tgz
builds:
- extended
- extended-tgz
name_template: "bifroest-{{ .Os }}-{{ .Arch }}-extended"
files:
- LICENSE
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Any kind of contribution is welcome, from new features to bug fixes to documenta

## How to Contribute

1. [Fork this repository]((https://github.com/engity-com/bifroest/fork)), develop, and test your changes.
1. [Fork this repository](https://github.com/engity-com/bifroest/fork), develop, and test your changes.
2. [Submit a pull request](https://docs.github.com/articles/creating-a-pull-request).
3. Read and agree to our [Contributor License Agreement](CLA.md) as requested in the pull request.

Expand Down
37 changes: 37 additions & 0 deletions docs/.theme/hooks/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import os
import posixpath

from mkdocs.structure.files import Files
from mkdocs.structure.pages import Page


# noinspection PyUnusedLocal
def on_page_markdown(markdown: str, page: Page, config, files: Files):
is_homepage = page.is_homepage or page.file.dest_path == "index.html"
title = page.meta.get("title", page.title)
if not is_homepage:
title = f"{title} - {config.site_name}"

description = page.meta["description"] if "description" in page.meta else config.site_description
url = ("{}".
format(posixpath.join(config.site_url or ".", config.extra["social_banner"])).
replace(os.path.sep, "/")
)

page.meta["meta"] = page.meta.get("meta", []) + [
{"property": "og:locale", "content": "en"},
{"property": "og:type", "content": "website" if is_homepage else "article"},
{"property": "og:title", "content": title},
{"property": "og:description", "content": description},
{"property": "og:image", "content": url},
{"property": "og:image:type", "content": "image/png"},
{"property": "og:image:width", "content": "1280"},
{"property": "og:image:height", "content": "640"},
{"property": "og:url", "content": page.canonical_url},

{"name": "twitter:site", "content": "@ENGITY_com"},
{"name": "twitter:card", "content": "summary_large_image"},
{"name": "twitter:title", "content": title},
{"name": "twitter:description", "content": description},
{"name": "twitter:image", "content": url}
]
6 changes: 3 additions & 3 deletions docs/.theme/main.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{% extends "base.html" %}
{%- extends "base.html" %}

{% block outdated %}
{%- block outdated %}
You're not viewing the latest version.
<a href="{{ '../' ~ base_url }}">
<strong>Click here to go to latest.</strong>
</a>
{% endblock %}
{%- endblock %}
Loading

0 comments on commit 5ffeff6

Please sign in to comment.