diff options
context:
space:
mode:
authorBryce Kwon <bryce@brycekwon.com>
committerBryce Kwon <bryce@brycekwon.com>
commit
parent
tree
download
Remove the repository homepage feature
-rw-r--r--assets/cgit.css14
-rw-r--r--cgitrc.5.txt9
-rw-r--r--custom/cgitrc3
-rw-r--r--source/cgit.c4
-rw-r--r--source/cgit.h1
-rw-r--r--source/cmd.c2
-rw-r--r--source/scan-tree.c2
-rw-r--r--source/shared.c1
-rw-r--r--source/ui-shared.c5
9 files changed, 3 insertions, 38 deletions
diff --git a/assets/cgit.css b/assets/cgit.css
index 6bef114..3161102 100644
--- a/assets/cgit.css
+++ b/assets/cgit.css
@@ -355,20 +355,6 @@ div#cgit .tabs a.active {
background-color: var(--tab-active-bg);
}
-/* Outbound marker on tabs that leave the site. */
-div#cgit .tabs a.external:after {
- content: "";
- display: inline-block;
- width: 0.7em;
- height: 0.7em;
- margin-left: 5px;
- vertical-align: -0.02em;
- background-color: currentColor;
- opacity: 0.6;
- -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M14 5h5v5M19 5l-8 8M19 14v4a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1h4' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
- mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M14 5h5v5M19 5l-8 8M19 14v4a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1h4' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
-}
-
div#cgit .tabs .search {
padding-bottom: 2px;
white-space: nowrap;
diff --git a/cgitrc.5.txt b/cgitrc.5.txt
index d066dcc..4040617 100644
--- a/cgitrc.5.txt
+++ b/cgitrc.5.txt
@@ -185,9 +185,9 @@ enable-git-config::
Flag which, when set to "1", will allow cgit to use git config to set
any repo specific settings. This option is used in conjunction with
"scan-path", and must be defined prior, to augment repo-specific
- settings. The keys gitweb.owner, gitweb.category, gitweb.description,
- and gitweb.homepage will map to the cgit keys repo.owner, repo.section,
- repo.desc, and repo.homepage respectively. All git config keys that begin
+ settings. The keys gitweb.owner, gitweb.category, and
+ gitweb.description will map to the cgit keys repo.owner, repo.section,
+ and repo.desc respectively. All git config keys that begin
with "cgit." will be mapped to the corresponding "repo." key in cgit.
Default value: "0". See also: scan-path, section-from-path.
@@ -600,9 +600,6 @@ repo.hide::
index. The repository can still be accessed by providing a direct path.
Default value: "0". See also: "repo.ignore".
-repo.homepage::
- The value to show as repository homepage. Default value: none.
-
repo.ignore::
Flag which, when set to "1", ignores the repository. The repository
is not shown in the index and cannot be accessed by providing a direct
diff --git a/custom/cgitrc b/custom/cgitrc
index d456301..4b0b4ac 100644
--- a/custom/cgitrc
+++ b/custom/cgitrc
@@ -451,9 +451,6 @@ noplainemail=0
# Repository owner identifier. Value is any text. Default is none.
#repo.owner=Jane Doe
-# Repository homepage value. Value is a url or text. Default is none.
-#repo.homepage=https://example.com/
-
# Urls used to clone this repo. Value is space-separated urls that may use
# macros. Default is none.
#repo.clone-url=https://example.com/example.git git://example.com/example.git
diff --git a/source/cgit.c b/source/cgit.c
index 5c11a93..53a33ca 100644
--- a/source/cgit.c
+++ b/source/cgit.c
@@ -240,8 +240,6 @@ static void print_repo(FILE *f, struct cgit_repo *repo)
fprintf(f, "repo.module-link=%s\n", repo->module_link);
if (repo->section)
fprintf(f, "repo.section=%s\n", repo->section);
- if (repo->homepage)
- fprintf(f, "repo.homepage=%s\n", repo->homepage);
if (repo->clone_url)
fprintf(f, "repo.clone-url=%s\n", repo->clone_url);
fprintf(f, "repo.enable-blame=%d\n", repo->enable_blame);
@@ -1101,8 +1099,6 @@ void cgit_repo_config(struct cgit_repo *repo, const char *name, const char *valu
repo->desc = cgit_strdup_first_line(value);
else if (!strcmp(name, "owner"))
repo->owner = cgit_strdup_first_line(value);
- else if (!strcmp(name, "homepage"))
- repo->homepage = cgit_strdup_first_line(value);
else if (!strcmp(name, "defbranch"))
repo->defbranch = cgit_strdup_first_line(value);
else if (!strcmp(name, "extra-head-content"))
diff --git a/source/cgit.h b/source/cgit.h
index eadb680..ed966ae 100644
--- a/source/cgit.h
+++ b/source/cgit.h
@@ -74,7 +74,6 @@ struct cgit_repo {
char *desc;
char *extra_head_content;
char *owner;
- char *homepage;
char *defbranch;
char *module_link;
struct string_list readme;
diff --git a/source/cmd.c b/source/cmd.c
index 456a937..97ffc78 100644
--- a/source/cmd.c
+++ b/source/cmd.c
@@ -56,8 +56,6 @@ static void about_fn(void)
free(redirect);
} else if (ctx.repo->readme.nr) {
cgit_print_repo_readme(ctx.qry.path);
- } else if (ctx.repo->homepage) {
- cgit_redirect(ctx.repo->homepage, false);
} else {
currenturl = cgit_currenturl();
redirect = cgit_fmtalloc("%s../", currenturl);
diff --git a/source/scan-tree.c b/source/scan-tree.c
index 4a1444f..3528d43 100644
--- a/source/scan-tree.c
+++ b/source/scan-tree.c
@@ -60,8 +60,6 @@ static int apply_gitconfig(const char *key, const char *value,
cgit_repo_config(current_repo, "desc", value);
else if (!strcmp(key, "gitweb.category"))
cgit_repo_config(current_repo, "section", value);
- else if (!strcmp(key, "gitweb.homepage"))
- cgit_repo_config(current_repo, "homepage", value);
else if (skip_prefix(key, "cgit.", &name))
cgit_repo_config(current_repo, name, value);
diff --git a/source/shared.c b/source/shared.c
index e6dd011..d5ff7c4 100644
--- a/source/shared.c
+++ b/source/shared.c
@@ -213,7 +213,6 @@ struct cgit_repo *cgit_add_repo(const char *url)
repo->desc = cgit_default_repo_desc;
repo->extra_head_content = NULL;
repo->owner = NULL;
- repo->homepage = NULL;
repo->section = ctx.cfg.section;
repo->snapshots = ctx.cfg.snapshots;
repo->enable_blame = ctx.cfg.enable_blame;
diff --git a/source/ui-shared.c b/source/ui-shared.c
index 938f292..a1538f8 100644
--- a/source/ui-shared.c
+++ b/source/ui-shared.c
@@ -524,11 +524,6 @@ static void print_repo_tabs(void)
ctx.qry.head, ctx.qry.vpath);
html("</li>\n");
}
- if (ctx.repo->homepage) {
- html("<li><a class='external' href='");
- html_attr(ctx.repo->homepage);
- html("'>homepage</a></li>\n");
- }
html("</ul>\n");
}