not-matthias / apollo

Modern and minimalistic blog theme.
https://not-matthias.github.io/apollo
MIT License
121 stars 70 forks source link

Backslash required for repo_view + more docs #72

Open SeniorMars opened 2 months ago

SeniorMars commented 2 months ago

https://github.com/not-matthias/apollo/blob/f5ab39b7e83ca58392914bdfd1e3e5c41872cc4e/config.toml#L24

Great job upgrading to 0.19. Just wanted to say that repo_view requires a backslash at the end '/'.

Also, toc enables some js. We could want to document that.

Moreover, on my fork I reverted to mathjax 2.7 due to mobile issues with 3.x. It's a bit slower, but it works great on all platforms and has auto linebreaks.

Here is my mathjax config:

    {% if config.extra.mathjax | default(value=false) %}
        {% if config.extra.mathjax_extra | default(value=false) %}
            <script type="text/x-mathjax-config">
            MathJax.Hub.Config({
                extensions: ["tex2jax.js", "fast-preview.js"],
                tex2jax: {
                    inlineMath: [['$', '$'], ['\\(', '\\)']],
                    displayMath: [['$$', '$$'], ['\\[', '\\]']],
                    processEscapes: true
                },
                "HTML-CSS": {
                    linebreaks: {
                        automatic: true,
                        width: "container"
                    }
                },
                SVG: {
                    linebreaks: {
                        automatic: true,
                        width: "container"
                    },
                    font: "TeX"
                },
                "fast-preview": {
                    disabled: false
                }
            });
            </script>
        {% endif %}
        <script type="text/javascript" async
            src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js?config=TeX-AMS_CHTML">
        </script>
    {% endif %}

then in misc.scss i have:

.MathJax_Display,
.MJXc-display,
.MathJax_SVG_Display {
  overflow-x: auto;
  overflow-y: hidden;
}

#MathJax_Message {
  display: none !important;
}

I don't like it using the cdn, but mathjax is a big library.

Finally, there is also, read_time option which formats the reading_time option from zola.

                    {% if page.extra.read_time %}
                        :: <time>{{ page.reading_time }}</time> Min Read
                    {% endif %}