From 40d23848d816816b3db3e7296e8a28f964b53786 Mon Sep 17 00:00:00 2001 From: David Luevano Alvarado Date: Wed, 7 Dec 2022 03:31:51 -0600 Subject: refactor code, fix config checker and new files for pyssg.xyz --- pyssg.xyz/.rsyncignore | 10 +++++++ pyssg.xyz/bs | 10 +++++++ pyssg.xyz/config.yaml | 25 +++++++++++------- pyssg.xyz/dst/subdir/test2.html | 19 -------------- pyssg.xyz/dst/test.html | 19 -------------- pyssg.xyz/live/pyssg.xyz/index.html | 22 ++++++++++++++++ pyssg.xyz/live/pyssg.xyz/rss.xml | 42 ++++++++++++++++++++++++++++++ pyssg.xyz/live/pyssg.xyz/sitemap.xml | 18 +++++++++++++ pyssg.xyz/live/pyssg.xyz/subdir/test2.html | 19 ++++++++++++++ pyssg.xyz/live/pyssg.xyz/test.html | 19 ++++++++++++++ pyssg.xyz/pyssg_alias.sh | 5 ---- pyssg.xyz/src/pyssg.xyz/subdir/test2.md | 6 +++++ pyssg.xyz/src/pyssg.xyz/test.md | 6 +++++ pyssg.xyz/src/subdir/test2.md | 6 ----- pyssg.xyz/src/test.md | 6 ----- 15 files changed, 167 insertions(+), 65 deletions(-) create mode 100644 pyssg.xyz/.rsyncignore create mode 100755 pyssg.xyz/bs delete mode 100644 pyssg.xyz/dst/subdir/test2.html delete mode 100644 pyssg.xyz/dst/test.html create mode 100644 pyssg.xyz/live/pyssg.xyz/index.html create mode 100644 pyssg.xyz/live/pyssg.xyz/rss.xml create mode 100644 pyssg.xyz/live/pyssg.xyz/sitemap.xml create mode 100644 pyssg.xyz/live/pyssg.xyz/subdir/test2.html create mode 100644 pyssg.xyz/live/pyssg.xyz/test.html delete mode 100755 pyssg.xyz/pyssg_alias.sh create mode 100644 pyssg.xyz/src/pyssg.xyz/subdir/test2.md create mode 100644 pyssg.xyz/src/pyssg.xyz/test.md delete mode 100644 pyssg.xyz/src/subdir/test2.md delete mode 100644 pyssg.xyz/src/test.md (limited to 'pyssg.xyz') diff --git a/pyssg.xyz/.rsyncignore b/pyssg.xyz/.rsyncignore new file mode 100644 index 0000000..0a0d740 --- /dev/null +++ b/pyssg.xyz/.rsyncignore @@ -0,0 +1,10 @@ +# List of directories and files to ignore +# Git specific +.gitignore +README.md +LICENSE +.git/ + +# Rsync specific +.rsyncignore +.venv/ \ No newline at end of file diff --git a/pyssg.xyz/bs b/pyssg.xyz/bs new file mode 100755 index 0000000..1b863dc --- /dev/null +++ b/pyssg.xyz/bs @@ -0,0 +1,10 @@ +#!/bin/sh +# bs = build and sync, to pyssg.xyz + +PYSSG_XYZ_DIR=$HOME/pyssg/pyssg.xyz + +pyssg --config $PYSSG_XYZ_DIR/config.yaml -b --debug + +exit 0 +echo "rsync: pushing (U) local (pyssg.xyz) to webserver (luevano.xyz). (pyssg.xyz)" +rsync -rtuvPL --delete-after --exclude-from=$PYSSG_XYZ_DIR/.rsyncignore $PYSSG_XYZ_DIR/live/ luevanor:/var/www/pyssg.xyz/ \ No newline at end of file diff --git a/pyssg.xyz/config.yaml b/pyssg.xyz/config.yaml index 976ab4f..71e8a1c 100644 --- a/pyssg.xyz/config.yaml +++ b/pyssg.xyz/config.yaml @@ -4,8 +4,8 @@ define: &root_path "$HOME/pyssg/pyssg.xyz/" title: "pyssg" path: - src: !join [*root_path, "src"] - dst: !join [*root_path, "dst"] + src: !join [*root_path, "src/pyssg.xyz"] + dst: !join [*root_path, "live/pyssg.xyz"] plt: !join [*root_path, "plt"] db: !join [*root_path, "db.psv"] url: @@ -18,13 +18,18 @@ fmt: list_sep_date: "%B %Y" dirs: /: - plt: "page.html" - tags: False - index: False - rss: False - sitemap: False - exclude_dirs: [] + cfg: + plt: "page.html" + tags: False + index: False + rss: False + sitemap: False + exclude_dirs: [] articles: - plt: "page.html" - tags: True + cfg: + plt: "page.html" + tags: True + index: False + rss: False + sitemap: False ... \ No newline at end of file diff --git a/pyssg.xyz/dst/subdir/test2.html b/pyssg.xyz/dst/subdir/test2.html deleted file mode 100644 index 1f0082f..0000000 --- a/pyssg.xyz/dst/subdir/test2.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - Test file in subdir -- pyssg - - -

Test file in subdir

-

By David Luevano

-

Created: Mon, Dec 05, 2022 @ 10:58 UTC

-

Modified:

- -

This is a small test for the newly added pyssg.xyz.

- -

Tags: -

- - diff --git a/pyssg.xyz/dst/test.html b/pyssg.xyz/dst/test.html deleted file mode 100644 index 0ce6abd..0000000 --- a/pyssg.xyz/dst/test.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - Index -- pyssg - - -

Index

-

By David Luevano

-

Created: Mon, Dec 05, 2022 @ 08:05 UTC

-

Modified:

- -

This is a small test for the newly added pyssg.xyz.

- -

Tags: -

- - diff --git a/pyssg.xyz/live/pyssg.xyz/index.html b/pyssg.xyz/live/pyssg.xyz/index.html new file mode 100644 index 0000000..723cbd1 --- /dev/null +++ b/pyssg.xyz/live/pyssg.xyz/index.html @@ -0,0 +1,22 @@ + + + + + + Index -- pyssg + + +

Index -- pyssg

+

Some text here.

+ +

Tags: +

+ +

Articles

+ + + \ No newline at end of file diff --git a/pyssg.xyz/live/pyssg.xyz/rss.xml b/pyssg.xyz/live/pyssg.xyz/rss.xml new file mode 100644 index 0000000..c6eac30 --- /dev/null +++ b/pyssg.xyz/live/pyssg.xyz/rss.xml @@ -0,0 +1,42 @@ + + + + pyssg + https://pyssg.xyz + + Short site description. + en-us + Blog + Copyright 2021 Somebody + some@one.com (Sombody) + some@one.com (Sombody) + + + pyssg v0.7.3 + https://validator.w3.org/feed/docs/rss2.html + 30 + + https://static.pyssg.xyz/images/blog.png + pyssg + https://pyssg.xyz + + + Test file in subdir + https://pyssg.xyz/subdir/test2.html + https://pyssg.xyz/subdir/test2.html + Mon, 05 Dec 2022 10:58:41 GMT + Second file for testing. + This is a small test for the newly added pyssg.xyz.

]]>
+
+ + Index + https://pyssg.xyz/test.html + https://pyssg.xyz/test.html + Mon, 05 Dec 2022 08:05:10 GMT + Index page for pyssg.xyz. + This is a small test for the newly added pyssg.xyz.

]]>
+
+
+
\ No newline at end of file diff --git a/pyssg.xyz/live/pyssg.xyz/sitemap.xml b/pyssg.xyz/live/pyssg.xyz/sitemap.xml new file mode 100644 index 0000000..63949aa --- /dev/null +++ b/pyssg.xyz/live/pyssg.xyz/sitemap.xml @@ -0,0 +1,18 @@ + + + + https://pyssg.xyz/subdir/test2.html + 2022-12-05 + weekly + 1.0 + + + https://pyssg.xyz/test.html + 2022-12-05 + weekly + 1.0 + + + \ No newline at end of file diff --git a/pyssg.xyz/live/pyssg.xyz/subdir/test2.html b/pyssg.xyz/live/pyssg.xyz/subdir/test2.html new file mode 100644 index 0000000..1f0082f --- /dev/null +++ b/pyssg.xyz/live/pyssg.xyz/subdir/test2.html @@ -0,0 +1,19 @@ + + + + + + Test file in subdir -- pyssg + + +

Test file in subdir

+

By David Luevano

+

Created: Mon, Dec 05, 2022 @ 10:58 UTC

+

Modified:

+ +

This is a small test for the newly added pyssg.xyz.

+ +

Tags: +

+ + diff --git a/pyssg.xyz/live/pyssg.xyz/test.html b/pyssg.xyz/live/pyssg.xyz/test.html new file mode 100644 index 0000000..0ce6abd --- /dev/null +++ b/pyssg.xyz/live/pyssg.xyz/test.html @@ -0,0 +1,19 @@ + + + + + + Index -- pyssg + + +

Index

+

By David Luevano

+

Created: Mon, Dec 05, 2022 @ 08:05 UTC

+

Modified:

+ +

This is a small test for the newly added pyssg.xyz.

+ +

Tags: +

+ + diff --git a/pyssg.xyz/pyssg_alias.sh b/pyssg.xyz/pyssg_alias.sh deleted file mode 100755 index 087f6cc..0000000 --- a/pyssg.xyz/pyssg_alias.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -PYSSG_XYZ_DIR=$HOME/pyssg/pyssg.xyz - -alias p='pyssg --config $PYSSG_XYZ_DIR/config.yaml' diff --git a/pyssg.xyz/src/pyssg.xyz/subdir/test2.md b/pyssg.xyz/src/pyssg.xyz/subdir/test2.md new file mode 100644 index 0000000..1919587 --- /dev/null +++ b/pyssg.xyz/src/pyssg.xyz/subdir/test2.md @@ -0,0 +1,6 @@ +title: Test file in subdir +author: David Luevano +lang: en +summary: Second file for testing. + +This is a small test for the newly added pyssg.xyz. \ No newline at end of file diff --git a/pyssg.xyz/src/pyssg.xyz/test.md b/pyssg.xyz/src/pyssg.xyz/test.md new file mode 100644 index 0000000..8ff6cea --- /dev/null +++ b/pyssg.xyz/src/pyssg.xyz/test.md @@ -0,0 +1,6 @@ +title: Index +author: David Luevano +lang: en +summary: Index page for pyssg.xyz. + +This is a small test for the newly added pyssg.xyz. \ No newline at end of file diff --git a/pyssg.xyz/src/subdir/test2.md b/pyssg.xyz/src/subdir/test2.md deleted file mode 100644 index 1919587..0000000 --- a/pyssg.xyz/src/subdir/test2.md +++ /dev/null @@ -1,6 +0,0 @@ -title: Test file in subdir -author: David Luevano -lang: en -summary: Second file for testing. - -This is a small test for the newly added pyssg.xyz. \ No newline at end of file diff --git a/pyssg.xyz/src/test.md b/pyssg.xyz/src/test.md deleted file mode 100644 index 8ff6cea..0000000 --- a/pyssg.xyz/src/test.md +++ /dev/null @@ -1,6 +0,0 @@ -title: Index -author: David Luevano -lang: en -summary: Index page for pyssg.xyz. - -This is a small test for the newly added pyssg.xyz. \ No newline at end of file -- cgit v1.2.3-70-g09d2