-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #72 from grml/zeha/tips
tips: use tips data from github.com/grml/grml-tips
- Loading branch information
Showing
3 changed files
with
48 additions
and
4,079 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
+++ | ||
title = 'Tips' | ||
layout = 'tips' | ||
+++ | ||
{{< tips.inline >}} | ||
|
||
{{ $url := "https://raw.githubusercontent.com/grml/grml-tips/refs/heads/master/grml_tips" }} | ||
{{ $s := slice }} | ||
{{ $number := 0 }} | ||
{{ with resources.GetRemote $url }} | ||
{{ with .Err }} | ||
{{ errorf "%s" . }} | ||
{{ else }} | ||
{{- range (split (strings.TrimSuffix "-- \n" .Content) "\n-- \n") -}} | ||
<a name="{{ $number }}"></a> | ||
Grml Tip Number {{ $number }}<br> | ||
{{ $tip := . -}} | ||
<pre>{{ htmlEscape $tip -}}</pre> | ||
<hr> | ||
{{ $number = add $number 1 }} | ||
|
||
{{- end -}} | ||
{{ end -}} | ||
{{ else }} | ||
{{ errorf "Unable to fetch %q" $url }} | ||
{{ end -}} | ||
|
||
{{< /tips.inline >}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<title>grml.org - grml Tips</title> | ||
<meta name="Title" content="grml.org - grml Tips" /> | ||
<meta name="Author" content="the grml team [www.grml.org/team/]" /> | ||
<meta name="Keywords" content="grml.org, grml" /> | ||
<meta name="Description" content="grml Tips" /> | ||
<meta name="Abstract" content="Grml, a Live Linux distribution" /> | ||
<meta name="Robots" content="index,follow" /> | ||
<meta name="Language" content="english" /> | ||
<meta name="identifier-url" content="https://grml.org/" /> | ||
<link rel="home" href="/" title="grml.org" /> | ||
</head> | ||
<body> | ||
|
||
{{ .Content }} | ||
|
||
</body> | ||
</html> |
Oops, something went wrong.