diff --git a/ci/generate-docs.py b/ci/generate-docs.py index f10ce8e48..9f0c6ee94 100644 --- a/ci/generate-docs.py +++ b/ci/generate-docs.py @@ -47,12 +47,14 @@ class Gen(object): for page in children: idx.write(f" - [{page.title}]({page.title}.md)\n") + def image_dimensions(filename): out = subprocess.check_output(["identify", filename]) fields = out.split() - while fields[0] != b'PNG': + while fields[0] != b"PNG": fields = fields[1:] - return [int(x) for x in fields[1].split(b'x')] + return [int(x) for x in fields[1].split(b"x")] + class GenColorScheme(object): def __init__(self, title, dirname, index=None): @@ -78,16 +80,20 @@ class GenColorScheme(object): img = os.path.basename(img) title = os.path.basename(img).rsplit(".", 1)[0] idx.write(f"# {title}\n") - idx.write(f"\"{title}\"\n\n") + idx.write( + f'{title}\n\n' + ) idx.write("To use this scheme, add this to your config:\n") - idx.write(f""" + idx.write( + f""" ```lua return {{ color_scheme = "{title}", }} ``` -""") +""" + ) index_filename = f"{self.dirname}/index.md" index_page = Page(self.title, index_filename, children=children) @@ -99,6 +105,7 @@ return {{ upper = page.title.upper() idx.write(f" - [{upper}]({page.title}/index.md)\n") + TOC = [ Page( "wezterm", diff --git a/docs/config/appearance.markdown b/docs/config/appearance.markdown index d7af52675..99cb7c2b4 100644 --- a/docs/config/appearance.markdown +++ b/docs/config/appearance.markdown @@ -10,7 +10,8 @@ return { } ``` -You can find a list of available color schemes in [The Color Schemes Section](../colorschemes/index.md). +You can find a list of available color schemes and screenshots +in [The Color Schemes Section](../colorschemes/index.md). The `color_scheme` option takes precedence over the `colors` section below.