summaryrefslogtreecommitdiff
path: root/pyssg.xyz
diff options
context:
space:
mode:
authorDavid Luevano Alvarado <david@luevano.xyz>2022-12-07 03:31:51 -0600
committerDavid Luevano Alvarado <david@luevano.xyz>2022-12-07 03:31:51 -0600
commit40d23848d816816b3db3e7296e8a28f964b53786 (patch)
treed3f27d599b4087d91f76fef62b7449f5cf6be2f6 /pyssg.xyz
parent0b8441c79b047f81526bbb83febc40d7530e35d6 (diff)
refactor code, fix config checker and new files for pyssg.xyz
Diffstat (limited to 'pyssg.xyz')
-rw-r--r--pyssg.xyz/.rsyncignore10
-rwxr-xr-xpyssg.xyz/bs10
-rw-r--r--pyssg.xyz/config.yaml25
-rw-r--r--pyssg.xyz/live/pyssg.xyz/index.html22
-rw-r--r--pyssg.xyz/live/pyssg.xyz/rss.xml42
-rw-r--r--pyssg.xyz/live/pyssg.xyz/sitemap.xml18
-rw-r--r--pyssg.xyz/live/pyssg.xyz/subdir/test2.html (renamed from pyssg.xyz/dst/subdir/test2.html)0
-rw-r--r--pyssg.xyz/live/pyssg.xyz/test.html (renamed from pyssg.xyz/dst/test.html)0
-rwxr-xr-xpyssg.xyz/pyssg_alias.sh5
-rw-r--r--pyssg.xyz/src/pyssg.xyz/subdir/test2.md (renamed from pyssg.xyz/src/subdir/test2.md)0
-rw-r--r--pyssg.xyz/src/pyssg.xyz/test.md (renamed from pyssg.xyz/src/test.md)0
11 files changed, 117 insertions, 15 deletions
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/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 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <base href="https://static.pyssg.xyz">
+ <title>Index -- pyssg</title>
+ </head>
+ <body>
+ <h1>Index -- pyssg</h1>
+ <p>Some text here.</p>
+
+ <p>Tags:
+ </p>
+
+ <h2>Articles</h2>
+ <ul>
+ <h3>December 2022</h3>
+ <li>Dec 05 - <a href="https://pyssg.xyz/subdir/test2.html">Test file in subdir</a></li>
+ <li>Dec 05 - <a href="https://pyssg.xyz/test.html">Index</a></li>
+ </ul>
+ </body>
+</html> \ 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 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<rss version="2.0"
+ xmlns:atom="http://www.w3.org/2005/Atom"
+ xmlns:content="http://purl.org/rss/1.0/modules/content/">
+ <channel>
+ <title>pyssg</title>
+ <link>https://pyssg.xyz</link>
+ <atom:link href="https://pyssg.xyz/rss.xml" rel="self" type="application/rss+xml"/>
+ <description>Short site description.</description>
+ <language>en-us</language>
+ <category>Blog</category>
+ <copyright>Copyright 2021 Somebody</copyright>
+ <managingEditor>some@one.com (Sombody)</managingEditor>
+ <webMaster>some@one.com (Sombody)</webMaster>
+ <pubDate></pubDate>
+ <lastBuildDate></lastBuildDate>
+ <generator>pyssg v0.7.3</generator>
+ <docs>https://validator.w3.org/feed/docs/rss2.html</docs>
+ <ttl>30</ttl>
+ <image>
+ <url>https://static.pyssg.xyz/images/blog.png</url>
+ <title>pyssg</title>
+ <link>https://pyssg.xyz</link>
+ </image>
+ <item>
+ <title>Test file in subdir</title>
+ <link>https://pyssg.xyz/subdir/test2.html</link>
+ <guid isPermaLink="true">https://pyssg.xyz/subdir/test2.html</guid>
+ <pubDate>Mon, 05 Dec 2022 10:58:41 GMT</pubDate>
+ <description>Second file for testing.</description>
+ <content:encoded><![CDATA[<p>This is a small test for the newly added pyssg.xyz.</p>]]></content:encoded>
+ </item>
+ <item>
+ <title>Index</title>
+ <link>https://pyssg.xyz/test.html</link>
+ <guid isPermaLink="true">https://pyssg.xyz/test.html</guid>
+ <pubDate>Mon, 05 Dec 2022 08:05:10 GMT</pubDate>
+ <description>Index page for pyssg.xyz.</description>
+ <content:encoded><![CDATA[<p>This is a small test for the newly added pyssg.xyz.</p>]]></content:encoded>
+ </item>
+ </channel>
+</rss> \ 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 @@
+<?xml version="1.0" encoding="utf-8"?>
+<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
+ <url>
+ <loc>https://pyssg.xyz/subdir/test2.html</loc>
+ <lastmod>2022-12-05</lastmod>
+ <changefreq>weekly</changefreq>
+ <priority>1.0</priority>
+ </url>
+ <url>
+ <loc>https://pyssg.xyz/test.html</loc>
+ <lastmod>2022-12-05</lastmod>
+ <changefreq>weekly</changefreq>
+ <priority>1.0</priority>
+ </url>
+
+</urlset> \ No newline at end of file
diff --git a/pyssg.xyz/dst/subdir/test2.html b/pyssg.xyz/live/pyssg.xyz/subdir/test2.html
index 1f0082f..1f0082f 100644
--- a/pyssg.xyz/dst/subdir/test2.html
+++ b/pyssg.xyz/live/pyssg.xyz/subdir/test2.html
diff --git a/pyssg.xyz/dst/test.html b/pyssg.xyz/live/pyssg.xyz/test.html
index 0ce6abd..0ce6abd 100644
--- a/pyssg.xyz/dst/test.html
+++ b/pyssg.xyz/live/pyssg.xyz/test.html
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/subdir/test2.md b/pyssg.xyz/src/pyssg.xyz/subdir/test2.md
index 1919587..1919587 100644
--- a/pyssg.xyz/src/subdir/test2.md
+++ b/pyssg.xyz/src/pyssg.xyz/subdir/test2.md
diff --git a/pyssg.xyz/src/test.md b/pyssg.xyz/src/pyssg.xyz/test.md
index 8ff6cea..8ff6cea 100644
--- a/pyssg.xyz/src/test.md
+++ b/pyssg.xyz/src/pyssg.xyz/test.md