greghendershott / frog

Frog is a static blog generator implemented in Racket, targeting Bootstrap and able to use Pygments.
916 stars 96 forks source link

math-jax widget: make it possible to suppress configuration #255

Closed tfeb closed 9 months ago

tfeb commented 4 years ago

This makes a small, compatible, change to the math-jax widget which helps support for MathJax 3. The change is to allow the #:config option to be #f (previously it had to be a string). Doing this will cause no configuration part to be added to the MathJax URL, which is needed for MathJax 3, which does configuration a different way.

This can't make any difference to any existing uses of the widget, since previously this option had to be a string, so #f would have been illegal.

This is the first of two changes needed for #252, the other one being a change to markdown, which I need to check a bit more. As this is so simple and compatible I figured I should get this out of the way first so I can stop needing to rebase my branch.

I'm willing to handle any support problems which arise as a result of this change.

greghendershott commented 9 months ago

After just now (very belatedly -- sorry!!) merging your PR for markdown, I came here to merge this PR, too.

Unfortunately GitHub seems "stuck" wrt the Actions CI checks. After trawling through its UI for awhile, I can't figure out why. Both repos seem to have identical (in this regard) tests.yml files and identical settings in the Action UI here on the web site. I'm stumped.

Maybe if you were to make some dummy amended commit, and force-push that (as happened for markdown), it would run the checks? If so I'll merge.

sorawee commented 9 months ago

This happened to me before, and the fix is to rebase it on top of the current HEAD.

greghendershott commented 9 months ago

This happened to me before, and the fix is to rebase it on top of the current HEAD.

I don't see that possibility here in the web UI. Maybe you mean if @tfeb does it?

(Of course I can clone the branch locally and do anything, myself. And eventually if I need to I will. But atm I'm being lazy; just using some spare cycles to try to catch up on this from the web UI.)

sorawee commented 9 months ago

Yep, it looks like @tfeb needs to do it.

sorawee commented 9 months ago

Actually no, there's nothing to rebase... It's already up-to-date... Scratch everything that I said. Sorry for the noise :/

greghendershott commented 9 months ago

Today I have a bit more time so I figured I'd do this locally.

I made a fresh local branch (git checkout -b tfeb-mathjax-3 master && git pull https://github.com/tfeb/frog.git mathjax-3) and pushed that. The GitHub Action ran.

Alas the tests pass except on "current" Racket: https://github.com/greghendershott/frog/actions/runs/7223882584.

This seems to be the recent change to the HTML emitted by Scribble for section headings:

``` -------------------- FAILURE name: check-equal? location: read-scribble.rkt:113:4 actual: '((h1 () "The Post" rsquo "s Title " (span ((class "button-group")) (a ((href "#(part._.The_.Post_s_.Title)") (name "(part._.The_.Post_s_.Title)")) (span ((class "heading-anchor") (title "Link here")) "🔗")) " " (a ((class "heading-source") (title "Internal Scribble link and Scribble source")) "ℹ"))) (h1 () "1" (tt () nbsp) "Section 1 " (span ((class "button-group")) (a ((href "#(part._.Section_1)") (name "(part._.Section_1)")) (span ((class "heading-anchor") (title "Link here")) "🔗")) " " (a ((class "heading-source") (title "Internal Scribble link and Scribble source")) "ℹ"))) (p () "Here is some text.") (!HTML-COMMENT () "more") (p () "Below the fold.")) expected: '((h1 () (a ((name "(part._.The_.Post_s_.Title)"))) "The Post" rsquo "s Title") (h1 () "1" (tt () nbsp) (a ((name "(part._.Section_1)"))) "Section 1") (p () "Here is some text.") (!HTML-COMMENT () "more") (p () "Below the fold.")) ```

This is a genuine problem to fix with read-scribble-file -- which has nothing to do with this PR.

IIRC I fixed a similar issue in Racket Mode (which parses doc HTML for racket-describe-mode).

I don't use Frog anymore and had been hoping to avoid more hacking on it. But I guess I need to find time to fix that (or merge a PR for that), then merge this...

greghendershott commented 9 months ago

Actually I guess the test is just overly specific. I'll merge a commit to adjust that, then rebase this PR on that, then merge...

tfeb commented 9 months ago

Sorry, I'm away with only a phone so haven't been following this properly. I will look more closely when I get home.

greghendershott commented 9 months ago

@tfeb The TLDR is I (very belatedly) merged your PRs for markdown and frog repos.

(The rest of it is noise re GitHub and CI -- which had nothing to do with your PRs per se.

So please ignore until you're back from being mostly offline, and please continue hopefully enjoying that state. :smile:)