Skip to content
forked from oplS17projects/FP1

final project exploration #1: learn Github, play with a Racket library

Notifications You must be signed in to change notification settings

MurphyWants/FP1

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

My Library: Markdown + Web-Server Library

My name: Jonathan Murphy

I found the markdown library and the web-server library. My first idea was to write a markdown file and have it display to a webserver. And then I found this guide, and the following code from that guide is very close to that.

(require markdown)
(define xs (parse-markdown "I am _emph_ and I am **strong**."))
; xs = '((p () "I am " (em () "emph") " and I am " (strong () "strong") "."))
(display-xexpr `(html ()
      (head ())
      (body () ,@xs)))

The main difference is that I had to read it from a file and otuput it to a file which can be accomplished with the following:

(define xs (parse-markdown (file->string "filename.md)))

Ok so that wasn't super exciting or hard, so I had another challenge, which was to have a text file with a list of text files and output them to a webpage. I concatinated the text files into appropriate html and then what I thought was a correct xexpr santax, but I couldn't figure it out. String->xexpr gave an error that I annotated in my main.rkt file.

So I went back to the working markdown file to the webpage and hopefully I'll find more resources of how to do xexpr 's correctly.

DrRacket Output and Firefox screenshots:

Racket image Firefxo image

About

final project exploration #1: learn Github, play with a Racket library

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Racket 91.8%
  • HTML 8.2%