all repos — eureka @ 20c9d6b8bd6c58ca485fdec784338e38b94b7a65

static site generator based on the 100r.co engine

more liberal use of macros for better customizability
Iris Lightshard nilix@nilfm.cc
PGP Signature
-----BEGIN PGP SIGNATURE-----

iQJDBAABCAAtFiEEkFh6dA+k/6CXFXU4O3+8IhROY5gFAmFd/lkPHG5pbGl4QG5p
bGZtLmNjAAoJEDt/vCIUTmOY4pYQAIHNp9PzbgP7UyNeEapCObYbu4IiKdft96s5
yKTdcgQq9w6rln+xGGTXv5oQCjiYR2fjYm1zBe47HNtrwS7t+0+pGBTXHqxqwOV+
KszHN7T2yPMhKOglMYeMsCXbaJ45ZKq2+ugmlY3WyCwjlxwm0aXikGJLycwLNkds
fUxyeNp8Tj5kOhq5BRQGJKVzk/sJnN3VhRaMQFAIY5mUSc9MQd8NSgdDWFkrrV/D
k4dZ/Wz5Evf7IfjUVURbU+jpQggjOlHQIJQBU456CV/hLSfRhhoqelUcfsGgWTdq
zgEtMS3y27AmgGzdOprTiS52heZ+mMjweHzEjpQ/lBS8F+rGuFgEH42FmJaC66f6
NYQVlsEjz7W/aXuNE/FiPrCpgVD45lhUqtXYuZtJ7ihs0wA8m7nbtFoRaI+YbVmp
biPEZolwT8lT/sD70dB12idgUwIHpwsGPGpMvZT88lEHWnHqru73wcO5GkNV5eAO
m11bMJB06XUl150oFqHogzA/jbS5l80ZQvpxyJ1TEjh2342e9ivGOGwJ4MqMrtek
9S76GazykDWDcHPZagXBGmf1ukgGODtsdW0Hf+sWVC3DO+Y2wXHj1LU23Kf0vpGb
Aphs1sl7qHphij+JGZboEeT5BqE2xCGTkN5ySrS+RMsVNA3dBZrpeN2eSxhvXSaC
tbR2lYSy
=wGzT
-----END PGP SIGNATURE-----
commit

20c9d6b8bd6c58ca485fdec784338e38b94b7a65

parent

acc2de6dd7915528926fcce093957cebda9a106b

1 files changed, 20 insertions(+), 32 deletions(-)

jump to
M main.cmain.c

@@ -19,11 +19,25 @@ /* clang-format off */

#define NAME "nilFM" #define DOMAIN "https://nilfm.cc" +#define DESC "lair of drkste aka nilix: programmer, artist, philosopher" #define ABOUT "Derek Stevens &lt;"\ "<a href='mailto://nilix@nilfm.cc'>nilix@nilfm.cc</a>&gt;<br/>"\ "artist, programmer, philosopher<br/><br/>"\ "verify my signature: <a href='/serv/signingKey.pub'>signing public key</a><br/>"\ "send me an encrypted message: <a href='/serv/encryptionKey.pub'>encryption public key</a>" +#define CONTACT "contact: <a href='mailto://nilix@nilfm.cc'>nilix@nilfm.cc</a> (<a href='keys.html'>keys</a>)<br/>" +#define FOOTER1 "<a href='/git/'><img width='24' height='24' "\ + "src='/img/git.svg' alt='visit the nilFM hack lab'/></a>&nbsp;"\ + "<a rel='me' href='https://fosstodon.org/@nilix'><img width='24' "\ + "height='24' "\ + "src='/img/mastodon.svg' alt='visit me on Mastodon'/></a>&nbsp;"\ + "<a href='https://vimeo.com/rexnillith'><img width='24' height='24' "\ + "src='/img/vimeo.svg' alt='visit me on Vimeo'/></a>&nbsp;" +#define FOOTER2 "<a href='https://webring.xxiivv.com'><img width='24' height='24' "\ + "src='/img/webring.svg' alt='visit the Webring'/></a><br/>"\ + "<a rel='license' "\ + "href='https://creativecommons.org/licenses/by-nc/4.0/"\ + "legalcode.txt'>CC-BY-NC 4</a>" #define SITEROOT "../www/" #define MAINCSS "/new.css" #define FRONTCSS "/front.css"

@@ -331,35 +345,10 @@ return 0;

fputs("<footer>", f); if (!ismetanav(name)) { fpedited(f, path); - fputs("contact: <a href='mailto://nilix@nilfm.cc'>nilix@nilfm.cc</a> ", f); - fputs("(<a href='keys.html'>keys</a>)<br/>", f); + fputs(CONTACT, f); } - fputs( - "<a href='" DOMAIN "/git/'><img width='24' height='24' " - "src='/img/git.svg' alt='visit the nilFM hack lab'/></a>&nbsp;", - f); - fputs( - "<a rel=\"me\" href=\"https://fosstodon.org/@nilix\"><img width='24' " - "height='24' " - "src='/img/mastodon.svg' alt='visit me on Mastodon'/></a>&nbsp;", - f); - fputs( - "<a href='https://vimeo.com/rexnillith'><img width='24' height='24' " - "src='/img/vimeo.svg' alt='visit me on Vimeo'/></a>&nbsp;", - f); - fputs( - "<a href='https://webring.xxiivv.com'><img width='24' height='24' " - "src='/img/webring.svg' alt='visit the Webring'/></a><br/>", - f); - /*fputs( - "<a href='https://lieu.cblgh.org'><img width='24' height='24' " - "src='/img/lieu.svg' alt='search the webring'/></a><br/>", - f);*/ - fputs( - "<a rel='license' " - "href='https://creativecommons.org/licenses/by-nc/4.0/" - "legalcode.txt'>CC-BY-NC 4</a>", - f); + fputs(FOOTER1, f); + fputs(FOOTER2, f); fputs("</footer>", f); return 1; }

@@ -375,7 +364,7 @@ f,

"<meta charset='utf-8'>" "<meta name='description' content='%s'/>" "<meta name='viewport' content='width=device-width,initial-scale=1'>", - "lair of drkste aka nilix: programmer, artist, philosopher"); + DESC); if (ismetanav(name)) { fputs("<link rel='stylesheet' type='text/css' href='" FRONTCSS "'>", f); } else {

@@ -391,9 +380,9 @@ fputs("<body>", f);

/* header */ fputs("<header>", f); if (ismetanav(name)) { - fputs("<h1>nilFM</h1>", f); + fputs("<h1>" NAME "</h1>", f); } else { - fputs("<h1><a href='/'>nilFM</a></h1>", f); + fputs("<h1><a href='/'>" NAME "</a></h1>", f); } fputs("</header>", f);

@@ -409,7 +398,6 @@ fputs("</nav>", f);

/* main */ if (!ismetanav(name)) { fputs("<main>\n\n", f); - fputs("<!-- Generated file, do not edit -->\n\n", f); fprintf(f, "<h2>%s</h2>", name); if (!fpinject(f, l, srcpath)) printf(">>> Building failed: %s\n", name);