feat: Make my blog much prettier
This commit is contained in:
@@ -1,9 +1,12 @@
|
||||
{
|
||||
lib, stdenv
|
||||
, gnumake, imagemagick
|
||||
, shared-assets
|
||||
}:
|
||||
stdenv.mkDerivation {
|
||||
, python3
|
||||
, shared-assets # For makesite.py
|
||||
, tailwindWithTypography
|
||||
}: let
|
||||
pythonEnv = python3.withPackages (ps: with ps; [markdown pygments]);
|
||||
in stdenv.mkDerivation {
|
||||
pname = "blog";
|
||||
version = "20231507";
|
||||
|
||||
@@ -12,12 +15,15 @@ stdenv.mkDerivation {
|
||||
buildInputs = [ shared-assets gnumake imagemagick ];
|
||||
|
||||
patchPhase = ''
|
||||
sed -i Makefile -e "s|python ../shared-assets/makesite.py|python ${shared-assets}/bin/makesite.py|g"
|
||||
sed -i Makefile -e "s|python ../shared-assets/makesite.py|${pythonEnv}/bin/python ${shared-assets}/bin/makesite.py|g"
|
||||
sed -i Makefile -e "s|tar -czf blog.tar.gz _site||g"
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
make buildnosign
|
||||
|
||||
# Generate Tailwind CSS data
|
||||
${tailwindWithTypography}/bin/tailwindcss --input ./input.css --output _site/assets/css/index.css
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
|
||||
Reference in New Issue
Block a user