diff --git a/.github/workflows/publish-site.yml b/.github/workflows/publish-site.yml
index 40907d4..6d3a8bf 100644
--- a/.github/workflows/publish-site.yml
+++ b/.github/workflows/publish-site.yml
@@ -26,7 +26,9 @@ jobs:
python-version: '3.11'
- name: Install CuteKit
- run: pip install git+https://github.com/cute-engineering/cutekit.git@0.7.4
+ run: |
+ pip install git+https://github.com/cute-engineering/cutekit.git@0.7.4
+ pip install -r meta/plugins/requirements.txt
- name: Setup Pages
id: pages
@@ -34,7 +36,6 @@ jobs:
- name: Build with cat
run: |
- pip install -r meta/plugins/requirements.txt
python -m cutekit cat build
- name: Upload artifact
diff --git a/.gitignore b/.gitignore
index 2b6d32c..7c30db7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
.cutekit
.mypy_cache
+__pycache__
diff --git a/meta/plugins/__init__.py b/meta/plugins/__init__.py
index 84e9744..b01c31d 100644
--- a/meta/plugins/__init__.py
+++ b/meta/plugins/__init__.py
@@ -1,4 +1,6 @@
-from cutekit import cli, const, shell
+from cutekit import ensure
+
+ensure((0, 7, 0))
import http.server
import os
@@ -7,7 +9,7 @@
import dataclasses as dt
from dataclasses_json import DataClassJsonMixin
-from cutekit import const, shell, jexpr
+from cutekit import cli, const, shell, jexpr
CAT = "ᓚ₍ ^. .^₎"
DEFAULT_STYLE_PATH = __file__.replace("__init__.py", "default.css")
@@ -127,7 +129,7 @@ def renderAll(self, out: str):
@cli.command(None, "cat", "Tiny site generator")
def _():
- print(CAT)
+ pass
@cli.command("b", "cat/build", "Build the site")
@@ -137,11 +139,15 @@ def _() -> None:
site = Site.load()
site.renderAll(SITE_BUILD_DIR)
+ print(f"{CAT} Site built at {SITE_BUILD_DIR}")
+
@cli.command("c", "cat/clean", "Clean the site")
def _():
shell.rmrf(SITE_BUILD_DIR)
+ print(f"{CAT} Site cleaned")
+
@cli.command("s", "cat/serve", "Serve the site")
def _():
@@ -151,6 +157,8 @@ def _():
site.renderAll(SITE_BUILD_DIR)
os.chdir(SITE_BUILD_DIR)
+
+ print(f"{CAT} Serving site")
shell.exec("python3", "-m", "http.server")
@@ -163,7 +171,7 @@ def _():
{
"favicon": "🐱",
"title": "Cat",
- "header": "ᓚ₍ ^. .^₎",
+ "header": "ᓚ₍ ^. .^₎",
"navbar": "[Home](/)",
"footer": "Built with [ᓚ₍ ^. .^₎](https://github.com/cute-engineering/cat)"
}
@@ -176,3 +184,5 @@ def _():
This is the home page of the site. You can edit this file to change the content of the home page.
""",
)
+
+ print(f"{CAT} Site initialized at {SITE_DIR}")
diff --git a/meta/plugins/__pycache__/__init__.cpython-311.pyc b/meta/plugins/__pycache__/__init__.cpython-311.pyc
deleted file mode 100644
index a8ea2a3..0000000
Binary files a/meta/plugins/__pycache__/__init__.cpython-311.pyc and /dev/null differ
diff --git a/meta/plugins/__pycache__/cat.cpython-311.pyc b/meta/plugins/__pycache__/cat.cpython-311.pyc
deleted file mode 100644
index 2be224e..0000000
Binary files a/meta/plugins/__pycache__/cat.cpython-311.pyc and /dev/null differ