Webring
Do you remember webrings? It seemed like every Geocities page had one, back in the day. If you want that same kind of shared navigation between comics, comic_git supports it.
A comic_git webring is driven by a JSON file that lists all the comics in the ring. Each comic_git site fetches that same JSON file, figures out where its own comic is in the list, and then renders either:
Previous / Home / Next navigation
a full list of all webring members




How it works
Setting up your webring in comic_git is really simple, and only requires two steps.
Upload webring.json
Upload a webring.json file to somewhere out on the publicly accessible internet. It could be Dropbox link, a file on another website, or even hosted from your own comic_git site. But it should be an absolute URL, meaning it should start with https://.
This gives not only you but every website on that webring access to the same webring data.
The format for this file is in the JSON File section below.
Update your comic_info.ini
Update your comic_info.ini file per the Config Options section below.
JSON File
The JSON file contains the information needed for each site on the webring to build its own webring layout, all using the same data. Its structure matters, so follow the schema below. Also, all URLs in the JSON file should be absolute URLs, meaning they should start with https://.
Top-level fields
Comic dictionary
Example Payload
Config Options
Example
Local Development
If you want to test a webring locally before you have a real hosted endpoint ready, comic_git supports a special local-development mode.
Set:
When Endpoint = local, comic_git reads this file directly from your host repo at:
This mode exists only to make local development easier. Even in local mode, the url and image values inside webring.json should still be absolute URLs.
Customizing the look with CSS
If you want to change how your webring looks without changing its HTML layout, you can target the CSS classes used by the default webring.tpl template.
The webring uses one of two layouts:
a Previous / Home / Next layout
a full members list layout when
Show all members = True
The HTML structure looks like this:
CSS classes used by the default webring
.webring
The outer <nav> element for the entire webring. This is the easiest place to set margins, borders, padding, background colors, or overall layout rules.
.webring-header
The <h2> element used for the optional webring heading when the JSON payload defines label.
.webring-members
The container used when Show all members = True.
.webring-member
The wrapper for each member inside the full members list.
.webring-links
The container used for the Previous / Home / Next layout.
.webring-prev
The visual area for the previous comic link.
.webring-home
The visual area for the optional webring home link. This class appears in both layouts.
.webring-next
The visual area for the next comic link.
.webring-label
The text-label rows underneath the link images in the Previous / Home / Next layout, and the home label in the full members layout.
.webring-link
The <a> element used for all webring links. Use this to control link color, hover styles, underlines, and other anchor styling.
.webring-img
The <img> element used when a webring entry provides an image. Use this to control image size, borders, spacing, or hover effects.
Customizing the layout with a Theme
If CSS is not enough, you can replace the default webring template completely.
To do that, create your own Theme and add a custom webring.tpl file in that Theme's templates folder. comic_git will use your themed template instead of the default one in comic_git_engine.
See Themes for the full process for overriding template files.
If you want to edit webring.tpl, the most important Jinja variables are:
enable_webringwebring_labelwebring_homeshow_all_memberswebring_memberswebring_prevwebring_next
For the current Jinja values available to templates, see Template and Hook Data.
When changing the template, keep in mind:
webring_membersis only used whenShow all members = Truewebring_prevandwebring_nextare only used whenShow all members = Falsewebring_homemay be missing entirelya member may have an
image, or may only have a textname
Troubleshooting
The webring does not appear at all
Check these first:
is
Enable webring = Trueis
Endpointdefineddoes the build log show a webring-related error
The build says it could not load the webring data
Check that:
the endpoint URL is correct and publicly accessible
if you are using
Endpoint = local,your_content/webring.jsonexists in the host repothe JSON file is valid JSON
The build says Webring ID is missing
Webring ID is required whenever the webring feature is enabled.
The build says it could not find your Webring ID
Make sure your configured Webring ID exactly matches one member id in the JSON file.
Matching is exact, including capitalization and punctuation.
Exclude own comic from members does not seem to work
That option relies on Webring ID. If your Webring ID does not exactly match your member entry's id, comic_git will not know which member is your own comic.
Previous and Next are not the sites you expected
Previous and Next follow the order of entries in the members list.
The list wraps around from first to last and from last to first.
Last updated