diff options
author | EuAndreh <eu@euandre.org> | 2021-08-17 17:33:43 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2021-08-17 17:35:59 -0300 |
commit | 89671533ab40a5d3ac0b8802c82ecfd8ac62c850 (patch) | |
tree | 61ba4bc04ff10bee4fc5783f6a24076314cefa45 /src/gistatic.c | |
parent | src/gistatic.c: Split alt messages of index and repository pages (diff) | |
download | gistatic-89671533ab40a5d3ac0b8802c82ecfd8ac62c850.tar.gz gistatic-89671533ab40a5d3ac0b8802c82ecfd8ac62c850.tar.xz |
src/gistatic.c: Add <meta name="description" .../> to HTML <head>
Diffstat (limited to 'src/gistatic.c')
-rw-r--r-- | src/gistatic.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/gistatic.c b/src/gistatic.c index 6dac369..a60aa81 100644 --- a/src/gistatic.c +++ b/src/gistatic.c @@ -71,6 +71,7 @@ static nl_catd catalog_descriptor = NULL; #define MSG_MISSING_ARGS 23 #define MSG_INCOMPATIBLE_OPTIONS 24 #define MSG_ERR_NONDIRECT_REF 25 +#define MSG_INDEX_DESCRIPTION 26 static const char *const MSGS[] = { "", @@ -99,6 +100,7 @@ static const char *const MSGS[] = { [MSG_MISSING_ARGS]="Missing [PATH | [PATHS]]", [MSG_INCOMPATIBLE_OPTIONS]="Incompatible options -u and -i", [MSG_ERR_NONDIRECT_REF]="Git reference is not direct", + [MSG_INDEX_DESCRIPTION]="Index of repositories", NULL }; @@ -972,7 +974,8 @@ static int index_write_header(FILE *const fd, const char *const idx_title) { "<html lang=\"%s\">\n" " <head>\n" " <meta charset=\"UTF-8\" />\n" - " <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n" + " <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n" + " <meta name=\"description\" content=\"%s\" />\n" " <link rel=\"icon\" type=\"image/svg+xml\" href=\"logo.svg\" />\n" " <link rel=\"stylesheet\" type=\"text/css\" href=\"style.css\" />\n" " <title>%s</title>\n" @@ -1004,6 +1007,7 @@ static int index_write_header(FILE *const fd, const char *const idx_title) { " </thead>\n" " <tbody>\n", _(MSG_LANG), + _(MSG_INDEX_DESCRIPTION), idx_title, _(MSG_LOGO_ALT_INDEX), idx_title, @@ -1389,7 +1393,8 @@ static int repo_write_refs( "<html lang=\"%s\">\n" " <head>\n" " <meta charset=\"UTF-8\" />\n" - " <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n" + " <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n" + " <meta name=\"description\" content=\"%s\" />\n" " <link rel=\"icon\" type=\"image/svg+xml\" href=\"logo.svg\" />\n" " <link rel=\"stylesheet\" type=\"text/css\" href=\"style.css\" />\n" " <link rel=\"alternate\" type=\"application/atom+xml\" href=\"commits.xml\" title=\"%s - %s\" hreflang=\"%s\" />\n" @@ -1455,6 +1460,7 @@ static int repo_write_refs( " </thead>\n" " <tbody>\n", _(MSG_LANG), + description, project_name, _(MSG_COMMIT_FEED), _(MSG_LANG), |