Browse Source

Update blog style

master
Nathan Bergey 3 years ago
parent
commit
4d03b27f89
  1. 11
      Makefile
  2. 6
      blogmd/conf.json
  3. 16
      blogmd/index.md.j2
  4. 1478
      poetry.lock
  5. 56
      post.ipynb
  6. 19
      pyproject.toml

11
Makefile

@ -1,12 +1,11 @@
post.md: post.ipynb post.md: post.ipynb
pipenv run jupyter nbconvert --no-input --template=figures.tpl --to=markdown post.ipynb
poetry run jupyter nbconvert --no-input --template=blogmd --to=markdown post.ipynb
to_blog: post.md to_blog: post.md
cp post.md ../../natronics.org/source/_posts/magnetometer_calibration.md
mkdir -p ../../natronics.org/source/_posts/magnetometer_calibration/img
cp img/* ../../natronics.org/source/_posts/magnetometer_calibration/img
cp -r post_files/ ../../natronics.org/source/_posts/magnetometer_calibration/
cp post.md ../natronics.org/src/posts/magnetometer_calibration.md
mkdir -p ../natronics.org/src/2019/magnetometer_calibration/img
cp img/* ../natronics.org/src/2019/magnetometer_calibration/img
cp -r post_files ../natronics.org/src/2019/magnetometer_calibration/
clean: clean:
rm -rf post_files rm -rf post_files

6
blogmd/conf.json

@ -0,0 +1,6 @@
{
"base_template": "markdown",
"mimetypes": {
"text/markdown": true
}
}

16
blogmd/index.md.j2

@ -0,0 +1,16 @@
{% extends 'markdown/index.md.j2'%}
{% block data_svg %}
<figure class="{{ cell.metadata['class'] }}">
<img src="{{ output.metadata.filenames['image/svg+xml'] | path2url }}" />
</figure>
{% endblock data_svg %}
{% block data_png %}
<figure class="{{ cell.metadata['class'] }}">
<img src="{{ output.metadata.filenames['image/png'] | path2url }}" />
</figure>
{% endblock data_png %}

1478
poetry.lock
File diff suppressed because it is too large
View File

56
post.ipynb
File diff suppressed because it is too large
View File

19
pyproject.toml

@ -0,0 +1,19 @@
[tool.poetry]
name = "psas-magnetometer-calibration"
version = "0.1.0"
description = ""
authors = ["Nathan Bergey <nathan.bergey@gmail.com>"]
[tool.poetry.dependencies]
python = ">=3.8,<3.10"
numpy = "^1.21.1"
matplotlib = "^3.4.2"
scipy = "^1.7.0"
jupyter = "^1.0.0"
h5py = "^3.3.0"
[tool.poetry.dev-dependencies]
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
Loading…
Cancel
Save