scribble-frog-helper
1 raco cmd
2 examples
3 procedures
title
date
tags
meta
essay
7.6

scribble-frog-helper

Yanying Wang <yanyingwang1@gmail.com>

racket[Scribble] helper functions especially for writing blogs with racket[frog]. Related to:

INDEX:

    1 raco cmd

    2 examples

    3 procedures

1 raco cmd

Install this package first and then run

$ raco frog/hp -N title

to generate a scribble post with all the functions defined by this lib.

2 examples

a practical usage within a blog post:
#lang scribble/manual
 
@title{道德经}
@date{-600} @;公元前600年
@tags{哲学 思辨}
 
@essay{
逍遥游
-600-1-18
北冥有鱼,其名为鲲。
鲲之大,不知其几千里也;
化而为鸟,其名为鹏。
鹏之背,不知其几千里也。
}
 
@essay{
马蹄
-600-2-30
马,蹄可以践霜雪,毛可以御风寒,
龁草饮水,翘足而陆,此马之真性也。
虽有义台路寝,无所用之。
}

And I also have a blog post using this lib, you can check that for the html shown result.

3 procedures

Examples:
> (title "a test post with scribble-frog-helper")

'("Title: " "a test post with scribble-frog-helper")

> (date " 2019-1-1 12:01")

'("Date: " "2019-01-01T12:01:00")

> (tags "tag1 tag2 tag3")

'("Tags: " "tag1, tag2, tag3")

> (essay
  "逍遥游""\n"
  "2019-12-18""\n"
  "北冥有鱼,其名为鲲。""\n"
  "鲲之大,不知其几千里也;""\n"
  "化而为鸟,其名为鹏。""\n"
  "鹏之背,不知其几千里也。")

(list

 (element 'bold (element 'larger '("逍遥游")))

 "\n"

 (element 'smaller '("(" "2019-12-18" ")"))

 (element 'newline '())

 (list

  "北冥有鱼,其名为鲲。"

  (element 'newline '())

  "鲲之大,不知其几千里也;"

  (element 'newline '())

  "化而为鸟,其名为鹏。"

  (element 'newline '())

  "鹏之背,不知其几千里也。"))

procedure

(title str)  list?

  str : string?
return list of elements rendered to be: Title: the post title

procedure

(date str)  list?

  str : string?
return list of elements rendered to be: Date: the post date

procedure

(tags str)  list?

  str : string?
return list of elements rendered to be: Tags: tag1 tag2 tag3

procedure

(meta str)  list?

  str : string?
return list of elements with title, date, and tags.

procedure

(essay str)  list?

  str : string?
return an essay for the str.