aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel Arakaki Giovanini <mail@gabrielgio.me>2022-07-03 17:22:42 +0200
committerGabriel Arakaki Giovanini <mail@gabrielgio.me>2022-07-03 17:26:51 +0200
commitce6c095dc57827531f9627faf6a94183be451879 (patch)
tree8b752e62d49d5df1e088d87a177d4ab266f624a3
parentde76419cf301a986831dca0d802c73fd07223dbd (diff)
downloadjnfilter-ce6c095dc57827531f9627faf6a94183be451879.tar.gz
jnfilter-ce6c095dc57827531f9627faf6a94183be451879.tar.bz2
jnfilter-ce6c095dc57827531f9627faf6a94183be451879.zip
ref: Add build to publish the readme file
I use `index.html` in another places.
-rw-r--r--.build.yml6
-rw-r--r--Makefile10
-rw-r--r--docs/template.html51
3 files changed, 66 insertions, 1 deletions
diff --git a/.build.yml b/.build.yml
index 07080e1..97304f1 100644
--- a/.build.yml
+++ b/.build.yml
@@ -2,6 +2,7 @@ image: fedora/36
packages:
- rsync
- make
+ - pandoc
secrets:
- 008c4f67-b864-47f8-9790-cd32f2ae8516
@@ -17,9 +18,12 @@ tasks:
- build: |
cd jnfilter
make
+ - readme: |
+ cd jnfilter
+ make docs
- deploy: |
cd jnfilter
sshopts="ssh -o StrictHostKeyChecking=no"
- rsync --rsh="$sshopts" -rP dist/*.rpm $deploy:/var/www/$target
+ rsync --rsh="$sshopts" -rP dist/*.rpm index.html $deploy:/var/www/$target
diff --git a/Makefile b/Makefile
index ed3ae00..7922953 100644
--- a/Makefile
+++ b/Makefile
@@ -11,5 +11,15 @@ clean:
python setup.py clean --all
rm -rf dist jnfilter.egg-info
+docs:
+ pandoc -s \
+ --include-in-header=docs/bamboo.min.css \
+ --metadata title="Filtro para Nerdcast" \
+ --template docs/template.html \
+ -s README.md \
+ -o index.html
+
install_deps:
dnf install -y rpmdevtools rpmlint python
+
+.PHONY: docs
diff --git a/docs/template.html b/docs/template.html
new file mode 100644
index 0000000..0d6c5d0
--- /dev/null
+++ b/docs/template.html
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml" lang="$lang$" xml:lang="$lang$"$if(dir)$ dir="$dir$"$endif$>
+<head>
+ <meta charset="utf-8" />
+ <meta name="generator" content="pandoc" />
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
+$for(author-meta)$
+ <meta name="author" content="$author-meta$" />
+$endfor$
+$if(date-meta)$
+ <meta name="dcterms.date" content="$date-meta$" />
+$endif$
+$if(keywords)$
+ <meta name="keywords" content="$for(keywords)$$keywords$$sep$, $endfor$" />
+$endif$
+$if(description-meta)$
+ <meta name="description" content="$description-meta$" />
+$endif$
+ <title>$if(title-prefix)$$title-prefix$ – $endif$$pagetitle$</title>
+ <style>
+ $styles.html()$
+ </style>
+$for(css)$
+ <link rel="stylesheet" href="$css$" />
+$endfor$
+$if(math)$
+ $math$
+$endif$
+ <!--[if lt IE 9]>
+ <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
+ <![endif]-->
+$for(header-includes)$
+ $header-includes$
+$endfor$
+</head>
+<body>
+</header>
+$if(toc)$
+<nav id="$idprefix$TOC" role="doc-toc">
+$if(toc-title)$
+<h2 id="$idprefix$toc-title">$toc-title$</h2>
+$endif$
+$table-of-contents$
+</nav>
+$endif$
+$body$
+$for(include-after)$
+$include-after$
+$endfor$
+</body>
+</html>