This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Goal of the script is export an existing site to hugo markdown | |
# use httrack or some other tool to download the full website | |
# then run this script to convert the local copy to markdown | |
# verify that the header and footer are properly removed (by setting the split point) | |
# copy the markdowns into the hugo content section | |
import os | |
from markdownify import markdownify as md |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
Install: | |
Copy this file into /layouts/shortcodes | |
Usage: | |
{{% mapml %}} | |
<mapml-viewer projection="OSMTILE" zoom="0" lat="0.0" lon="0.0" controls style="width:100%;height:400px"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html><body> | |
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css" integrity="sha512-hoalWLoI8r4UszCkZ5kL8vayOGVae1oxXe/2A4AO6J9+580uKHDO3JdHb7NzwwzK5xr/Fs0W40kiNHxM9vyTtQ==" crossorigin=""/> | |
<script src="https://unpkg.com/[email protected]/dist/leaflet.js" integrity="sha512-BB3hKbKWOc9Ez/TAwyWxNXeoV9c1v6FIeYiBieIWkpLjauysF18NzgR1MBNBXf8/KABdlkX68nAhlwcDFLGPCQ==" crossorigin=""></script> | |
<div id="map2" style="width:80%;height:400px"></div> | |
<script> | |
var map = L.map('map2', { | |
center: [51.505, -0.09], | |
zoom: 6 | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# I tried markdown addin by Britva from https://appsource.microsoft.com/en-us/product/office/WA200002866, but it doesn't do tables | |
# By default pandoc renders tables using pandoc markdown conventions, which breaks up cell content on multiple lines (breaking in the middle of a hyperlink, rendering invalid markdown) | |
pandoc -s foo.docx -t markdown -o foo.md | |
# Seems there is a number of table plugins that enable you to finetune the behaviour | |
pandoc -s foo.docx -t markdown-simple_tables-multiline_tables-grid_tables -o foo.md | |
# In many scenario's (seems related to the column width being more then a treshold) this approach breaks and pandoc |