all repos — eureka @ 3d8711dc38f0fff0c2292b346d2f590c45f82a0b

static site generator based on the 100r.co engine

use LOGO and update video player template
Iris Lightshard nilix@nilfm.cc
commit

3d8711dc38f0fff0c2292b346d2f590c45f82a0b

parent

77b6102e84ecbf1bf06e6f04b784b9a9539dc4e7

2 files changed, 8 insertions(+), 5 deletions(-)

jump to
M README.mdREADME.md

@@ -57,6 +57,9 @@

// shorthand for an audio player {_/path/to/media} +// shorthand for a video player +{]id|/path/to/video|/path/to/thumbnail|fallback alt text for thumbnail image if HTML5 video is not supported} + // shorthand for paragraphs, can embed other markup inside it {&paragraph text {with a link} {@and some bold text}}

@@ -113,7 +116,7 @@ - **LEXICON_SIZE**: max size of the `Lexicon`, corresponds to the number of pages `eureka` can keep track of

- **TAG\_BODY\_SIZE**: max size for an individual markup body (ie, a markup token as above, minus the curly brackets and the rune), in bytes - **NAME**: the title of the site - **DOMAIN**: currently unused - - **LOGO**: currently unused + - **LOGO**: HTML to put in the header h1 verbatim - **ABOUT**: HTML content for the front page, placed between `<header>` and `<nav>` - **CONTACT**: the contact info line at the bottom of every page (except the front page, where it would typically already be in **@ABOUT** - **FOOTER**: arbitrary footer HTML
M main.cmain.c

@@ -293,7 +293,7 @@ "<video id='%s' src='%s' controls preload='metadata' poster='%s'>\n",

id, href, thumb); - fprintf(f, "<a href='%s'>%s</a>\n", href, alt); + fprintf(f, "<a href='%s'><img src='%s' alt=''%s'></a>\n", href, thumb, alt); fprintf(f, "</video>\n"); return 1; }

@@ -590,9 +590,9 @@ fputs("<body>\n", f);

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

@@ -690,7 +690,7 @@ * TAG_BODY_SIZE */

fprintf(siteMap, "<ul>\n"); while (i < n) { char filepath[64], filename[64]; - if (d[i]->d_name[0] != '.') { + if (d[i]->d_name[0] != '.' && !scmp(d[i]->d_name, "meta.nav.htm")) { scpy(d[i]->d_name, filepath, 64); fprintf( siteMap,