force use LF file endings

This commit is contained in:
2022-11-15 12:09:11 +01:00
parent 808f9ce249
commit 0f68c10a4e
7 changed files with 124 additions and 91 deletions

View File

@ -3,12 +3,12 @@ title: "Hugo Integration 🧭"
date: 2021-10-30T15:42:22+02:00
draft: true
toc: false
images:
pyscript: true
tags:
- untagged
---
## This is Word in Progress
## This is Work in Progress
The hope here is that we can call a predefined go procedure that parses
some section of markdown source code and instantiates the corresponding svg file
@ -17,3 +17,36 @@ under our static folder that is then referenced.
``` go
{{/* a comment */}}
```
## Using Python Script
Example using standard output from a python script.
{{< pyscript >}}
print("test string")
{{< /pyscript >}}
Example using matplotlib to generate a simple graph.
{{< pyplot >}}
import matplotlib.pyplot as plt
import numpy as np
x = np.arange(-10,10)
y = x ** 2
fig, ax = plt.subplots()
ax.plot(x, y)
fig
{{< /pyplot >}}
Example using matplotlib to generate a scatter plot.
{{< pyplot >}}
import matplotlib.pyplot as plt
import numpy as np
x = np.random.randn(25)
y = np.random.randn(25)
fig, ax = plt.subplots()
ax.scatter(x, y)
fig
{{< /pyplot >}}

View File

@ -65,9 +65,9 @@ tags:
``` go
{< python-svg dest="/images/posts/test.svg" title="This is a pyuthon-svg exmaple." >}
{{</* python-svg dest="/images/posts/test.svg" title="This is a pyuthon-svg exmaple." */>}}
railroad.Diagram("foo", railroad.Choice(0, "bar", "baz"), css=style)
{< /python-svg >}
{{</* /python-svg */>}}
```
{{< python-svg dest="/images/posts/test.svg" title="This is a python-svg exmaple." >}}