Let's see what Github does with Markdown links

This commit is contained in:
Jeff Parsons 2015-12-08 16:33:19 -08:00
commit 2eed26ca37
4 changed files with 40 additions and 8 deletions

View file

@ -31,14 +31,14 @@ Demos
---
Some pre-configured machines are shown below, ready to run BASIC, DOS, Windows 1.01, and assorted non-DOS software.
![IBM PC running DONKEY.BAS](/devices/pc/machine/5150/cga/64kb/donkey/thumbnail.jpg "link:/devices/pc/machine/5150/cga/64kb/donkey/:200:100")
![IBM PC XT w/CGA, 10Mb Hard Drive](/devices/pc/machine/5160/cga/256kb/demo/thumbnail.jpg "link:/devices/pc/machine/5160/cga/256kb/demo/:200:100")
![IBM PC XT w/CGA, Windows 1.01](/devices/pc/machine/5160/cga/256kb/win101/thumbnail.jpg "link:/devices/pc/machine/5160/cga/256kb/win101/:200:100")
![IBM PC XT w/EGA, Windows 1.01](/devices/pc/machine/5160/ega/640kb/win101/thumbnail.jpg "link:/devices/pc/machine/5160/ega/640kb/win101/:200:100")
![IBM PC AT w/EGA, OS/2 1.0](/disks/pc/os2/ibm/1.0/thumbnail.jpg "link:/disks/pc/os2/ibm/1.0/:200:100")
![IBM PC w/MDA, CP/M-86](/disks/pc/cpm/thumbnail.jpg "link:/disks/pc/cpm/:200:100")
![IBM PC w/MDA, Microsoft Adventure](/disks/pc/games/microsoft/adventure/thumbnail.jpg "link:/disks/pc/games/microsoft/adventure/:200:100")
![IBM PC w/CGA, Zork I](/disks/pc/games/infocom/zork1/thumbnail.jpg "link:/disks/pc/games/infocom/zork1/:200:100")
[<img src="/devices/pc/machine/5150/cga/64kb/donkey/thumbnail.jpg" width="200" height="100"/>](/devices/pc/machine/5150/cga/64kb/donkey/ "IBM PC running DONKEY.BAS")
[<img src="{{ site.baseurl }}/devices/pc/machine/5160/cga/256kb/demo/thumbnail.jpg" width="200" height="100"/>]({{ site.baseurl }}/devices/pc/machine/5160/cga/256kb/demo/ "IBM PC XT w/CGA, 10Mb Hard Drive")
[<img src="{{ site.baseurl }}/devices/pc/machine/5160/cga/256kb/win101/thumbnail.jpg" width="200" height="100"/>]({{ site.baseurl }}/devices/pc/machine/5160/cga/256kb/win101/ "IBM PC XT w/CGA, Windows 1.01")
[<img src="{{ site.baseurl }}/devices/pc/machine/5160/ega/640kb/win101/thumbnail.jpg" width="200" height="100"/>]({{ site.baseurl }}/devices/pc/machine/5160/ega/640kb/win101/ "IBM PC XT w/EGA, Windows 1.01")
[<img src="{{ site.baseurl }}/disks/pc/os2/ibm/1.0/thumbnail.jpg" width="200" height="100"/>]({{ site.baseurl }}/disks/pc/os2/ibm/1.0/ "IBM PC AT w/EGA, OS/2 1.0")
[<img src="{{ site.baseurl }}/disks/pc/cpm/thumbnail.jpg" width="200" height="100"/>]({{ site.baseurl }}/disks/pc/cpm/ "IBM PC w/MDA, CP/M-86")
[<img src="{{ site.baseurl }}/disks/pc/games/microsoft/adventure/thumbnail.jpg" width="200" height="100"/>]({{ site.baseurl }}/disks/pc/games/microsoft/adventure/ "IBM PC w/MDA, Microsoft Adventure")
[<img src="{{ site.baseurl }}/disks/pc/games/infocom/zork1/thumbnail.jpg" width="200" height="100"/>]({{ site.baseurl }}/disks/pc/games/infocom/zork1/ "IBM PC w/CGA, Zork I")
Check out the rest of the PCjs [Application](/apps/pc/), [Boot Disk](/disks/pc/) and [Machine](/devices/pc/machine/)
demos, including an [IBM PC Dual Display System](/devices/pc/machine/5150/dual/64kb/) demo of multiple monitor support,

1
_includes/image.html Normal file
View file

@ -0,0 +1 @@
[<img src="{{ site.baseurl }}{{ include.src }}" width="{{ include.width }}" height="{{ include.height }}"/>]({{ include.link }} "{{ include.alt }}")

View file

@ -65,6 +65,7 @@ But in this case, there's nothing to pull, so force the push (this example assum
git push -f origin master
Node "Cheat Sheet"
===
@ -122,3 +123,33 @@ indicating the name of serial device to connect to:
The advantage of using *nc* is that no "middle man" is required: your terminal window will be connected directly
to the virtual serial port. And *nc* is included with OS X, whereas *socat* must installed separately (see
[http://www.dest-unreach.org/socat/](http://www.dest-unreach.org/socat/)).
Markdown "Cheat Sheet"
===
To convert PCjs' special links, such as:
![IBM PC XT w/CGA, 10Mb Hard Drive](/devices/pc/machine/5160/cga/256kb/demo/thumbnail.jpg "link:/devices/pc/machine/5160/cga/256kb/demo/:200:100")
to normal Markdown links, search using this regex:
\!\[(.*?)\]\(([^ )]*) \"link:([^:]*):([0-9]*):([0-9]*)\"\)
and replace using this regex:
[<img src="$2" width="$4" height="$5"/>]($3 "$1")
Jekyll "Cheat Sheet"
===
Although I created image.html in the **_includes** folder, so that I could do this:
{% include image.html src="/devices/pc/machine/5150/cga/64kb/donkey/thumbnail.jpg" width="200" height="100" link="/devices/pc/machine/5150/cga/64kb/donkey/" alt="IBM PC running DONKEY.BAS" %}
instead of this:
[<img src="{{ site.baseurl }}/devices/pc/machine/5150/cga/64kb/donkey/thumbnail.jpg" width="200" height="100"/>](/devices/pc/machine/5150/cga/64kb/donkey/ "IBM PC running DONKEY.BAS")
I decided to stick with the latter, since it has a better chance of rendering as normal Markdown.