Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
108 commits
Select commit Hold shift + click to select a range
bb9aecc
unify indenting
hoijui Jul 1, 2019
c18d8fa
white-space adjustments for easier reading
hoijui Jul 1, 2019
cd4254b
echo error to stderr
hoijui Jul 1, 2019
90e6103
only init if not yet initialized
hoijui Jul 1, 2019
8aa76ad
add help output
hoijui Jul 1, 2019
6ff4936
rename help -> print_help
hoijui Jul 2, 2019
2ec9dc9
if the output folder is contained within the source folder, exclude it
hoijui Jul 2, 2019
337ce8d
use busybox for http hosting, as it usually comes pre-installed
hoijui Jul 2, 2019
c9394ed
check if the required dependencies are available
hoijui Jul 2, 2019
c5ad6e7
remove generated output from version control
hoijui Jul 2, 2019
c0067c4
sample index: add required metadata `title`
hoijui Jul 2, 2019
5cbb9ea
docs: reformat Markdown
hoijui Jul 2, 2019
555d05a
docs - installing: add bin dir to `PATH`
hoijui Jul 2, 2019
f89d48d
rename variables and functions from "twowords" to "two_words"
hoijui Jul 2, 2019
1e2b3b8
move two functions up one level
hoijui Jul 2, 2019
3fd074c
distribute some long lines over multiple lines
hoijui Jul 2, 2019
22429a3
exit if any command fails
hoijui Jul 2, 2019
bb814ab
make config-var fetching more modular and verbose on failure
hoijui Jul 2, 2019
7f6c859
rewording printout [minor]
hoijui Jul 2, 2019
0ab4591
move navigation creation into a separate function
hoijui Jul 2, 2019
4b6d989
re-implement the navi generator [fix]
hoijui Jul 2, 2019
112fe25
reformat dependency documentataion
hoijui Jul 2, 2019
7ff9fbb
un-ignore file that is never generated
hoijui Jul 2, 2019
4b9939e
add simple Travis-CI test build
hoijui Jul 2, 2019
5f7059a
exit on error in the whole script
hoijui Jul 3, 2019
e9e6236
make BusyBox optional for command `serve` aswell
hoijui Jul 3, 2019
6dcbe41
check if site has an index.html at the root
hoijui Jul 3, 2019
f2fe05a
choose an arbitrary HTML file as web-site start path
hoijui Jul 3, 2019
91112db
create build dir before `readlink` is called on it [fix]
hoijui Jul 3, 2019
74b328d
do not immediately exit on missing dependencies [fix]
hoijui Jul 4, 2019
ac039ba
mark some variables as `local` [fix]
hoijui Jul 4, 2019
f2bc0cb
create the whole output folder path [fix]
hoijui Jul 4, 2019
8d5264e
also work if the script is started through PATH [fix]
hoijui Jul 4, 2019
5de36a6
allow for the site to be not at the URL root [fix] [major]
hoijui Jul 4, 2019
fb28a2b
move `find` invocations into functions
hoijui Jul 11, 2019
48ad1da
use more quoted strings (prevents problems with spaces in paths)
hoijui Jul 11, 2019
7d8de76
Support arbitrary chars in paths [fixes #2]
hoijui Jul 11, 2019
67a2be5
add new command-line switch: -h|--help|help [fixes #1]
hoijui Jul 11, 2019
28f9d3e
format command case statement nicer [minor]
hoijui Sep 4, 2019
377c06d
Print much more status output
hoijui Sep 4, 2019
84fffe6
exclude special repo files as sources (README.md, LICENSE.md, ...)
hoijui Sep 4, 2019
c1e589f
hide some ugly output
hoijui Sep 4, 2019
9a7d9cf
allow configuration through command line switches [major]
hoijui Sep 4, 2019
2661ba7
cleanup [minor]
hoijui Sep 4, 2019
1036e58
fail faster (now also on unset variables and more)
hoijui Sep 4, 2019
ca992db
fail-nicer if no command given [fix]
hoijui Sep 7, 2019
a792332
simplify_path calls can not deal with {} [fix]
hoijui Sep 12, 2019
59a6bcb
do not fail on omitted cmd-line arguments [fix]
hoijui Sep 12, 2019
30b5f8a
remove possible quotes from YAML values [fix]
hoijui Sep 12, 2019
c592f7b
cut off "title: " part from name again [fix]
hoijui Sep 12, 2019
631743e
simplify_path: use all arguments as input
hoijui Sep 12, 2019
e592807
simplify_path: cut off initial './' as well
hoijui Sep 12, 2019
6c25887
add filters submodule and add link prefix '../'
hoijui Sep 13, 2019
bc5d9fa
better "--help" switch [fix]
hoijui Sep 13, 2019
625f3d4
introduce `install_path`
hoijui Sep 13, 2019
75a4d4e
document "--local" switch
hoijui Sep 13, 2019
24a0aad
correct error handling [fix]
hoijui Sep 13, 2019
30ccd82
introduce "--version" switch
hoijui Sep 13, 2019
682c4de
CI: install panflute [fix]
hoijui Sep 13, 2019
426957e
CI: install panflute with `--user`
hoijui Sep 14, 2019
d11078a
CI: install BeautifulSoup (bs4)
hoijui Sep 14, 2019
08f16fc
export `simplify_path` before first use [fix]
hoijui Jan 23, 2020
7ef9646
make output folder dirs when copy in non-written-content files [fix]
hoijui Jan 25, 2020
06124c8
do not generate local YAML for out_exclude content [fix]
hoijui Jan 25, 2020
6796293
Updating filters
hoijui Feb 1, 2020
5ac63d7
CI: switch to python 3
hoijui Feb 1, 2020
306cea6
CI: install python 3 setuptools [fix]
hoijui Feb 1, 2020
bacce59
CI: install requirement [fix]
hoijui Feb 1, 2020
b1718d0
CI: Make Python 3 the default, so pandoc will use it [fix]
hoijui Feb 1, 2020
bddf4c3
CI: remove deprecated `sudo: false` [fix]
hoijui Feb 1, 2020
646e84a
CI: change `python` sym.-link with `sudo` [fix]
hoijui Feb 1, 2020
e607f75
use `while read` instead of `-execdir`, for more control/easy debugging
hoijui Feb 20, 2020
7be8d88
add `allp_file` argument to `add_local_link_prefix` filter call [fix]
hoijui Feb 20, 2020
3641c59
Update filters (many fixes and small improvements)
hoijui Feb 20, 2020
d3856e7
CI: show Python (3) version
hoijui Feb 20, 2020
1ff0916
CI: set `language: python` (default is ruby)
hoijui Feb 20, 2020
2410c64
CI: adjust to `language: python` [fix]
hoijui Feb 20, 2020
30b10d8
Update filters (allp: do not prefix `file_name`) [fix]
hoijui Feb 20, 2020
629f702
replace '.md' with '.html' link prefixes [fix]
hoijui Feb 20, 2020
94d7ee8
def. HTML template: Fixes white space
hoijui Aug 20, 2020
2e7a039
def. HTML template: Adds a space between title and version [fix]
hoijui Aug 20, 2020
7e6290b
README: Initial commit
hoijui Aug 20, 2020
1474c66
Lots of cleanup, supporting paths with spaces as well now [fix]
hoijui Dec 3, 2020
cf5d1fe
template.html: body no indent -> correct code blocks formatting [fix]
hoijui Nov 2, 2021
6bd9558
Support sites without an empty base dir [fix]
hoijui Nov 2, 2021
7fdb8df
Separates decl. from assignment for sub-shell inited vars
hoijui Nov 2, 2021
5139c22
Uses BASH var replacement instead of sed
hoijui Nov 2, 2021
12b18d9
Correct link_prefix for local/non-local [fix]
hoijui Nov 2, 2021
b6f0d12
Correct a comment [minor]
hoijui Nov 2, 2021
cc9c037
Makes site_base_path relative -> works on- and offline
hoijui Nov 2, 2021
02e4fc2
README: Streamlined and added MoVeDo reference
hoijui Apr 12, 2022
6ca9f3a
Handle quoted titles from MD FrontMatter [fix]
hoijui Apr 12, 2022
2ea2166
Make REUSE compliant (SPDX licensing)
hoijui Apr 12, 2022
c43a698
README: Adds license and REUSE badges
hoijui Apr 12, 2022
509c45e
Effectless syntax improvement [minor]
hoijui May 9, 2022
3aaa065
Updates filters [fix]
hoijui May 9, 2022
e2fcb8b
Put subtitle below title (in h2)
hoijui May 12, 2022
9224a47
README: Wraps long line [minor]
hoijui May 13, 2022
3fca93e
pandoc: Use "-F panflute" vs "--filter" -> much faster
hoijui Apr 7, 2023
6c0e310
Do not warn about missing deps if not required
hoijui Nov 16, 2024
52e9a27
Break long help-message line [minor]
hoijui Jan 27, 2026
77e0adb
Remove unused function
hoijui Jan 27, 2026
eb61094
Rename relpath to rel_path
hoijui Jan 29, 2026
28c274f
Correctly handle rel. paths without a `./` prefix [fix]
hoijui Jan 29, 2026
f6653a3
Introduce --debug (Do not remove *.tmp files)
hoijui Jan 29, 2026
460cfac
Introduce `--input-index`, allowing to specify a list of input MD files
hoijui Jan 29, 2026
bc005ce
Make more use of the `--debug` mode
hoijui Jan 29, 2026
d7b8e78
Make yet again more use of the `--debug` mode
hoijui Jan 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
test-filetree
# SPDX-FileCopyrightText: 2019-2022 Robin Vobruba <hoijui.quaero@gmail.com>
#
# SPDX-License-Identifier: Unlicense

.html/
7 changes: 7 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# SPDX-FileCopyrightText: 2019-2022 Robin Vobruba <hoijui.quaero@gmail.com>
#
# SPDX-License-Identifier: Unlicense

[submodule "filters"]
path = filters
url = https://github.com/movedo/movedo-filters.git
7 changes: 7 additions & 0 deletions .pdsite.yml.default
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
# pdsite configuration

# SPDX-FileCopyrightText: 2016 Gord Stephen <gord@gordstephen.ca>
# SPDX-FileCopyrightText: 2019 Robin Vobruba <hoijui.quaero@gmail.com>
#
# SPDX-License-Identifier: Unlicense

theme: default
inputextension: .md
outputfolder: .html

# Site-wide template variables

sitename: "My pdsite"
site-url: "https://myuser.gitlab.io"
site-base-path: /myproject
pagetitle-suffix: ""
footer: "My pdsite footer"
21 changes: 21 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# SPDX-FileCopyrightText: 2019-2022 Robin Vobruba <hoijui.quaero@gmail.com>
#
# SPDX-License-Identifier: Unlicense

language: python

addons:
apt:
packages:
- pandoc
- python3-setuptools
- texlive-latex-base

before_script:
- python --version
- pip install -r requirements.txt

script:
- cd docs
- ../bin/pdsite build

11 changes: 11 additions & 0 deletions LICENSES/BSD-3-Clause.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Copyright (c) <year> <owner>.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
121 changes: 121 additions & 0 deletions LICENSES/CC0-1.0.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
Creative Commons Legal Code

CC0 1.0 Universal

CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
HEREUNDER.

Statement of Purpose

The laws of most jurisdictions throughout the world automatically confer
exclusive Copyright and Related Rights (defined below) upon the creator
and subsequent owner(s) (each and all, an "owner") of an original work of
authorship and/or a database (each, a "Work").

Certain owners wish to permanently relinquish those rights to a Work for
the purpose of contributing to a commons of creative, cultural and
scientific works ("Commons") that the public can reliably and without fear
of later claims of infringement build upon, modify, incorporate in other
works, reuse and redistribute as freely as possible in any form whatsoever
and for any purposes, including without limitation commercial purposes.
These owners may contribute to the Commons to promote the ideal of a free
culture and the further production of creative, cultural and scientific
works, or to gain reputation or greater distribution for their Work in
part through the use and efforts of others.

For these and/or other purposes and motivations, and without any
expectation of additional consideration or compensation, the person
associating CC0 with a Work (the "Affirmer"), to the extent that he or she
is an owner of Copyright and Related Rights in the Work, voluntarily
elects to apply CC0 to the Work and publicly distribute the Work under its
terms, with knowledge of his or her Copyright and Related Rights in the
Work and the meaning and intended legal effect of CC0 on those rights.

1. Copyright and Related Rights. A Work made available under CC0 may be
protected by copyright and related or neighboring rights ("Copyright and
Related Rights"). Copyright and Related Rights include, but are not
limited to, the following:

i. the right to reproduce, adapt, distribute, perform, display,
communicate, and translate a Work;
ii. moral rights retained by the original author(s) and/or performer(s);
iii. publicity and privacy rights pertaining to a person's image or
likeness depicted in a Work;
iv. rights protecting against unfair competition in regards to a Work,
subject to the limitations in paragraph 4(a), below;
v. rights protecting the extraction, dissemination, use and reuse of data
in a Work;
vi. database rights (such as those arising under Directive 96/9/EC of the
European Parliament and of the Council of 11 March 1996 on the legal
protection of databases, and under any national implementation
thereof, including any amended or successor version of such
directive); and
vii. other similar, equivalent or corresponding rights throughout the
world based on applicable law or treaty, and any national
implementations thereof.

2. Waiver. To the greatest extent permitted by, but not in contravention
of, applicable law, Affirmer hereby overtly, fully, permanently,
irrevocably and unconditionally waives, abandons, and surrenders all of
Affirmer's Copyright and Related Rights and associated claims and causes
of action, whether now known or unknown (including existing as well as
future claims and causes of action), in the Work (i) in all territories
worldwide, (ii) for the maximum duration provided by applicable law or
treaty (including future time extensions), (iii) in any current or future
medium and for any number of copies, and (iv) for any purpose whatsoever,
including without limitation commercial, advertising or promotional
purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
member of the public at large and to the detriment of Affirmer's heirs and
successors, fully intending that such Waiver shall not be subject to
revocation, rescission, cancellation, termination, or any other legal or
equitable action to disrupt the quiet enjoyment of the Work by the public
as contemplated by Affirmer's express Statement of Purpose.

3. Public License Fallback. Should any part of the Waiver for any reason
be judged legally invalid or ineffective under applicable law, then the
Waiver shall be preserved to the maximum extent permitted taking into
account Affirmer's express Statement of Purpose. In addition, to the
extent the Waiver is so judged Affirmer hereby grants to each affected
person a royalty-free, non transferable, non sublicensable, non exclusive,
irrevocable and unconditional license to exercise Affirmer's Copyright and
Related Rights in the Work (i) in all territories worldwide, (ii) for the
maximum duration provided by applicable law or treaty (including future
time extensions), (iii) in any current or future medium and for any number
of copies, and (iv) for any purpose whatsoever, including without
limitation commercial, advertising or promotional purposes (the
"License"). The License shall be deemed effective as of the date CC0 was
applied by Affirmer to the Work. Should any part of the License for any
reason be judged legally invalid or ineffective under applicable law, such
partial invalidity or ineffectiveness shall not invalidate the remainder
of the License, and in such case Affirmer hereby affirms that he or she
will not (i) exercise any of his or her remaining Copyright and Related
Rights in the Work or (ii) assert any associated claims and causes of
action with respect to the Work, in either case contrary to Affirmer's
express Statement of Purpose.

4. Limitations and Disclaimers.

a. No trademark or patent rights held by Affirmer are waived, abandoned,
surrendered, licensed or otherwise affected by this document.
b. Affirmer offers the Work as-is and makes no representations or
warranties of any kind concerning the Work, express, implied,
statutory or otherwise, including without limitation warranties of
title, merchantability, fitness for a particular purpose, non
infringement, or the absence of latent or other defects, accuracy, or
the present or absence of errors, whether or not discoverable, all to
the greatest extent permissible under applicable law.
c. Affirmer disclaims responsibility for clearing rights of other persons
that may apply to the Work or any use thereof, including without
limitation any person's Copyright and Related Rights in the Work.
Further, Affirmer disclaims responsibility for obtaining any necessary
consents, permissions or other rights required for any use of the
Work.
d. Affirmer understands and acknowledges that Creative Commons is not a
party to this document and has no duty or obligation with respect to
this CC0 or use of the Work.
10 changes: 10 additions & 0 deletions LICENSES/Unlicense.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
This is free and unencumbered software released into the public domain.

Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.

In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law.

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 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.

For more information, please refer to <http://unlicense.org/>
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<!--
SPDX-FileCopyrightText: 2020-2022 Robin Vobruba <hoijui.quaero@gmail.com>

SPDX-License-Identifier: CC0-1.0
-->

# pdsite

![](https://api.travis-ci.org/hoijui/pdsite.svg?branch=master)
[![License: BSD-3-Clause](
https://img.shields.io/badge/License-BSD%203%20Clause-blue.svg)](
https://opensource.org/licenses/BSD-3-Clause)
[![REUSE status](
https://api.reuse.software/badge/github.com/hoijui/pdsite)](
https://api.reuse.software/info/github.com/hoijui/pdsite)

`pdsite` is short for "**p**an**d**oc**site**".

It is a simplistic, single shell script, **static site generator** (SSG).

It is written in the [BASH](https://www.gnu.org/software/bash/) scripting language,
uses the [pandoc](https://pandoc.org/) document converter
and requires [Markdown](https://en.wikipedia.org/wiki/Markdown#Example) files
as sources.

While it can be used stand-alone,
it is also used by default by the [MoVeDo](https://github.com/movedo/MoVeDo)
documentation build system.
Loading