8.16.0.4
scribble-frog-helper
(require scribble-frog-helper) | |
package: scribble-frog-helper |
racket[Scribble] helper functions especially for writing blogs with racket[frog]. Related to:
INDEX:
1 raco cmd
Install this package first and then run
$ raco frog/helper -N title
to generate a scribble post with all the functions defined by this lib. This requires the current
directory to be a valid Frog or Darwin blog.
The optional the -f/--force flag will force it to proceed regardless of where it is run. Doing so will create the _src/posts/ directory if it does not already exist.
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 '())
'("北冥有鱼,其名为鲲。" "\n" "鲲之大,不知其几千里也;" "\n" "化而为鸟,其名为鹏。" "\n" "鹏之背,不知其几千里也。"))
return list of elements rendered to be: Title: the post title
return list of elements rendered to be: Date: the post date
return list of elements rendered to be: Tags: tag1 tag2 tag3
return an essay for the str.