Skip to content

Allows for standard Jekyll code highlighting with distill template #3002

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion _layouts/distill.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
<!-- Distill js -->
<script src="{{ '/assets/js/distillpub/template.v2.js' | relative_url }}"></script>
<script src="{{ '/assets/js/distillpub/transforms.v2.js' | relative_url }}"></script>
<script src="{{ '/assets/js/distillpub/overrides.js' | relative_url }}"></script>
{% if page._styles %}
<!-- Page/Post style -->
<style type="text/css">
Expand Down
10 changes: 8 additions & 2 deletions _posts/2018-12-22-distill.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,7 @@ For larger blocks of code, add a `block` attribute:
}
</d-code>

**Note:** `<d-code>` blocks do not look good in the dark mode.
You can always use the default code-highlight using the `highlight` liquid tag:
**Note:** `<d-code>` blocks do not look good in the dark mode. You can instead use the standard Jekyll syntax highlight with the `highlight` liquid tag.

{% highlight javascript %}
var x = 25;
Expand All @@ -141,6 +140,13 @@ return x \* x;
}
{% endhighlight %}

You can also write standard Markdown code blocks in triple ticks with a language tag, for instance:

```python
def foo(x):
return x
```

---

## Interactive Plots
Expand Down
28 changes: 0 additions & 28 deletions assets/js/distillpub/overrides.js

This file was deleted.

2 changes: 1 addition & 1 deletion assets/js/distillpub/template.v2.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading