Compare commits

...

No commits in common. "master" and "librepages" have entirely different histories.

66 changed files with 387 additions and 1347 deletions

4
.gitignore vendored
View File

@ -1,4 +0,0 @@
/public
README.md
LICENSEtmp/
tmp/

View File

@ -1,10 +0,0 @@
pipeline:
build:
image: python
when:
event: [ push, pull_request, tag, deployment ]
commands:
- make env
- make
- make ci-deploy
secrets: [ GITEA_WRITE_DEPLOY_KEY, LIBREPAGES_DEPLOY_SECRET ]

3
404.html Normal file
View File

@ -0,0 +1,3 @@
<!doctype html>
<title>404 Not Found</title>
<h1>404 Not Found</h1>

21
LICENSE
View File

@ -1,21 +0,0 @@
MIT License
Copyright (c) 2021 Roman Soldatenkov
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -1,27 +0,0 @@
default: ## Build the website
./scripts/spellcheck.sh --check
./scripts/zola.sh build
clean: ## Clean build assets
./scripts/zola.sh clean
ci-deploy: ## Deploy from CI/CD. Only call from within CI
@if [ "${CI}" != "woodpecker" ]; \
then echo "Only call from within CI. Will re-write your local Git configuration. To override, set export CI=woodpecker"; \
exit 1; \
fi
git config --global user.email "${CI_COMMIT_AUTHOR_EMAIL}"
git config --global user.name "${CI_COMMIT_AUTHOR}"
./scripts/zola.sh deploy librepages public "${CI_COMMIT_AUTHOR} <${CI_COMMIT_AUTHOR_EMAIL}>"
./scripts/ci.sh --init "$$GITEA_WRITE_DEPLOY_KEY"
./scripts/ci.sh --deploy ${LIBREPAGES_DEPLOY_SECRET} librepages
./scripts/ci.sh --clean
env: ## Download build dependencies and setup dev environment
./scripts/zola.sh install
help: ## Prints help for targets with comments
@cat $(MAKEFILE_LIST) | grep -E '^[a-zA-Z_-]+:.*?## .*$$' | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
serve: ## Serve website during development
./scripts/zola.sh zola -- serve

View File

@ -1,19 +0,0 @@
## An easy way to create a document library for your project
Demo: [https://easydocs.codeandmedia.com/](https://easydocs.codeandmedia.com/)
This theme for [Zola](https://getzola.org) (static site engine) helps you build and publish your project docs easily and fast. Zola is just one binary that outputs html-pages and additional static assets after building your docs written in Markdown. Thus, you can take the theme, your md-files, Zola and gain flexible and simple website for documentation.
### Step-by-step
As you may have heard Zola is quite flexible :) So, the scenario below is one of hundreds possible ways to make things done, feel free to find your best. Also, Zola provides their own mechanism to install and use themes, see [the docs](https://www.getzola.org/documentation/themes/installing-and-using-themes/).
1. Fork the repo and replace demo-content inside content folder with yours. But take a look to _index.md files. It contains `title` and when you want to have anchor right of your headers add `insert_anchor_links = "right"` to each index. `theme.toml`, screenshot and readme may be deleted too.
2. Inside `config.toml` change URL and title on your own. In extra section you can specify path to your GitHub API for version below the logo on nav, favicon and logo itself. Or just remove the lines if you don't need it. Also, you can configure or turn on some additional settings related to Zola. [Specification is here](https://www.getzola.org/documentation/getting-started/configuration/).
3. In sass/_variables.scss you may change font, color or background if you want.
4. Almost done. Now, you should decide how you want to build and where will be hosted your website. You can build it locally and upload to somewhere. Or build in GitHub Actions and host on GitHub Pages / Netlify / CloudFlare Pages / AnyS3CloudStorage. [Howto for GitHub Pages](https://www.getzola.org/documentation/deployment/github-pages/). [My example](https://github.com/o365hq/o365hq.com/blob/main/.github/workflows/main.yml) of GitHub workflow with 2-steps build (the first checks for links and spelling errors, the second uploads to Azure). [Dockerfile](https://github.com/codeandmedia/zola_docsascode_theme/blob/master/Dockerfile) to make Docker image.
Enjoy your docs!
* _Icons: [Office UI Fabric Icons](https://uifabricicons.azurewebsites.net/)_
* _Copy-code-button: [Aaron Luna](https://aaronluna.dev/blog/add-copy-button-to-code-blocks-hugo-chroma/)_

View File

@ -1,24 +0,0 @@
base_url = "https://docs.librepages.org"
title = "LibrePages Docs"
compile_sass = true
build_search_index = true
[markdown]
highlight_code = true
highlight_theme = "base16-ocean-light"
[extra]
logo = "/logo.png"
release = "https://git.batsense.net/LibrePages/forms/releases"
favicon = "/favicon/favicon.ico"
easydocs_logo_always_clickable = true
# For use with offline sites. If set to true template links are generated with the full path indcluding index.html
# Insired by Abridge theme https://www.getzola.org/themes/abridge/
# Notes:
# - Also requries the base URL to be set to the local folder where the site is stored eg. base_url = /home/user/mysite/public/
# - This is not portable and only works with a specific local folder
easydocs_uglyurls = false
# Minimum number of headings needed on a page before the headings show in the navigation on the left. Defaults to 5.
easydocs_heading_threshold = 5

View File

@ -1,14 +0,0 @@
+++
title = "index"
insert_anchor_links = "right"
+++
# Easiest way to deploy website
LibrePages is a JAMStack platform that enables developers to deploy
websites at lightning speeds without worrying about infrastructure.
## Features
1. Deploy from Git repositories
2. Form submissions on any page

View File

@ -1,6 +0,0 @@
+++
title = "Forms"
weight = 2
sort_by = "weight"
insert_anchor_links = "right"
+++

View File

@ -1,86 +0,0 @@
+++
title = "Add to Website"
weight = 2
sort_by = "weight"
insert_anchor_links = "right"
+++
LibrePages accepts form submissions from all webpages served by it. We
support form submissions in two formats:
1. Default encoding for HTTP forms(`application/x-www-form-urlencoded`)
2. JSON
## 1. Enable forms
To enable forms on LibrePages go to `dashboard > submissions` and click
on enable forms.
## 2. Integration on your website
### HTML Forms
Forms can be added to websites with just the HTML code for it. For
instance:
```html
<form
id="newsletter-form"
method="POST"
action="https://<librepages-endpoint>/?path=<current-path>&host=<current-host>"
>
<p>
Interested in receiving latest news about our cool product? Sign
up for you fantastic newsletter!
</p>
<label
>Email Address:<input type="email" id="email" name="email"
/></label>
<button type="submit">Send</button>
</form>
```
### JavaScript forms with Fetch API
Optionally, the submission can also be customized with frontend
JavaScript code:
> You can you use any HTTP request API you like but for this guide, we
> will be using [Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API)
```html
<form id="newsletter-form" method="POST">
<p>
Interested in receiving latest news about our cool product? Sign
up for you fantastic newsletter!
</p>
<label
>Email Address:<input type="email" id="email" name="email"
/></label>
<button type="submit">Send</button>
</form>
<script>
const form = document.getElementById("newsletter-form");
async function handleSubmit() {
const url =
"https://<librepages-endpoint>/api/v1/forms/submit?host=<current-host>&path=<current-path>";
const data = {
email: document.getElementById("email"),
};
await fetch(url, {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify(data),
});
}
form.addEventListener("submit", handleSubmit);
</script>
```
> Note: the following snippet also demonstrates JSON form submission

10
elasticlunr.min.js vendored Normal file

File diff suppressed because one or more lines are too long

1
fabric-icons-inline.css Normal file
View File

@ -0,0 +1 @@
@font-face{font-family:'FabricMDL2Icons';src:url("data:application/octet-stream;base64,d09GRgABAAAAAAusAA4AAAAAFLgABDXDAAAAAAAAAAAAAAAAAAAAAAAAAABPUy8yAAABRAAAAEgAAABgMUZ1H2NtYXAAAAGMAAAAWgAAAYKg2Y81Y3Z0IAAAAegAAAAgAAAAKgnZCa9mcGdtAAACCAAAAPAAAAFZ/J7mjmdhc3AAAAL4AAAADAAAAAwACAAbZ2x5ZgAAAwQAAANyAAAEuLnx29VoZWFkAAAGeAAAADIAAAA2A3zu4GhoZWEAAAasAAAAFQAAACQQAQgDaG10eAAABsQAAAAYAAAAGA+HAaZsb2NhAAAG3AAAABYAAAAWBoYE+m1heHAAAAb0AAAAHQAAACAAJAHEbmFtZQAAB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d2pYVZ3VTBE387r8cYMUCV9LZHjDbeA/Pe1KpS0XLnlW/mh2ZNXpkpzX2xa+6p63PDNatiSsh26OfghzYpv8j/PaP/PWKfOXHofbohJLNP8UL4LZrrv7f9wt/8GD0U4iAB4nGNgZgCD/34M5QyYgAsAKTQB0nic28CgzbCJkZNJm3ETF4jcztWaG2qrysChvZ07NdhBTwbE4onwsNCQBLF4nc215YVBLD4dFRkRHhCLX05CmI8DxBLg4+FkZwGxBMEAxBLaMKEgwADIYtjOCDeaCW40M9xoFrjRrHCj2eQkoUazw43mgBvNCTd6kzAju/YGBgXX2kwJFwDEASgaAAAA") format("truetype")}.ms-Icon{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:inline-block;font-family:'FabricMDL2Icons';font-style:normal;font-weight:normal;speak:none}.ms-Icon--ChevronRightSmall:before{content:"\E970"}.ms-Icon--ChromeClose:before{content:"\E8BB"}.ms-Icon--Copy:before{content:"\E8C8"}.ms-Icon--GlobalNavButton:before{content:"\E700"}.ms-Icon--MiniLink:before{content:"\E732"}.ms-Icon--Page:before{content:"\E7C3"}.ms-Icon--ProductRelease:before{content:"\EE2E"}.ms-Icon--Save:before{content:"\E74E"}.ms-Icon--Search:before{content:"\E721"}

View File

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

Before

Width:  |  Height:  |  Size: 795 B

After

Width:  |  Height:  |  Size: 795 B

View File

Before

Width:  |  Height:  |  Size: 846 B

After

Width:  |  Height:  |  Size: 846 B

View File

Before

Width:  |  Height:  |  Size: 987 B

After

Width:  |  Height:  |  Size: 987 B

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

Before

Width:  |  Height:  |  Size: 895 B

After

Width:  |  Height:  |  Size: 895 B

View File

Before

Width:  |  Height:  |  Size: 919 B

After

Width:  |  Height:  |  Size: 919 B

View File

Before

Width:  |  Height:  |  Size: 987 B

After

Width:  |  Height:  |  Size: 987 B

View File

Before

Width:  |  Height:  |  Size: 1012 B

After

Width:  |  Height:  |  Size: 1012 B

View File

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

Before

Width:  |  Height:  |  Size: 693 B

After

Width:  |  Height:  |  Size: 693 B

View File

Before

Width:  |  Height:  |  Size: 777 B

After

Width:  |  Height:  |  Size: 777 B

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

View File

Before

Width:  |  Height:  |  Size: 984 B

After

Width:  |  Height:  |  Size: 984 B

View File

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

164
forms/add/index.html Normal file
View File

@ -0,0 +1,164 @@
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="https://docs.librepages.org/main.css">
<link rel="icon" href="https://docs.librepages.org/favicon/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<title> LibrePages Docs | Add to Website </title>
<!-- Matomo -->
<script>
var _paq = window._paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(["setDocumentTitle", document.domain + "/" + document.title]);
_paq.push(["setCookieDomain", "*.docs.librepages.org"]);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="//matomo.librepages.org/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '5']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<noscript><p><img src="//matomo.librepages.org/matomo.php?idsite=5&amp;rec=1" style="border:0;" alt="" /></p></noscript>
<!-- End Matomo Code -->
</head>
<body>
<script>
fetch('https://git.batsense.net/LibrePages/forms/releases')
.then((response) => {
return response.json();
})
.then((data) => {
let release_name = data.name;
let html_url = data.html_url;
release.innerHTML = `<a href='${html_url}'>${release_name}</a>`;
});
</script>
<main>
<nav>
<a href="https:&#x2F;&#x2F;docs.librepages.org">
<img src="https://docs.librepages.org/logo.png" alt="logo"/>
</a>
<div id="release"></div>
<a href="javascript:void(0);" onclick="burger()" id="mobile" class="ms-Icon--GlobalNavButton"></a>
<div id="trees">
<input class="tree-toggle" type="checkbox" id="forms"
checked/>
<label class="tree-toggle-label"
for="forms">Forms</label>
<ul class="subtree">
<li class="active">
<a href="https://docs.librepages.org/forms/add/">Add to Website</a>
</li>
</ul>
</div>
</nav>
<article>
<div id="on_right">
<span id="search-ico" class="ms-Icon--Search"></span>
</div>
<div class="search-container">
<input id="search" type="search" placeholder="Search as you type...">
<div class="search-results">
<div class="search-results__header"></div>
<ul class="search-results__items"></ul>
</div>
</div>
<div id="wrap">
<p>LibrePages accepts form submissions from all webpages served by it. We
support form submissions in two formats:</p>
<ol>
<li>Default encoding for HTTP forms(<code>application/x-www-form-urlencoded</code>)</li>
<li>JSON</li>
</ol>
<h2 id="1-enable-forms">1. Enable forms&nbsp;<a class="anchor" href="#1-enable-forms">&#xE732;</a></h2>
<p>To enable forms on LibrePages go to <code>dashboard &gt; submissions</code> and click
on enable forms.</p>
<h2 id="2-integration-on-your-website">2. Integration on your website&nbsp;<a class="anchor" href="#2-integration-on-your-website">&#xE732;</a></h2>
<h3 id="html-forms">HTML Forms&nbsp;<a class="anchor" href="#html-forms">&#xE732;</a></h3>
<p>Forms can be added to websites with just the HTML code for it. For
instance:</p>
<pre data-lang="html" style="background-color:#eff1f5;color:#4f5b66;" class="language-html "><code class="language-html" data-lang="html"><span>&lt;</span><span style="color:#bf616a;">form
</span><span> </span><span style="color:#8fa1b3;">id</span><span>=&quot;</span><span style="color:#a3be8c;">newsletter-form</span><span>&quot;
</span><span> </span><span style="color:#d08770;">method</span><span>=&quot;</span><span style="color:#a3be8c;">POST</span><span>&quot;
</span><span> </span><span style="color:#d08770;">action</span><span>=&quot;</span><span style="color:#a3be8c;">https://&lt;librepages-endpoint&gt;/?path=&lt;current-path&gt;&amp;host=&lt;current-host&gt;</span><span>&quot;
</span><span>&gt;
</span><span> &lt;</span><span style="color:#bf616a;">p</span><span>&gt;
</span><span> Interested in receiving latest news about our cool product? Sign
</span><span> up for you fantastic newsletter!
</span><span> &lt;/</span><span style="color:#bf616a;">p</span><span>&gt;
</span><span> &lt;</span><span style="color:#bf616a;">label
</span><span> &gt;Email Address:&lt;</span><span style="color:#bf616a;">input </span><span style="color:#d08770;">type</span><span>=&quot;</span><span style="color:#a3be8c;">email</span><span>&quot; </span><span style="color:#8fa1b3;">id</span><span>=&quot;</span><span style="color:#a3be8c;">email</span><span>&quot; </span><span style="color:#d08770;">name</span><span>=&quot;</span><span style="color:#a3be8c;">email</span><span>&quot;
</span><span> /&gt;&lt;/</span><span style="color:#bf616a;">label</span><span>&gt;
</span><span> &lt;</span><span style="color:#bf616a;">button </span><span style="color:#d08770;">type</span><span>=&quot;</span><span style="color:#a3be8c;">submit</span><span>&quot;&gt;Send&lt;/</span><span style="color:#bf616a;">button</span><span>&gt;
</span><span>&lt;/</span><span style="color:#bf616a;">form</span><span>&gt;
</span></code></pre>
<h3 id="javascript-forms-with-fetch-api">JavaScript forms with Fetch API&nbsp;<a class="anchor" href="#javascript-forms-with-fetch-api">&#xE732;</a></h3>
<p>Optionally, the submission can also be customized with frontend
JavaScript code:</p>
<blockquote>
<p>You can you use any HTTP request API you like but for this guide, we
will be using <a href="https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API">Fetch API</a></p>
</blockquote>
<pre data-lang="html" style="background-color:#eff1f5;color:#4f5b66;" class="language-html "><code class="language-html" data-lang="html"><span>&lt;</span><span style="color:#bf616a;">form </span><span style="color:#8fa1b3;">id</span><span>=&quot;</span><span style="color:#a3be8c;">newsletter-form</span><span>&quot; </span><span style="color:#d08770;">method</span><span>=&quot;</span><span style="color:#a3be8c;">POST</span><span>&quot;&gt;
</span><span> &lt;</span><span style="color:#bf616a;">p</span><span>&gt;
</span><span> Interested in receiving latest news about our cool product? Sign
</span><span> up for you fantastic newsletter!
</span><span> &lt;/</span><span style="color:#bf616a;">p</span><span>&gt;
</span><span> &lt;</span><span style="color:#bf616a;">label
</span><span> &gt;Email Address:&lt;</span><span style="color:#bf616a;">input </span><span style="color:#d08770;">type</span><span>=&quot;</span><span style="color:#a3be8c;">email</span><span>&quot; </span><span style="color:#8fa1b3;">id</span><span>=&quot;</span><span style="color:#a3be8c;">email</span><span>&quot; </span><span style="color:#d08770;">name</span><span>=&quot;</span><span style="color:#a3be8c;">email</span><span>&quot;
</span><span> /&gt;&lt;/</span><span style="color:#bf616a;">label</span><span>&gt;
</span><span> &lt;</span><span style="color:#bf616a;">button </span><span style="color:#d08770;">type</span><span>=&quot;</span><span style="color:#a3be8c;">submit</span><span>&quot;&gt;Send&lt;/</span><span style="color:#bf616a;">button</span><span>&gt;
</span><span>&lt;/</span><span style="color:#bf616a;">form</span><span>&gt;
</span><span>
</span><span>&lt;</span><span style="color:#bf616a;">script</span><span>&gt;
</span><span> </span><span style="color:#b48ead;">const </span><span style="color:#bf616a;">form </span><span>= document.</span><span style="color:#bf616a;">getElementById</span><span>(&quot;</span><span style="color:#a3be8c;">newsletter-form</span><span>&quot;);
</span><span>
</span><span> </span><span style="color:#b48ead;">async function </span><span style="color:#8fa1b3;">handleSubmit</span><span>() {
</span><span> </span><span style="color:#b48ead;">const </span><span style="color:#bf616a;">url </span><span>=
</span><span> &quot;</span><span style="color:#a3be8c;">https://&lt;librepages-endpoint&gt;/api/v1/forms/submit?host=&lt;current-host&gt;&amp;path=&lt;current-path&gt;</span><span>&quot;;
</span><span> </span><span style="color:#b48ead;">const </span><span style="color:#bf616a;">data </span><span>= {
</span><span> email: document.</span><span style="color:#bf616a;">getElementById</span><span>(&quot;</span><span style="color:#a3be8c;">email</span><span>&quot;),
</span><span> };
</span><span>
</span><span> </span><span style="color:#b48ead;">await </span><span style="color:#bf616a;">fetch</span><span>(</span><span style="color:#bf616a;">url</span><span>, {
</span><span> method: &quot;</span><span style="color:#a3be8c;">POST</span><span>&quot;,
</span><span> headers: {
</span><span> &quot;</span><span style="color:#a3be8c;">Content-Type</span><span>&quot;: &quot;</span><span style="color:#a3be8c;">application/json</span><span>&quot;,
</span><span> },
</span><span> body: JSON.</span><span style="color:#96b5b4;">stringify</span><span>(</span><span style="color:#bf616a;">data</span><span>),
</span><span> });
</span><span> }
</span><span>
</span><span> </span><span style="color:#bf616a;">form</span><span>.</span><span style="color:#bf616a;">addEventListener</span><span>(&quot;</span><span style="color:#a3be8c;">submit</span><span>&quot;, </span><span style="color:#bf616a;">handleSubmit</span><span>);
</span><span>&lt;/</span><span style="color:#bf616a;">script</span><span>&gt;
</span></code></pre>
<blockquote>
<p>Note: the following snippet also demonstrates JSON form submission</p>
</blockquote>
</div>
</article>
</main>
<script type="text/javascript" src="https://docs.librepages.org/elasticlunr.min.js" defer></script>
<script type="text/javascript" src="https://docs.librepages.org/search_index.en.js" defer></script>
<script type="text/javascript" src="https://docs.librepages.org/js.js" defer></script>
</body>
</html>

96
forms/index.html Normal file
View File

@ -0,0 +1,96 @@
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="https://docs.librepages.org/main.css">
<link rel="icon" href="https://docs.librepages.org/favicon/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<title> LibrePages Docs | Forms </title>
<!-- Matomo -->
<script>
var _paq = window._paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(["setDocumentTitle", document.domain + "/" + document.title]);
_paq.push(["setCookieDomain", "*.docs.librepages.org"]);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="//matomo.librepages.org/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '5']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<noscript><p><img src="//matomo.librepages.org/matomo.php?idsite=5&amp;rec=1" style="border:0;" alt="" /></p></noscript>
<!-- End Matomo Code -->
</head>
<body>
<script>
fetch('https://git.batsense.net/LibrePages/forms/releases')
.then((response) => {
return response.json();
})
.then((data) => {
let release_name = data.name;
let html_url = data.html_url;
release.innerHTML = `<a href='${html_url}'>${release_name}</a>`;
});
</script>
<main>
<nav>
<a href="https:&#x2F;&#x2F;docs.librepages.org">
<img src="https://docs.librepages.org/logo.png" alt="logo"/>
</a>
<div id="release"></div>
<a href="javascript:void(0);" onclick="burger()" id="mobile" class="ms-Icon--GlobalNavButton"></a>
<div id="trees">
<input class="tree-toggle" type="checkbox" id="forms"
checked/>
<label class="tree-toggle-label"
for="forms">Forms</label>
<ul class="subtree">
<li >
<a href="https://docs.librepages.org/forms/add/">Add to Website</a>
</li>
</ul>
</div>
</nav>
<article>
<div id="on_right">
<span id="search-ico" class="ms-Icon--Search"></span>
</div>
<div class="search-container">
<input id="search" type="search" placeholder="Search as you type...">
<div class="search-results">
<div class="search-results__header"></div>
<ul class="search-results__items"></ul>
</div>
</div>
<div id="wrap">
<h2 class="title"> Forms </h2>
<h3>Pages:</h3>
<ul>
<li><a href="https://docs.librepages.org/forms/add/">Add to Website</a></li>
</ul>
</div>
</article>
</main>
<script type="text/javascript" src="https://docs.librepages.org/elasticlunr.min.js" defer></script>
<script type="text/javascript" src="https://docs.librepages.org/search_index.en.js" defer></script>
<script type="text/javascript" src="https://docs.librepages.org/js.js" defer></script>
</body>
</html>

96
index.html Normal file
View File

@ -0,0 +1,96 @@
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="https://docs.librepages.org/main.css">
<link rel="icon" href="https://docs.librepages.org/favicon/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<title>LibrePages Docs</title>
<!-- Matomo -->
<script>
var _paq = window._paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(["setDocumentTitle", document.domain + "/" + document.title]);
_paq.push(["setCookieDomain", "*.docs.librepages.org"]);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="//matomo.librepages.org/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '5']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<noscript><p><img src="//matomo.librepages.org/matomo.php?idsite=5&amp;rec=1" style="border:0;" alt="" /></p></noscript>
<!-- End Matomo Code -->
</head>
<body>
<script>
fetch('https://git.batsense.net/LibrePages/forms/releases')
.then((response) => {
return response.json();
})
.then((data) => {
let release_name = data.name;
let html_url = data.html_url;
release.innerHTML = `<a href='${html_url}'>${release_name}</a>`;
});
</script>
<main>
<nav>
<a href="https:&#x2F;&#x2F;docs.librepages.org">
<img src="https://docs.librepages.org/logo.png" alt="logo"/>
</a>
<div id="release"></div>
<a href="javascript:void(0);" onclick="burger()" id="mobile" class="ms-Icon--GlobalNavButton"></a>
<div id="trees">
<input class="tree-toggle" type="checkbox" id="forms"
/>
<label class="tree-toggle-label"
for="forms">Forms</label>
<ul class="subtree">
<li >
<a href="https://docs.librepages.org/forms/add/">Add to Website</a>
</li>
</ul>
</div>
</nav>
<article>
<div id="on_right">
<span id="search-ico" class="ms-Icon--Search"></span>
</div>
<div class="search-container">
<input id="search" type="search" placeholder="Search as you type...">
<div class="search-results">
<div class="search-results__header"></div>
<ul class="search-results__items"></ul>
</div>
</div>
<div id="wrap">
<h1 id="easiest-way-to-deploy-website">Easiest way to deploy website&nbsp;<a class="anchor" href="#easiest-way-to-deploy-website">&#xE732;</a></h1>
<p>LibrePages is a JAMStack platform that enables developers to deploy
websites at lightning speeds without worrying about infrastructure.</p>
<h2 id="features">Features&nbsp;<a class="anchor" href="#features">&#xE732;</a></h2>
<ol>
<li>Deploy from Git repositories</li>
<li>Form submissions on any page</li>
</ol>
</div>
</article>
</main>
<script type="text/javascript" src="https://docs.librepages.org/elasticlunr.min.js" defer></script>
<script type="text/javascript" src="https://docs.librepages.org/search_index.en.js" defer></script>
<script type="text/javascript" src="https://docs.librepages.org/js.js" defer></script>
</body>
</html>

View File

View File

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

1
main.css Normal file

File diff suppressed because one or more lines are too long

3
robots.txt Normal file
View File

@ -0,0 +1,3 @@
User-agent: *
Allow: /
Sitemap: https://docs.librepages.org/sitemap.xml

View File

@ -1,61 +0,0 @@
.search-container {
display: none;
&--is-visible {
display: block;
width: 100%;
}
#search {
width: 100%;
display: block;
border:none;
border-left: 1px solid $color;
padding:1px 0;
text-align: left;
line-height: $baseline;
font-size: $font-size;
font-family:$font-family;
color:$color;
background:transparent;
}
#search:focus {
outline:none;
border:none;
}
.search-results {
&__header {
font-weight: bold;
padding: 1rem 0rem;
}
&__items {
margin: 0 2vw;
padding: 0;
list-style: circle;
}
&__item {
margin-bottom: 1rem;
}
&__teaser {
}
}
}
#on_right {
display: block;
text-align: right;
margin-bottom: $baseline;
}
#search-ico {
font-family: 'FabricMDL2Icons';
cursor: pointer;
font-size: $baseline;
line-height: 1;
}

View File

@ -1,16 +0,0 @@
$baseline: 1.5rem;
$background:#f9f9f9;
$color:#222;
$links: #00f;
$hover-links:#c00;
$visited-links:#009;
$font-size: 1.125rem;
$font-family: Segoe UI,system-ui,-apple-system,sans-serif;
$line-height: 1.75;
$code_font: 400 1.125rem/1.75 SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;
$quote-bg: #dcdcdc;
$quote-border: #808080 8px solid;

View File

@ -1,40 +0,0 @@
/*
Your use of the content in the files referenced here is subject to the terms of the license at https://aka.ms/fabric-assets-license
*/
@font-face {
font-family: 'FabricMDL2Icons';
src: url('data:application/octet-stream;base64,d09GRgABAAAAAAusAA4AAAAAFLgABDXDAAAAAAAAAAAAAAAAAAAAAAAAAABPUy8yAAABRAAAAEgAAABgMUZ1H2NtYXAAAAGMAAAAWgAAAYKg2Y81Y3Z0IAAAAegAAAAgAAAAKgnZCa9mcGdtAAACCAAAAPAAAAFZ/J7mjmdhc3AAAAL4AAAADAAAAAwACAAbZ2x5ZgAAAwQAAANyAAAEuLnx29VoZWFkAAAGeAAAADIAAAA2A3zu4GhoZWEAAAasAAAAFQAAACQQAQgDaG10eAAABsQAAAAYAAAAGA+HAaZsb2NhAAAG3AAAABYAAAAWBoYE+m1heHAAAAb0AAAAHQAAACAAJAHEbmFtZQAABxQAAAP3AAAJ+o6N8lFwb3N0AAALDAAAABQAAAAg/1EAgXByZXAAAAs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pkpzX2xa+6p63PDNatiSsh26OfghzYpv8j/PaP/PWKfOXHofbohJLNP8UL4LZrrv7f9wt/8GD0U4iAB4nGNgZgCD/34M5QyYgAsAKTQB0nic28CgzbCJkZNJm3ETF4jcztWaG2qrysChvZ07NdhBTwbE4onwsNCQBLF4nc215YVBLD4dFRkRHhCLX05CmI8DxBLg4+FkZwGxBMEAxBLaMKEgwADIYtjOCDeaCW40M9xoFrjRrHCj2eQkoUazw43mgBvNCTd6kzAju/YGBgXX2kwJFwDEASgaAAAA') format('truetype');
}
.ms-Icon {
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
display: inline-block;
font-family: 'FabricMDL2Icons';
font-style: normal;
font-weight: normal;
speak: none;
}
// Mixins
@mixin ms-Icon--ChevronRightSmall { content: "\E970"; }
@mixin ms-Icon--ChromeClose { content: "\E8BB"; }
@mixin ms-Icon--Copy { content: "\E8C8"; }
@mixin ms-Icon--GlobalNavButton { content: "\E700"; }
@mixin ms-Icon--MiniLink { content: "\E732"; }
@mixin ms-Icon--Page { content: "\E7C3"; }
@mixin ms-Icon--ProductRelease { content: "\EE2E"; }
@mixin ms-Icon--Save { content: "\E74E"; }
@mixin ms-Icon--Search { content: "\E721"; }
// Classes
.ms-Icon--ChevronRightSmall:before { @include ms-Icon--ChevronRightSmall }
.ms-Icon--ChromeClose:before { @include ms-Icon--ChromeClose }
.ms-Icon--Copy:before { @include ms-Icon--Copy }
.ms-Icon--GlobalNavButton:before { @include ms-Icon--GlobalNavButton }
.ms-Icon--MiniLink:before { @include ms-Icon--MiniLink }
.ms-Icon--Page:before { @include ms-Icon--Page }
.ms-Icon--ProductRelease:before { @include ms-Icon--ProductRelease }
.ms-Icon--Save:before { @include ms-Icon--Save }
.ms-Icon--Search:before { @include ms-Icon--Search }

View File

@ -1,353 +0,0 @@
@import "variables";
html {
font-kerning: normal;
text-rendering: optimizeLegibility;
scroll-behavior: smooth;
}
body {
margin:$baseline 0;
font-size:$font-size;
font-family:$font-family;
line-height: $line-height;
background:$background;
color:$color;
}
@keyframes fade-in {
0% {
opacity: 0;
}
50% {
opacity: 0.8;
}
100% {
opacity: 1;
}
}
a {
&:link {
color:$links;
text-decoration: none;
}
&:hover {
color:$hover-links;
}
&:visited {
color:$visited-links;
}
}
h2,
h3,
h4 {
.anchor {
visibility: hidden;
text-decoration: none;
cursor: pointer;
line-height: 1;
color:$color;
}
&:hover {
.anchor {
visibility: visible;
animation: fade-in 0.3s ease-in-out;
font-family: 'FabricMDL2Icons';
}
}
}
table td, table th {
border: 1px solid $color;
}
pre {
margin:$baseline 0;
border-radius: 4px;
padding:$baseline;
overflow: auto;
position: relative;
code {
background:transparent;
&::after {
content: attr(data-lang);
font-style: italic;
line-height: 1;
opacity:0.3;
position:absolute;
bottom:$baseline;
right:$baseline;
z-index:1;
}
}
}
code {
font: $code_font;
}
.copy-code-button {
font-family: 'FabricMDL2Icons';
display:none;
background:$background;
border-radius: 4px;
border:none;
cursor: pointer;
animation: fade-in 0.3s ease-in-out;
font-size: $baseline;
color:$color;
z-index: 10;
position:absolute;
top:$baseline;
right:$baseline;
}
pre:hover .copy-code-button {
display: block;
}
nav {
position: sticky;
height: 92vh;
top:$baseline;
left:$baseline;
bottom: $baseline;
padding-right: $baseline;
width: 20rem;
img {
width:128px;
}
h1 {
margin:0;
line-height: 1;
}
}
#toc {
margin-left:calc(#{$baseline} + #{$font-size});
padding:0;
margin:0 0 0 $baseline;
font-size: 80%;
li {
color:$color;
margin-left: $font-size;
&::before {
display: inline-block;
content:"";
}
ul {
padding:0;
}
}
}
main {
display: flex;
flex-flow: row nowrap;
animation: fade-in 0.4s ease-in-out;
}
#release {
text-align: left;
margin:$baseline 0;
&::before {
display: inline-block;
content: "\EE2E";
font-family: 'FabricMDL2Icons';
margin-right:calc(#{$baseline} / 8);
}
}
@keyframes slideIn {
0% {
max-height:0;
opacity:0
}
100% {
max-height:999px;
opacity:1
}
}
@keyframes slideOut {
0% {
height:auto;
opacity:1
}
100% {
height:0;
opacity:0
}
}
nav label {
display:block;
}
#trees {
overflow-y: auto;
height: 80%;
}
.subtree {
overflow:hidden;
margin:calc(#{$baseline} / 8) 0;
transition: overflow 0.2s ease-in-out;
padding: 0;
}
.tree-toggle-label {
user-select:none;
cursor:pointer;
}
.tree-toggle-label::before {
display:inline-block;
content:"\E970";
font-family:'FabricMDL2Icons';
font-size:.75rem;
transform:rotate(0deg);
transform-origin:50% 50% 0px;
transition:transform 0.1s linear 0s;
margin-right: 2px;
}
.tree-toggle {
position:absolute;
opacity:0;
z-index:-1;
}
.tree-toggle:checked+.tree-toggle-label::before {
content:"\E970";
font-family:'FabricMDL2Icons';
font-size:.75rem;
transform:rotate(90deg);
transform-origin:50% 50% 0px;
transition:transform 0.1s linear 0s;
margin-right: 2px;
}
.tree-toggle:checked+.tree-toggle-label {
font-weight:bold;
}
.tree-toggle+.tree-toggle-label+.subtree {
animation-name:slideOut;
animation-duration:0.25s;
animation-fill-mode:both;
}
.tree-toggle:checked+.tree-toggle-label+.subtree {
animation-name:slideIn;
animation-duration:0.25s;
animation-fill-mode:both;
}
.subtree li {
list-style-type: none;
margin-left: $baseline;
a {
color:$color;
}
&::before {
content: "\E7C3";
font-family:'FabricMDL2Icons';
font-size:0.75rem;
}
}
.active a {
font-weight: bold;
}
article {
width: calc(100% - (#{$baseline} * 4 + 20rem));
margin-left:calc(#{$baseline} * 2);
img {
max-width:100%;
}
}
#mobile {
display: none;
}
@media screen and (max-width: 1023px) {
main {
flex-flow: column nowrap;
width: 100%;
}
nav {
position: inherit;
height:auto;
margin:$baseline $baseline 0 $baseline;
}
article {
width: calc(100% - (#{$baseline} * 2));
margin:0 $baseline;
z-index:1;
}
#mobile {
font-family: 'FabricMDL2Icons';
cursor: pointer;
font-size: $baseline;
margin:0 $baseline 0 0;
display: block;
color:$color;
}
#trees {
display: none;
position:absolute;
background: $background;
height:auto;
width:100vw;
z-index:10;
box-shadow: 0 2px 0 rgba(0,0,0,.1);
}
#on_right {
margin-top:$baseline;
}
}
blockquote {
border-left: $quote-border;
margin: 0;
background-color: $quote-bg;
padding: 0 20px;
}
@import "fabric-icons-inline";
@import "search";

Binary file not shown.

Before

Width:  |  Height:  |  Size: 147 KiB

View File

@ -1,120 +0,0 @@
#!/bin/bash
# ci.sh: Helper script to automate deployment operations on CI/CD
# Copyright © 2022 Aravinth Manivannan <realaravinth@batsense.net>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
set -xEeuo pipefail
#source $(pwd)/scripts/lib.sh
readonly SSH_ID_FILE=/tmp/ci-ssh-id
readonly SSH_REMOTE_NAME=origin-ssh
match_arg() {
if [ $1 == $2 ] || [ $1 == $3 ]
then
return 0
else
return 1
fi
}
help() {
cat << EOF
USAGE: ci.sh [SUBCOMMAND]
Helper script to automate deployment operations on CI/CD
Subcommands
-c --clean cleanup secrets, SSH key and other runtime data
-i --init <SSH_PRIVATE_KEY> initialize environment, write SSH private to file
-d --deploy <PAGES-SECRET> <TARGET BRANCH> push branch to Gitea and call Pages server
-h --help print this help menu
EOF
}
# $1: SSH private key
write_ssh(){
truncate --size 0 $SSH_ID_FILE
echo "$1" > $SSH_ID_FILE
chmod 600 $SSH_ID_FILE
}
set_ssh_remote() {
http_remote_url=$(git remote get-url origin)
remote_hostname=$(echo $http_remote_url | cut -d '/' -f 3)
repository_owner=$(echo $http_remote_url | cut -d '/' -f 4)
repository_name=$(echo $http_remote_url | cut -d '/' -f 5)
ssh_remote="git@$remote_hostname:$repository_owner/$repository_name"
ssh_remote="git@git.batsense.net:LibrePages/docs.git"
git remote add $SSH_REMOTE_NAME $ssh_remote
}
clean() {
if [ -f $SSH_ID_FILE ]
then
shred $SSH_ID_FILE
rm $SSH_ID_FILE
fi
}
# $1: Pages API secret
# $2: Deployment target branch
deploy() {
if (( "$#" < 2 ))
then
help
else
git -c core.sshCommand="/usr/bin/ssh -oStrictHostKeyChecking=no -i $SSH_ID_FILE"\
push --force $SSH_REMOTE_NAME $2
curl -vv --location --request \
POST "https://deploy.batsense.net/api/v1/update"\
--header 'Content-Type: application/json' \
--data-raw "{ \"secret\": \"$1\", \"branch\": \"$2\" }"
fi
}
if (( "$#" < 1 ))
then
help
exit -1
fi
if match_arg $1 '-i' '--init'
then
if (( "$#" < 2 ))
then
help
exit -1
fi
set_ssh_remote
write_ssh "$2"
elif match_arg $1 '-c' '--clean'
then
clean
elif match_arg $1 '-d' '--deploy'
then
if (( "$#" < 3 ))
then
help
exit -1
fi
deploy $2 $3
elif match_arg $1 '-h' '--help'
then
help
else
help
fi

View File

@ -1,32 +0,0 @@
#!/bin/bash
# Copyright © 2021 Aravinth Manivannan <realaravinth@batsense.net>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
check_arg(){
if [ -z $1 ]
then
help
exit 1
fi
}
match_arg() {
if [ $1 == $2 ] || [ $1 == $3 ]
then
return 0
else
return 1
fi
}

View File

@ -1,98 +0,0 @@
#!/bin/bash
# Used in CI workflow: install and check for spelling errors
# Copyright © 2021 Aravinth Manivannan <realaravinth@batsense.net>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
readonly MISSPELL_DOWNLOAD="https://github.com/client9/misspell/releases/download/v0.3.4/misspell_0.3.4_linux_64bit.tar.gz"
readonly TMP_DIR=$(pwd)/tmp
readonly PROJECT_ROOT=$(pwd)
readonly MISSPELL_TARBALL="$TMP_DIR/misspell.tar.bz2"
readonly MISSPELL="$TMP_DIR/misspell"
set -Eeuo pipefail
source $(pwd)/scripts/lib.sh
FLAGS=""
help() {
cat << EOF
spellcheck.sh: Check for spelling errors
USAGE:
spellcheck.sh <options>
OPTIONS:
c --check check for spelling erros
h --help print this help menu
w --write check and fix spelling errors
EOF
}
download() {
if [ ! -e $MISSPELL ];
then
echo "[*] Downloading misspell"
wget --quiet --output-doc=$MISSPELL_TARBALL $MISSPELL_DOWNLOAD;
cd $TMP_DIR
tar -xf $MISSPELL_TARBALL;
cd $PROJECT_ROOT
pip install codespell
else
echo "[*] Found misspell"
fi
}
spell_check_codespell() {
_check(){
codespell $FLAGS $PROJECT_ROOT/$1 #|| true
}
_check README.md
_check contents
}
spell_check_misspell() {
mkdir $TMP_DIR || true
download
_check(){
$MISSPELL $FLAGS $PROJECT_ROOT/$1
}
_check contents
_check README.md
}
check_arg $1
if match_arg $1 'w' '--write'
then
echo "[*] checking and correcting spellings"
FLAGS="-w"
spell_check_misspell
spell_check_codespell
elif match_arg $1 'c' '--check'
then
echo "[*] checking spellings"
spell_check_misspell
spell_check_codespell
elif match_arg $1 'h' '--help'
then
help
else
echo "undefined option"
help
exit 1
fi

View File

@ -1,158 +0,0 @@
#!/bin/bash
# Used in CI workflow: install Zola binary from GitHub
# Copyright © 2021 Aravinth Manivannan <realaravinth@batsense.net>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
set -euo pipefail
readonly PROJECT_ROOT=$(pwd)
readonly TARBALL=zola.tar.gz
readonly SOURCE="https://github.com/getzola/zola/releases/download/v0.15.3/zola-v0.15.3-x86_64-unknown-linux-gnu.tar.gz"
readonly BIN_PATH=tmp/bin
readonly BIN=$BIN_PATH/zola
readonly DIST=public
source $(pwd)/scripts/lib.sh
help() {
cat << EOF
zola.sh: Zola build script
USAGE:
zola.sh <options>
OPTIONS:
b build build website
c clean clean dependencies and build artifacts
d deploy deploy build to branch
h help print this help menu
i install install build dependencies
u url make urls relative
z zola invoke zola
EOF
}
download() {
if [ ! -e $BIN_PATH ];
then
mkdir -p $BIN_PATH
cd $BIN_PATH
echo "[*] Downloading Zola"
wget --quiet --output-document=$TARBALL $SOURCE
tar -xvzf $TARBALL > /dev/null
rm $TARBALL
echo "[*] Downloaded zola into $BIN"
cd $PROJECT_ROOT
fi
}
init() {
if [ ! -d $BIN_PATH ]
then
mkdir $BIN_PATH
fi
if [ ! -f $BIN ]
then
cd $BIN_PATH
download
fi
}
run() {
$BIN "${@:1}"
}
build() {
run build
}
no_absolute_url() {
sed -i 's/https:\/\/hostea.org//g' $(find public -type f | grep html)
}
clean() {
rm -rf $BIN_PATH || true
rm -rf $DIST || true
echo "[*] Workspace cleaned"
}
# $1: branch name
# $2: directory containing build assets
# $3: Author in <author-name author@example.com> format
deploy() {
cd $PROJECT_ROOT
original_branch=$(git branch --show-current)
tmp_dir=$(mktemp -d)
cp -r $2/* $tmp_dir
if [[ -z $(git ls-remote --heads origin ${1}) ]]
then
echo "[*] Creating deployment branch $1"
git checkout --orphan $1
else
echo "[*] Deployment branch $1 exists, pulling changes from remote"
git fetch origin $1
git switch $1
fi
git rm -rf .
/bin/rm -rf *
cp -r $tmp_dir/* .
git add --all
if [ $(git status --porcelain | xargs | sed '/^$/d' | wc -l) -gt 0 ];
then
echo "[*] Repository has changed, committing changes"
git commit \
--author="$3" \
--message="new deploy: $(date --iso-8601=seconds)"
fi
git checkout $original_branch
}
check_arg $1
download
if match_arg $1 'i' 'install'
then
init
elif match_arg $1 'c' 'clean'
then
clean
elif match_arg $1 'd' 'deploy'
then
check_arg $2
check_arg $3
check_arg $4
deploy $2 $3 $4
elif match_arg $1 'b' 'build'
then
build
elif match_arg $1 'h' 'help'
then
help
elif match_arg $1 'u' 'url'
then
no_absolute_url
elif match_arg $1 'z' 'zola'
then
$BIN "${@:3}"
else
echo "Error: $1 is not an option"
help
exit 1
fi
exit 0

1
search_index.en.js Normal file

File diff suppressed because one or more lines are too long

12
sitemap.xml Normal file
View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://docs.librepages.org/</loc>
</url>
<url>
<loc>https://docs.librepages.org/forms/</loc>
</url>
<url>
<loc>https://docs.librepages.org/forms/add/</loc>
</url>
</urlset>

View File

@ -1 +0,0 @@
&nbsp;<a class="anchor" href="#{{ id }}">&#xE732;</a>

View File

@ -1,187 +0,0 @@
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="{{ get_url(path="main.css") | safe }}">
{% if config.extra.favicon -%}
{% set _favicon = config.extra.favicon -%}
{% if (_favicon is starting_with("http")) == false -%}
{% set _favicon = get_url(path=config.extra.favicon) -%}
{% endif -%}
<link rel="icon" href="{{ _favicon | safe }}">
{% endif -%}
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<title>{% block title %}{{ config.title }}{% endblock title %}</title>
<!-- Matomo -->
<script>
var _paq = window._paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(["setDocumentTitle", document.domain + "/" + document.title]);
_paq.push(["setCookieDomain", "*.docs.librepages.org"]);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="//matomo.librepages.org/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '5']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<noscript><p><img src="//matomo.librepages.org/matomo.php?idsite=5&amp;rec=1" style="border:0;" alt="" /></p></noscript>
<!-- End Matomo Code -->
</head>
<body>
{% if config.extra.release -%}
<script>
fetch('{{ config.extra.release | safe }}')
.then((response) => {
return response.json();
})
.then((data) => {
let release_name = data.name;
let html_url = data.html_url;
release.innerHTML = `<a href='${html_url}'>${release_name}</a>`;
});
</script>
{% endif -%}
<main>
{# Create variable to allow appending index.html at end of links if set in config #}
{% if not config.extra.easydocs_uglyurls or config.mode == "serve" or config.mode == "Serve" -%}
{% set _ugly_url = "" -%}
{% else %}
{% set _ugly_url = "index.html" -%}
{% endif -%}
{%- block nav -%}
<nav>
{% if config.extra.logo -%}
{% set _logo = config.extra.logo -%}
{% if (_logo is starting_with("http")) == false -%}
{% set _logo = get_url(path=config.extra.logo) -%}
{% endif -%}
{% if current_path == "/" and not config.extra.easydocs_logo_always_clickable -%}
<img src="{{ _logo | safe }}" alt="logo"/>
{% else -%}
<a href="{{ config.base_url }}{{ _ugly_url }}">
<img src="{{ _logo | safe }}" alt="logo"/>
</a>
{% endif -%}
{% else -%}
<h1><a href="{{ config.base_url }}{{ _ugly_url }}">{{ config.title }}</a></h1>
{% endif -%}
{% if config.extra.release -%}
<div id="release"></div>
{% endif -%}
<a href="javascript:void(0);" onclick="burger()" id="mobile" class="ms-Icon--GlobalNavButton"></a>
<div id="trees">
{% set section_ = get_section(path="_index.md") -%}
{% for p in section_.subsections -%}
{% set subsection = get_section(path=p) -%}
<input class="tree-toggle" type="checkbox" id="{{ subsection.title | slugify }}"
{% if current_path is starting_with(subsection.path) %}checked{% endif %}/>
<label class="tree-toggle-label"
for="{{ subsection.title | slugify }}">{{ subsection.title }}</label>
<ul class="subtree">
{% for page in subsection.pages -%}
<li {% if current_path == page.path %}class="active"{% endif %}>
<a href="{{ page.permalink | safe }}{{ _ugly_url }}">{{ page.title }}</a>
</li>
{% if page.toc -%}
{% if current_path == page.path -%}
{# Count number of headers on page #}
{% set_global header_count = 0 -%}
{% for h2 in page.toc -%}
{% set_global header_count = header_count + 1 -%}
{% for h3 in h2.children -%}
{% set_global header_count = header_count + 1 -%}
{% for h4 in h3.children -%}
{% set_global header_count = header_count + 1 -%}
{% endfor -%}
{% endfor -%}
{% endfor -%}
{# Output headers if above threshold #}
{% if not config.extra.easydocs_heading_threshold -%}
{# Undefined or 0 unable to find a way to differnciate between 0 and undefined.
1 is already including any headings so is not 0 not needed #}
{% set _threshold = 5 -%}
{% else %}
{% set _threshold = config.extra.easydocs_heading_threshold -%}
{% endif -%}
{% if header_count >= _threshold -%}
<ul id="toc">
{% for h2 in page.toc -%}
<li><a href="
{{ h2.permalink | safe }}">{{ h2.title }}</a>
{% if h2.children -%}
<ul>
{% for h3 in h2.children -%}
<li>
<a href="{{ h3.permalink | safe }}">{{ h3.title }}</a>
</li>
{% endfor -%}
</ul>
{% endif -%}
</li>
{% endfor -%}
</ul>
{% endif -%}
{% endif -%}
{% endif -%}
{% endfor -%}
</ul>
{% endfor -%}
</div>
</nav>
{% endblock nav -%}
<article>
{% if config.build_search_index -%}
<div id="on_right">
<span id="search-ico" class="ms-Icon--Search"></span>
</div>
<div class="search-container">
<input id="search" type="search" placeholder="Search as you type...">
<div class="search-results">
<div class="search-results__header"></div>
<ul class="search-results__items"></ul>
</div>
</div>
{% endif -%}
<div id="wrap">
{% block content -%}
{%- if section.word_count > 0 -%}
{{ section.content |safe }}
{%- else -%}
{%- include "sec_toc_2_level.html" -%}
{% endif -%}
{% endblock content %}
</div>
</article>
</main>
{% if config.build_search_index %}
<script type="text/javascript" src="{{ get_url(path="elasticlunr.min.js") | safe }}" defer></script>
<script type="text/javascript" src="{{ get_url(path="search_index.en.js") | safe }}" defer></script>
<script type="text/javascript" src="{{ get_url(path="js.js") | safe }}" defer></script>
{% endif -%}
</body>
</html>

View File

@ -1,5 +0,0 @@
{% extends "index.html" %}
{% block title %} {{ config.title }} | {{ page.title }} {% endblock title %}
{% block content %}
{{ page.content | safe }}
{% endblock content %}

View File

@ -1,20 +0,0 @@
<h2>Table of Contents</h2>
{% if section.subsections -%}
<ul>
{% for subsec in section.subsections -%}
{% set sec_ = get_section(path=subsec) -%}
<li>
<a href="{{ sec_.permalink | safe }}{{ _ugly_url }}">{{ sec_.title }}</a>
{% if sec_.pages -%}
<ul>
{% for page_ in sec_.pages -%}
<li><a href="{{ page_.permalink | safe }}{{ _ugly_url }}">{{ page_.title }}</a></li>
{% endfor %}
</ul>
{% endif -%}
</li>
{% endfor %}
</ul>
{% else -%}
<h3> No Sections Found </h3>
{% endif -%}

View File

@ -1,35 +0,0 @@
{% extends "index.html" %}
{% block title %} {{ config.title }} | {{ section.title }} {% endblock title %}
{% block content %}
{% if section.word_count > 0 -%}
{{ section.content | safe }}
{% else -%}
<h2 class="title"> {{ section.title }} </h2>
{% if section.subsections -%}
<h3>Subsections:</h3>
<ul>
{% for subsec in section.subsections -%}
{% set sec_ = get_section(path=subsec) -%}
<li><a href="{{ sec_.permalink | safe }}{{ _ugly_url }}">{{ sec_.title }}</a></li>
{% endfor %}
</ul>
{% endif -%}
<h3>Pages:</h3>
<ul>
{% if section.pages -%}
{% for page in section.pages -%}
<li><a href="{{ page.permalink | safe }}{{ _ugly_url }}">{{ page.title }}</a></li>
{% endfor -%}
{% else -%}
<li>No pages</li>
{% endif %}
</ul>
{% endif -%}
{% endblock content %}

View File

@ -1,10 +0,0 @@
name = "EasyDocs"
description = "An easy way to create docs for your project"
license = "MIT"
homepage = "https://github.com/codeandmedia/zola_easydocs_theme"
min_version = "0.13.0"
demo = "https://easydocs.codeandmedia.com"
[author]
name = "Roman Soldatenkov"
homepage = "https://codeandmedia.com"