how to customise gtk-doc output

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

how to customise gtk-doc output

jcupitt
Hello everyone,

I'd like to customise the gtk-doc output for my project: I'd like a
new header, and some tracker stuff in the footer.

I see glib does this. The online docs here:

https://developer.gnome.org/gobject/unstable/

Have a new header and footer pasted into each page.

What's the best way to do this? Does everyone write a tiny program to
add these new sections, or is there something clever you can do with
xslt and the configure options to gtk-doc?

Thanks!

John
_______________________________________________
gtk-devel-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-devel-list
Reply | Threaded
Open this post in threaded view
|

Re: how to customise gtk-doc output

Sébastien Wilmet-2
Hi,

On Wed, Apr 05, 2017 at 10:24:00AM +0100, [hidden email] wrote:

> I'd like to customise the gtk-doc output for my project: I'd like a
> new header, and some tracker stuff in the footer.
>
> I see glib does this. The online docs here:
>
> https://developer.gnome.org/gobject/unstable/
>
> Have a new header and footer pasted into each page.
>
> What's the best way to do this? Does everyone write a tiny program to
> add these new sections, or is there something clever you can do with
> xslt and the configure options to gtk-doc?

I don't know how it is done on developer.gnome.org, but it should be
implemented somewhere in
https://git.gnome.org/browse/library-web/

--
Sébastien
_______________________________________________
gtk-devel-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-devel-list
Reply | Threaded
Open this post in threaded view
|

Re: how to customise gtk-doc output

jcupitt
On 12 April 2017 at 13:23, Sébastien Wilmet <[hidden email]> wrote:
> On Wed, Apr 05, 2017 at 10:24:00AM +0100, [hidden email] wrote:
>> I'd like to customise the gtk-doc output for my project: I'd like a
>> new header, and some tracker stuff in the footer.
>> xslt and the configure options to gtk-doc?
>
> I don't know how it is done on developer.gnome.org, but it should be
> implemented somewhere in
> https://git.gnome.org/browse/library-web/

Oh nice, I didn't find that, thanks! Yes, it seems they have some
fancy Python to reformat the pages.

I ended up doing something very simple. This line of Ruby:

template.at_css(".main-content").children = doc.at_css("body").children

Just takes everything inside <body> and drops it into a standard
github pages template, making (for example) this:

http://jcupitt.github.io/libvips/API/current/VipsImage.html

Reformatter here:

https://github.com/jcupitt/libvips/blob/gh-pages/gen-api.rb

John
_______________________________________________
gtk-devel-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-devel-list
Reply | Threaded
Open this post in threaded view
|

Re: how to customise gtk-doc output

Stefan Sauer-4
On 04/12/2017 03:14 PM, [hidden email] wrote:

> On 12 April 2017 at 13:23, Sébastien Wilmet <[hidden email]> wrote:
>> On Wed, Apr 05, 2017 at 10:24:00AM +0100, [hidden email] wrote:
>>> I'd like to customise the gtk-doc output for my project: I'd like a
>>> new header, and some tracker stuff in the footer.
>>> xslt and the configure options to gtk-doc?
>> I don't know how it is done on developer.gnome.org, but it should be
>> implemented somewhere in
>> https://git.gnome.org/browse/library-web/
> Oh nice, I didn't find that, thanks! Yes, it seems they have some
> fancy Python to reformat the pages.
>
> I ended up doing something very simple. This line of Ruby:
>
> template.at_css(".main-content").children = doc.at_css("body").children
>
> Just takes everything inside <body> and drops it into a standard
> github pages template, making (for example) this:
>
> http://jcupitt.github.io/libvips/API/current/VipsImage.html
>
> Reformatter here:
>
> https://github.com/jcupitt/libvips/blob/gh-pages/gen-api.rb
>
> John
> _______________________________________________
> gtk-devel-list mailing list
> [hidden email]
> https://mail.gnome.org/mailman/listinfo/gtk-devel-list

We're rewriting gtk-doc into python right now. This will also turn this
more into a toolkit/library. One of the steps is to make the
headers/footers customizable. Right now they are generated by the
docbook stylesheets and this makes it slow. Feel free to file a bug an
mention what changes you did. This will help me to design this features.

Stefan

_______________________________________________
gtk-devel-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-devel-list
Reply | Threaded
Open this post in threaded view
|

Re: how to customise gtk-doc output

jcupitt
Hi Stefan,

> headers/footers customizable. Right now they are generated by the
> docbook stylesheets and this makes it slow. Feel free to file a bug an
> mention what changes you did. This will help me to design this features.

OK, bug here:

https://bugzilla.gnome.org/show_bug.cgi?id=781291

John
_______________________________________________
gtk-devel-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-devel-list