Where root-desc and repo.desc are used in the header region, also
emit their html counterparts afterwards if they are defined.
Where root-desc are repo.desc are used outside the header,
eg in the repo list, leave it as it is without adding any
related html.
Signed-off-by: Andy Green
---
ui-shar
These are optional, default-empty raw html strings that
are emitted after the corresponding text-only versions
root-desc and repo.desc when they are used in the header
area.
This provides a flexible way to place buttons or links
in the header region for both the repo index page and
for repos indiv
This adds a small css class and a function in ui-shared that
emits canned javascript to interpret the # part of the URL
on the client, and apply a highlight to filtered source.
Unlike blame highlight boxes which use generated divs, this
applied a computed absolute, transparent highlight over the
a
This allows it to work on /blame/ URLs.
Blame has an extra layer of parent elements which
has to be taken into account by the JS when finding
the highlight width, hence the 1 arg to the emit
function.
Signed-off-by: Andy Green
---
ui-blame.c |1 +
1 file changed, 1 insertion(+)
diff --git
This allows it to work in /tree/ and /source/ URLs.
Signed-off-by: Andy Green
---
ui-tree.c |2 ++
1 file changed, 2 insertions(+)
diff --git a/ui-tree.c b/ui-tree.c
index e4cb558..b66cabe 100644
--- a/ui-tree.c
+++ b/ui-tree.c
@@ -226,6 +226,8 @@ static void print_object(const struct objec
noheader=1 stops the static page header from being emitted by
cgit, but along with that, the small form that lets the user
change branch context on the page is also lost.
This isn't actually static since it contains a dynamic list of
branches; it can't be reproduced on the user's external header
s
On 06/20/2018 06:13 PM, Andy Green wrote:
diff --git a/ui-tree.c b/ui-tree.c
index 6ffd4dd..2e94755 100644
--- a/ui-tree.c
+++ b/ui-tree.c
@@ -102,16 +102,23 @@ static void print_buffer(const char *basename, char *buf,
unsigned long size)
}
static void render_buffer(struct cgit_filter
This changes the render filter exec part to provide a second
and third argument, which are used by md2html to fix up the url
path for "plain" for the repo, eg, "/cgit/plain/" and
"?h=mybranch", as required by the modifications to md2html in
the previous patches.
The combination means cgit becomes
Extend md2html with an optional third argument for URL postfix, like
"?h=mybranch"
Signed-off-by: Andy Green
---
filters/html-converters/md2html | 19 +--
1 file changed, 13 insertions(+), 6 deletions(-)
diff --git a/filters/html-converters/md2html b/filters/html-converters/m
md2html gets pygments to define the css for "highlight", making display
of the blame view fragile against pygments version. On Fedora 28 /
python3-pygments-2.2.0-10.fc28.noarch, "highlight" gets redefined so
it no longer displays at the top of its parent.
This patch changes the css class name use
This allows the user to choose to override any global
inline-readme list for a specific repo, using the
same kind of semantics as the other repo overrides.
Signed-off-by: Andy Green
Reviewed-by: John Keeping
---
cgit.c |7 ++-
cgit.h |1 +
cgitrc.5.txt | 10 ++
From: John Keeping
This allows applying filters to files in the repository, for example to
render Markdown or AsciiDoc as HTML.
Signed-off-by: John Keeping
---
cgit.css |5 +++
cmd.c |4 +-
ui-tree.c | 104 +
ui-tree.h |
8 lines of code are duplicated in repolink, clean it
so the common code appears once
Signed-off-by: Andy Green
Reviewed-by: John Keeping
---
ui-shared.c | 26 ++
1 file changed, 10 insertions(+), 16 deletions(-)
diff --git a/ui-shared.c b/ui-shared.c
index d2985c8..21
From: John Keeping
This remaps the "src" attribute on elements according to a second
command line argument, you can try it out with:
md2html
---
filters/html-converters/md2html | 50 ++-
1 file changed, 49 insertions(+), 1 deletion(-)
diff --git
We are going to have to produce plain links in the next patch.
But depending on config, the links are not simple.
Reproduce the logic in repolink() to generate correctly-
formatted links in a strbuf, without urlencoding, in a reusable
helper cgit_repo_create_url().
Signed-off-by: Andy Green
---
From: John Keeping
Signed-off-by: John Keeping
---
ui-tree.c | 25 +++--
1 file changed, 15 insertions(+), 10 deletions(-)
diff --git a/ui-tree.c b/ui-tree.c
index e6b3074..d26e35e 100644
--- a/ui-tree.c
+++ b/ui-tree.c
@@ -84,6 +84,20 @@ static void print_binary_buffer(c
Arrange that walk_tree_ctx is available in ls_tail, we
will make use of it shortly.
Signed-off-by: Andy Green
Reviewed-by: John Keeping
---
ui-tree.c |6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/ui-tree.c b/ui-tree.c
index 721c812..1ccbb22 100644
--- a/ui-tree.c
While listing the items in tree view, if we spot a filename
matching any inline-readme entries from the config file,
we stash the first one into walk_tree_context.
After the tree view has been shown, if there is a stashed
inline-readme we render it inline.
Signed-off-by: Andy Green
Reviewed-by:
Allows the user to specify a list of filenames that should be
rendered inline with tree view, if present in the directory.
Signed-off-by: Andy Green
---
cgit.c |5 -
cgit.h |1 +
cgitrc.5.txt | 10 ++
3 files changed, 15 insertions(+), 1 deletion(-)
diff --git
From: John Keeping
Render filters will be used to present rendered content in the tree
view, for example to display Markdown source rendered as HTML.
We will add support for using these from the tree view in the following
commits.
AG: adapted so render.= can be used to specify the filter for fi
From: John Keeping
We are about to introduce rendering of content for the tree view. This
source page will allow bypassing the renderer and accessing the content
of the current tree view.
Signed-off-by: John Keeping
---
cmd.c |6 ++
ui-shared.c | 14 ++
ui-shared.h
You maybe didn't know you had OCD until you saw an
alpha sorted list that has stuff out of order in it.
Signed-off-by: Andy Green
Reviewed-by: John Keeping
---
cgitrc.5.txt | 176 +-
1 file changed, 88 insertions(+), 88 deletions(-)
diff
From: John Keeping
There's no need to do this manually with the string list API will do it
for us.
Signed-off-by: John Keeping
---
cgit.c |4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/cgit.c b/cgit.c
index 223dfc8..0c9f3e9 100644
--- a/cgit.c
+++ b/cgit.c
@@ -23,7
The following series adds config to allow rendering of
selected READMEs inline after the tree view, where
present in the directory being viewed.
Particularly you can use completely relative markdown to
inline pictures served from the current repo rev context,
eg,
![overview](./doc-assets/overview
Hi -
It's convenient to be able to provide a URL that points to a specific
line in tree view. cgit provides links on the line numbers it produces
to facilitate that, eg
https://libwebsockets.org/git/libwebsockets/tree/minimal-examples/ws-server/minimal-ws-server-echo/minimal-ws-server-echo.c
Hi -
I want to put a repo-specific link to my project mailing list in the
header area.
But there doesn't seem to be a way to do it.
noheader=1 also removes functionality for branch switching UI, which is
not desirable.
There's a "homepage" link concept but a) that's positioned in the wrong
John Keeping on Wed, 2018/06/20 08:44:
> On Wed, Jun 20, 2018 at 08:01:11AM +0200, Christian Hesse wrote:
> > John Keeping on Sat, 2018/06/16 16:46:
> > > -- >8 --
> > > Subject: [PATCH] cache: close race window when unlocking slots
> >
> > You should add a "From:" line for easy git-am.
On Wed, Jun 20, 2018 at 08:01:11AM +0200, Christian Hesse wrote:
> John Keeping on Sat, 2018/06/16 16:46:
> > -- >8 --
> > Subject: [PATCH] cache: close race window when unlocking slots
>
> You should add a "From:" line for easy git-am. ;)
"git am --scissors" will pick it up from the message h
28 matches
Mail list logo