tangled
alpha
login
or
join now
julien.rbrt.fr
/
tangled-core
forked from
tangled.org/core
0
fork
atom
Monorepo for Tangled — https://tangled.org
0
fork
atom
overview
issues
pulls
pipelines
appview: add forgemeta to repository pages
anirudh.fi
11 months ago
b6fce01f
0ffcc288
verified
This commit was signed with the committer's
known signature
.
anirudh.fi
SSH Key Fingerprint:
SHA256:cz35vdbiWEzCNEfuL9fMC2JVIhtXavXBHrRjv8gxpAk=
+33
-9
4 changed files
expand all
collapse all
unified
split
appview
pages
templates
layouts
repobase.html
repo
blob.html
index.html
tree.html
-9
appview/pages/templates/layouts/repobase.html
···
1
1
{{ define "title" }}{{ .RepoInfo.FullName }}{{ end }}
2
2
3
3
-
{{ define "extrameta" }}
4
4
-
<meta name="vcs:clone" content="https://tangled.sh/{{ .RepoInfo.FullName }}"/>
5
5
-
<meta name="forge:summary" content="https://tangled.sh/{{ .RepoInfo.FullName }}">
6
6
-
<meta name="forge:dir" content="https://tangled.sh/{{ .RepoInfo.FullName }}/tree/{ref}/{path}">
7
7
-
<meta name="forge:file" content="https://tangled.sh/{{ .RepoInfo.FullName }}/blob/{ref}/{path}">
8
8
-
<meta name="forge:line" content="https://tangled.sh/{{ .RepoInfo.FullName }}/blob/{ref}/{path}#L{line}">
9
9
-
<meta name="go-import" content="tangled.sh/{{ .RepoInfo.FullNameWithoutAt }} git https://tangled.sh/{{ .RepoInfo.FullName }}">
10
10
-
{{ end }}
11
11
-
12
3
{{ define "content" }}
13
4
<section id="repo-header" class="mb-4 py-2 px-6">
14
5
<p class="text-lg">
+11
appview/pages/templates/repo/blob.html
···
1
1
{{ define "title" }}{{ .Path }} at {{ .Ref }} · {{ .RepoInfo.FullName }}{{ end }}
2
2
3
3
+
4
4
+
{{ define "extrameta" }}
5
5
+
<meta name="vcs:clone" content="https://tangled.sh/{{ .RepoInfo.FullName }}"/>
6
6
+
<meta name="forge:summary" content="https://tangled.sh/{{ .RepoInfo.FullName }}">
7
7
+
<meta name="forge:dir" content="https://tangled.sh/{{ .RepoInfo.FullName }}/tree/{ref}/{path}">
8
8
+
<meta name="forge:file" content="https://tangled.sh/{{ .RepoInfo.FullName }}/blob/{ref}/{path}">
9
9
+
<meta name="forge:line" content="https://tangled.sh/{{ .RepoInfo.FullName }}/blob/{ref}/{path}#L{line}">
10
10
+
<meta name="go-import" content="tangled.sh/{{ .RepoInfo.FullNameWithoutAt }} git https://tangled.sh/{{ .RepoInfo.FullName }}">
11
11
+
{{ end }}
12
12
+
13
13
+
3
14
{{ define "repoContent" }}
4
15
{{ $lines := split .Contents }}
5
16
{{ $tot_lines := len $lines }}
+11
appview/pages/templates/repo/index.html
···
1
1
{{ define "title" }}{{ .RepoInfo.FullName }} at {{ .Ref }}{{ end }}
2
2
3
3
+
4
4
+
{{ define "extrameta" }}
5
5
+
<meta name="vcs:clone" content="https://tangled.sh/{{ .RepoInfo.FullName }}"/>
6
6
+
<meta name="forge:summary" content="https://tangled.sh/{{ .RepoInfo.FullName }}">
7
7
+
<meta name="forge:dir" content="https://tangled.sh/{{ .RepoInfo.FullName }}/tree/{ref}/{path}">
8
8
+
<meta name="forge:file" content="https://tangled.sh/{{ .RepoInfo.FullName }}/blob/{ref}/{path}">
9
9
+
<meta name="forge:line" content="https://tangled.sh/{{ .RepoInfo.FullName }}/blob/{ref}/{path}#L{line}">
10
10
+
<meta name="go-import" content="tangled.sh/{{ .RepoInfo.FullNameWithoutAt }} git https://tangled.sh/{{ .RepoInfo.FullName }}">
11
11
+
{{ end }}
12
12
+
13
13
+
3
14
{{ define "repoContent" }}
4
15
<main>
5
16
{{ block "branchSelector" . }} {{ end }}
+11
appview/pages/templates/repo/tree.html
···
1
1
{{ define "title"}}{{ range .BreadCrumbs }}{{ index . 0}}/{{ end }} at {{ .Ref }} · {{ .RepoInfo.FullName }}{{ end }}
2
2
3
3
+
4
4
+
{{ define "extrameta" }}
5
5
+
<meta name="vcs:clone" content="https://tangled.sh/{{ .RepoInfo.FullName }}"/>
6
6
+
<meta name="forge:summary" content="https://tangled.sh/{{ .RepoInfo.FullName }}">
7
7
+
<meta name="forge:dir" content="https://tangled.sh/{{ .RepoInfo.FullName }}/tree/{ref}/{path}">
8
8
+
<meta name="forge:file" content="https://tangled.sh/{{ .RepoInfo.FullName }}/blob/{ref}/{path}">
9
9
+
<meta name="forge:line" content="https://tangled.sh/{{ .RepoInfo.FullName }}/blob/{ref}/{path}#L{line}">
10
10
+
<meta name="go-import" content="tangled.sh/{{ .RepoInfo.FullNameWithoutAt }} git https://tangled.sh/{{ .RepoInfo.FullName }}">
11
11
+
{{ end }}
12
12
+
13
13
+
3
14
{{define "repoContent"}}
4
15
<main>
5
16
<div class="tree">