Make a table of contents for your write.as blog

As far as I know there is no automatic way to keep a table of contents of your blog and present it in a separate page or in your “about” page. So I made a curl-script to get the titles and the links in a html or markdown file. So you have to go to your terminal and make your own command for your blog like this.

curl "https://mistynotes.nl/page/[1-3]" | grep "<h2 class=\"post-title\"" | sed 's/<h2 class="post-title" itemprop="name" class="p-name">/   /g' > contentmistynotes.md

If your blog has more pages than two, change the [1-3] accordingly. And change the domain in the url to the domain of your own blog. You will get something like this.

	   <a href="https://mistynotes.nl/spelen-en-knoeien-met-css" itemprop="url" class="u-url">Spelen en knoeien met CSS</a>
	   <a href="https://mistynotes.nl/wordpress-com-domein-voordelig-verhuizen" itemprop="url" class="u-url">Wordpress.com domein voordelig verhuizen</a>
	   <a href="https://mistynotes.nl/dialogen-in-markdown" itemprop="url" class="u-url">Dialogen in Markdown</a>
	   <a href="https://mistynotes.nl/versleutel-je-e-mail-dit-jaar" itemprop="url" class="u-url">Versleutel je e-mail dit jaar</a>
	   <a href="https://mistynotes.nl/5g-gevaarlijk-of-niet" itemprop="url" class="u-url">5G Gevaarlijk of niet?</a>
	   <a href="https://mistynotes.nl/bookaroo-speelt-kiekeboe" itemprop="url" class="u-url">Bookaroo speelt kiekeboe</a>
	   <a href="https://mistynotes.nl/ok-una-pregunta-waarom-nog-een-sociaal-medium" itemprop="url" class="u-url"><em>Ok, una</em> pregunta: Waarom nóg een sociaal medium?</a>
	   <a href="https://mistynotes.nl/een-spookaccount-bij-amazon" itemprop="url" class="u-url">Een spookaccount bij Amazon</a>
	   <a href="https://mistynotes.nl/er-zijn-meer-gratis-e-books-dan-je-denkt" itemprop="url" class="u-url">Er zijn meer gratis e-books dan je denkt</a>
	   <a href="https://mistynotes.nl/alternatief-nieuws-samen-lekker-zweren" itemprop="url" class="u-url">Alternatief nieuws: samen lekker zweren?</a>
	   <a href="https://mistynotes.nl/edward-snowden-verrader-van-een-verrader" itemprop="url" class="u-url">Edward Snowden: de verrader verraden</a>
	   <a href="https://mistynotes.nl/bij-wordpress-com-blijven-of-uitvliegen" itemprop="url" class="u-url">Bij WordPress.com blijven, of uitvliegen?</a>

You can change this the way you like it. If you want a list, just add a hyphen in the sed command like this: sed 's/<h2 class="post-title" itemprop="name" class="p-name">/ -/g'. You can put this text or list underneath a title like “Contents”, and there you have your table of contents. You have to update this every time you write a new article, though.