Skip to content

Commit

Permalink
feat: ignoring non-Markdown files when walking tree
Browse files Browse the repository at this point in the history
  • Loading branch information
gvwilson committed Apr 5, 2024
1 parent bd91353 commit 7ed8fac
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 7 deletions.
20 changes: 15 additions & 5 deletions docs/colophon/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,24 +57,34 @@ <h1>Colophon</h1>
Code uses Source Code Pro and diagrams use Helvetica.</p>
</li>
<li>
<p>The colors in this theme
are lightened versions of those used in <a href="https://third-bit.com/colophon/">classic Canadian postage stamps</a>.
The art in the title is by <a href="https://art.djnavarro.net/">Danielle Navarro</a>
and used with her gracious permission.</p>
</li>
<li>
<p>The CSS files used to style code were obtained from <a href="https://numist.github.io/highlight-css/">highlight-css</a>;
legibility was checked using <a href="https://wave.webaim.org/">WebAIM WAVE</a>.</p>
</li>
<li>
<p>Diagrams were created with the desktop version of <a href="https://www.drawio.com/">draw.io</a>.</p>
</li>
<li>
<p>The site is built using <a href="https://www.dmulholl.com/docs/ark/main/">Ark</a> and hosted on <a href="https://pages.github.com/">GitHub Pages</a>.</p>
<p>The site is hosted on <a href="https://pages.github.com/">GitHub Pages</a>.</p>
</li>
<li>
<p>Traffic statistics are collected using <a href="https://plausible.io/">Plausible</a>,
which provides a lightweight ethical alternative to surveillance capitalism.</p>
</li>
<li>
<p>The colors in this theme
are lightened versions of those used in <a href="https://third-bit.com/colophon/">classic Canadian postage stamps</a>.
The art in the title is by <a href="https://art.djnavarro.net/">Danielle Navarro</a>
and used with her gracious permission.</p>
<p>Thanks to the authors of <a href="https://www.dmulholl.com/docs/ark/main/">Ark</a>,
<a href="https://pypi.org/project/beautifulsoup4/">BeautifulSoup</a>,
<a href="https://pypi.org/project/html5validator/">html5validator</a>,
<a href="https://pypi.org/project/pybtex/">pybtex</a>,
<a href="https://pypi.org/project/ruff/">ruff</a>,
and all the other software used in this project.
If we all give a little,
we all get a lot.</p>
</li>
</ul>
</main>
Expand Down
4 changes: 3 additions & 1 deletion docs/glossary/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ <h1>Glossary</h1>


<dl class="glossary">
<dt id="gl:ssg">static site generator (SSG)</dt><dd>An application that generates HTML pages from templates.</dd>
<dt id="gl:ssg">static site generator (SSG)</dt><dd>An application that generates HTML pages from <a href="#template">templates</a>.</dd>

<dt id="gl:template">template</dt><dd>Some explanation.</dd>
</dl>
</main>
<footer>
Expand Down
8 changes: 8 additions & 0 deletions docs/mccole.css
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@
--spacing-small: 0.25rem;
--spacing-medium: 0.5rem;
--spacing-large: 1rem;

/* Image properties */
--splash-width: 80%;
}

/* Flex grid */
Expand Down Expand Up @@ -180,6 +183,11 @@ html {
font-family: "Atkinson Hyperlegible", sans-serif;
}

/* Splash image */
img.splash {
width: var(--splash-width);
}

/* Appendix list */
ol.toc-appendices {
list-style-type: upper-latin;
Expand Down
9 changes: 9 additions & 0 deletions lib/mccole/bin/lint.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@
}


@ark.filters.register(ark.filters.Filter.LOAD_NODE_FILE)
def keep_file(value, path):
"""Only process .md Markdown files."""
return path.suffix == ".md"


def main():
options = parse_args()
options.config = load_config(options)
Expand Down Expand Up @@ -162,6 +168,9 @@ def collect_xref(pargs, kwargs, found):

def collect_visitor(node, parser, collected):
"""Visit each node, collecting data."""
if node.ext != "md":
return

found = {
"bib": set(),
"fig_def": set(),
Expand Down
1 change: 0 additions & 1 deletion lib/mccole/extensions/hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,3 @@ def keep_dir(value, path):
def keep_file(value, path):
"""Only process .md Markdown files."""
return path.suffix == ".md"

8 changes: 8 additions & 0 deletions lib/mccole/resources/mccole.css
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@
--spacing-small: 0.25rem;
--spacing-medium: 0.5rem;
--spacing-large: 1rem;

/* Image properties */
--splash-width: 80%;
}

/* Flex grid */
Expand Down Expand Up @@ -180,6 +183,11 @@ html {
font-family: "Atkinson Hyperlegible", sans-serif;
}

/* Splash image */
img.splash {
width: var(--splash-width);
}

/* Appendix list */
ol.toc-appendices {
list-style-type: upper-latin;
Expand Down

0 comments on commit 7ed8fac

Please sign in to comment.