diff options
37 files changed, 143 insertions, 124 deletions
diff --git a/.build.yml b/.build.yml index a2c3429..9496392 100644 --- a/.build.yml +++ b/.build.yml @@ -1,6 +1,7 @@ image: archlinux oauth: lists.sr.ht/EMAILS:RO pages.sr.ht/PAGES:RW packages: + - jq - julia - katex - openring-git @@ -12,7 +13,12 @@ tasks: mkdir -p site/_libs/katex cp /usr/lib/node_modules/katex/dist/katex.min.js site/_libs/katex cp -r /usr/lib/node_modules/katex/dist/{fonts,katex.min.css} site/_css - acurl https://lists.sr.ht/query/list/5261.mbox -o site/mbox + curl https://fediring.net/ring.json | + jq -r 'map(.host)|until(.[0]=="cnx.srht.site";.[1:]+.[:1])|.[-1,1]'\ + > site/_libs/fediring + openring -n 4 -l 192 -S site/_libs/openring/sources\ + < site/_libs/openring/in.html > site/_libs/openring/out.html + acurl https://lists.sr.ht/query/list/5261.mbox -o site/_libs/formbox/mbox - build: | cd site julia --project=@. .build.jl diff --git a/.gitignore b/.gitignore index 6c4b4cb..2355507 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,10 @@ Manifest.toml __site/ _css/fonts/ _css/katex.min.css -_libs/ +_libs/fediring +_libs/highlight/ +_libs/katex/ +_libs/openring/out.html node_modules/ package-lock.json package.json diff --git a/_css/style.css b/_css/style.css index 990a1ab..790c177 100644 --- a/_css/style.css +++ b/_css/style.css @@ -49,13 +49,6 @@ body { margin: 0 1rem } .franklin-content .row { display: block } -.franklin-content .left { - float: left; - margin-right: 1rem; -} - -.franklin-content .right { float: right } - /* Text geometry */ .franklin-content p { hyphens: auto; @@ -87,7 +80,7 @@ body { margin: 0 1rem } } /* General formatting */ -.franklin-content ol, .franklin-content ul, .franklin-content li p { margin: 0 } +.franklin-content li p { margin: 0 } .franklin-content a { color: var(--link-fg); @@ -164,29 +157,30 @@ header a { } header a:hover { color: var(--text-fg) } -/* Metadata */ -.metadata, .page-foot { +nav, nav li { display: inline-block } +nav ul { margin: 0 } + +footer, .tags, .right { color: var(--fade-fg); font-size: 80%; } -.metadata { - margin-top: -1rem; - margin-bottom: 1rem; -} - -.page-foot { +footer { margin-top: 1.5rem; margin-bottom: 2rem; } -.metadata a, .franklin-content .page-foot a { - color: var(--fade-fg); - text-decoration: underline; +footer a, .tags a { + color: var(--fade-fg)!important; + text-decoration: underline!important; } -nav, nav li { display: inline-block } -nav ul { margin: 0 } +.nowrap { display: inline-block } +.tags { float: left } +.right { + float: right; + margin-left: auto; +} /* Table */ table { @@ -237,19 +231,15 @@ code, .hljs { display: flex; flex-wrap: wrap; margin: -0.5rem; + margin-bottom: 0; } -.openring .title, .openring .source { margin: 0 } -.openring .article { +.openring h3 { margin: 0 0 1ex } +.openring article { background: var(--block-bg); display: flex; flex-direction: column; flex: 1 1 0; margin: 1ex; - min-width: 15rem; + min-width: 12rem; padding: 1ex; } -.right { - color: var(--fade-fg); - font-size: 80%; - text-align: right; -} diff --git a/_layout/footer.html b/_layout/footer.html new file mode 100644 index 0000000..cde42d6 --- /dev/null +++ b/_layout/footer.html @@ -0,0 +1,15 @@ +<footer> + {{copyright}}; <span class=nowrap>See + <a href=/COPYING>license terms</a></span><br> + + {{isnotpage /tag/*}}Last modified: {{author_date}}; <span class=nowrap>View + <a href=https://git.sr.ht/~cnx/site/tree/main/item/{{fd_rpath}}>page + source</a></span><br>{{end}} + + Part of <a href=https://fediring.net>Fediring</a>; <span class=nowrap>Visit + the {{fediring 1 previous}}/{{fediring 2 next}} site</span><br> + + <a href={{job_url}}>Built on sr.ht</a> + by <a href=https://julialang.org>Julia</a> + <a href=https://franklinjl.org>Franklin</a> +</footer> diff --git a/_layout/head.html b/_layout/head.html index 4b4ca29..d6b043e 100644 --- a/_layout/head.html +++ b/_layout/head.html @@ -3,9 +3,3 @@ {{isdef title}}<title>{{title}} - McSinyx</title>{{end}} <body> {{insert header.html}} -{{isnotempty rss}}<h1>{{title}}</h1> -<div class=metadata> - <strong>Originally published:</strong> {{date}}<br> - <strong>Tags:</strong>{{for tag in tags}} - <a href=/tag/{{tag}}>{{tag}}</a>{{end}}<br> -</div>{{end}} diff --git a/_layout/page_foot.html b/_layout/page_foot.html index 8d8f783..848d42e 100644 --- a/_layout/page_foot.html +++ b/_layout/page_foot.html @@ -1,17 +1,11 @@ -{{isnotpage /tag/*}}{{isnotempty rss}}<section class=comments> - <a href='{{mailto_comment}}'>Reply via email</a> -</section>{{end}}{{end}} -<section class=page-foot> - {{copyright}}; See <a href=/COPYING>license terms</a><br> +{{isnotempty tags}}<small class=tags><strong>Tags:</strong>{{for tag in tags}} + <a href=/tag/{{tag}}>{{tag}}</a>{{end}}</small> +<small class=right>—{{isempty rss}}{{author}}, + {{else}}{{mailto_comment}}, {{end}}{{date}}</small><br>{{end}} - {{isnotpage /tag/*}}Last modified: {{author_date}}; View - <a href=https://git.sr.ht/~cnx/site/tree/main/item/{{fd_rpath}}>page - source</a><br>{{end}} - - Part of <a href=https://fediring.net>Fediring</a>; Visit neighbor on the - <a href={{fediring previous}}>left</a>/<a href={{fediring next}}>right</a><br> - - <a href={{job_url}}>Built on sr.ht</a> - by <a href=https://julialang.org>Julia</a> - <a href=https://franklinjl.org>Franklin</a><br> -</section> +{{isnotempty rss}}<section class=comments> + <h2>Comments</h2> + <p>To reply, follow the <code>mailto</code> link + in the the author's name.</p> +</section>{{end}} +{{insert footer.html}} diff --git a/_layout/tag.html b/_layout/tag.html index a9de4ae..72fd0d2 100644 --- a/_layout/tag.html +++ b/_layout/tag.html @@ -2,10 +2,11 @@ <title>Tag: {{fd_tag}}</title> <body> {{insert header.html}} -<div class=franklin-content> +<main class=franklin-content> <h1>Tag: {{fd_tag}}</h1> {{taglist}} - {{insert page_foot.html}} -</div> + {{openring}} +</main> +{{insert footer.html}} </body> </html> diff --git a/_templates/formbox.xml b/_libs/formbox/comment.xml index 2078071..2078071 100644 --- a/_templates/formbox.xml +++ b/_libs/formbox/comment.xml diff --git a/_libs/openring/in.html b/_libs/openring/in.html new file mode 100644 index 0000000..7a164cc --- /dev/null +++ b/_libs/openring/in.html @@ -0,0 +1,13 @@ +<h2>See Also</h2> +<div class=openring> + {{range .Articles}} + <article> + <h3><a href='{{.Link}}'>{{.Title}}</a></h3> + {{.Summary}} + <small class=right>—<a href='{{.SourceLink}}'>{{.SourceTitle}}</a>, + {{.Date | datef "2006-01-02"}}</small> + </article> + {{end}} +</div> +<small class=right>Generated by + <a href=https://sr.ht/~sircmpwn/openring>openring</a></small><br> diff --git a/_libs/openring/sources b/_libs/openring/sources new file mode 100644 index 0000000..9514efa --- /dev/null +++ b/_libs/openring/sources @@ -0,0 +1,8 @@ +https://blog.ganssle.io/feeds/all.atom.xml +https://codesections.com/rss.xml +https://danct12.github.io/feed.xml +https://drewdevault.com/feed.xml +https://huyngo.envs.net/index.xml +https://pgjones.dev/blog/rss20.xml +https://stallman.org/rss/rss.xml +https://unixsheikh.com/feed.rss diff --git a/_templates/openring.html b/_templates/openring.html deleted file mode 100644 index a585f17..0000000 --- a/_templates/openring.html +++ /dev/null @@ -1,12 +0,0 @@ -<section class=openring> - {{range .Articles}} - <div class=article> - <h3 class=title><a href='{{.Link}}'>{{.Title}}</a></h3> - {{.Summary}}<br> - <small class=right>—<a href='{{.SourceLink}}'>{{.SourceTitle}}</a>, - {{.Date | datef "2006-01-02"}}</small> - </div> - {{end}} -</section> -<small class=right>Generated by - <a href=https://git.sr.ht/~sircmpwn/openring>openring</a></small> diff --git a/blog/2020/gsoc/article/1.md b/blog/2020/gsoc/article/1.md index 7085182..aa7ba57 100644 --- a/blog/2020/gsoc/article/1.md +++ b/blog/2020/gsoc/article/1.md @@ -1,10 +1,11 @@ +++ -title = "Unexpected Things When You're Expecting" rss = "GSoC 2020: Unexpected Things When You're Expecting" date = Date(2020, 6, 9) tags = ["gsoc", "pip", "python"] +++ +# Unexpected Things When You're Expecting + Hi everyone, I hope that you are all doing well and wishes you all good health! The last week has not been really kind to me with a decent amount of academic pressure (my school year is lasting until early Jully). diff --git a/blog/2020/gsoc/article/2.md b/blog/2020/gsoc/article/2.md index 324bd92..4d75ae1 100644 --- a/blog/2020/gsoc/article/2.md +++ b/blog/2020/gsoc/article/2.md @@ -1,10 +1,11 @@ +++ -title = "The Wonderful Wizard of O'zip" rss = "GSoC 2020: The Wonderful Wizard of O'zip" date = Date(2020, 6, 22) tags = ["gsoc", "pip", "python"] +++ +# The Wonderful Wizard of O'zip + > Never give up... No one knows what's going to happen next. \toc diff --git a/blog/2020/gsoc/article/3.md b/blog/2020/gsoc/article/3.md index 9527ecd..0a78129 100644 --- a/blog/2020/gsoc/article/3.md +++ b/blog/2020/gsoc/article/3.md @@ -1,10 +1,11 @@ +++ -title = "I'm Not Drowning On My Own" rss = "GSoC 2020: I'm Not Drowning On My Own" date = Date(2020, 7, 6) tags = ["gsoc", "pip", "python"] +++ +# I'm Not Drowning On My Own + \toc ## Cold Water diff --git a/blog/2020/gsoc/article/4.md b/blog/2020/gsoc/article/4.md index 1b4dc9a..8a2d47d 100644 --- a/blog/2020/gsoc/article/4.md +++ b/blog/2020/gsoc/article/4.md @@ -1,10 +1,11 @@ +++ -title = "I've Walked 500 Miles…" rss = "GSoC 2020: I've Walked 500 Miles…" date = Date(2020, 7, 20) tags = ["gsoc", "pip", "python"] +++ +# I've Walked 500 Miles… + > ... and I would walk 500 more\ > Just to be the man who walks a thousand miles\ > To fall down at your door diff --git a/blog/2020/gsoc/article/5.md b/blog/2020/gsoc/article/5.md index 8658d9a..cdcc509 100644 --- a/blog/2020/gsoc/article/5.md +++ b/blog/2020/gsoc/article/5.md @@ -1,10 +1,11 @@ +++ -title = "Sorting Things Out" rss = "GSoC 2020: Sorting Things Out" date = Date(2020, 8, 3) tags = ["gsoc", "pip", "python"] +++ +Sorting Things Out + Hi! I really hope that everyone reading this is still doing okay, and if that isn't the case, I wish you a good day! diff --git a/blog/2020/gsoc/article/6.md b/blog/2020/gsoc/article/6.md index f528a97..996ba41 100644 --- a/blog/2020/gsoc/article/6.md +++ b/blog/2020/gsoc/article/6.md @@ -1,10 +1,11 @@ +++ -title = "Parallelizing Wheel Downloads" rss = "GSoC 2020: Parallelizing Wheel Downloads" date = Date(2020, 8, 17) tags = ["gsoc", "pip", "python"] +++ +# Parallelizing Wheel Downloads + > And now it's clear as this promise\ > That we're making\ > Two progress bars into one diff --git a/blog/2020/gsoc/article/7.md b/blog/2020/gsoc/article/7.md index c13d0db..4e2073b 100644 --- a/blog/2020/gsoc/article/7.md +++ b/blog/2020/gsoc/article/7.md @@ -1,5 +1,4 @@ +++ -title = "Outro" rss = "GSoC 2020: Outro" date = Date(2020, 8, 31) tags = ["gsoc", "pip", "python"] @@ -10,6 +9,8 @@ tags = ["gsoc", "pip", "python"] > Grabbed me one of them lemon pie theories\ > And let me get some of them benchmarks you theories too +# Outro + \toc ## The Look diff --git a/blog/2020/gsoc/checkin/1.md b/blog/2020/gsoc/checkin/1.md index da54bd9..3c5178a 100644 --- a/blog/2020/gsoc/checkin/1.md +++ b/blog/2020/gsoc/checkin/1.md @@ -1,10 +1,10 @@ +++ -title = "First Check-In" -rss = "GSoC 2020: First Check-In" date = Date(2020, 6, 1) tags = ["gsoc", "pip"] +++ +# First Check-In + Hi everyone, I am McSinyx, a Vietnamese undergraduate student who loves [free software]. This summer I am working with the maintainers and the contributors of `pip` to make diff --git a/blog/2020/gsoc/checkin/2.md b/blog/2020/gsoc/checkin/2.md index 7b214e2..6d65dc5 100644 --- a/blog/2020/gsoc/checkin/2.md +++ b/blog/2020/gsoc/checkin/2.md @@ -1,10 +1,10 @@ +++ -title = "Second Check-In" -rss = "GSoC 2020: Second Check-In" date = Date(2020, 6, 15) tags = ["gsoc", "pip"] +++ +# Second Check-In + Hi everyone and may the odds ever in your favor, especially during this tough time! diff --git a/blog/2020/gsoc/checkin/3.md b/blog/2020/gsoc/checkin/3.md index dd013d8..2a08216 100644 --- a/blog/2020/gsoc/checkin/3.md +++ b/blog/2020/gsoc/checkin/3.md @@ -1,10 +1,10 @@ +++ -title = "Third Check-In" -rss = "GSoC 2020: Third Check-In" date = Date(2020, 6, 29) tags = ["gsoc", "pip"] +++ +# Third Check-In + Holla, holla, holla! Last seven days has not been a really productive week for me, though I think there are still some nice things to share with you all here! The good news is that I've finish my last leçon as a somophore, diff --git a/blog/2020/gsoc/checkin/4.md b/blog/2020/gsoc/checkin/4.md index 2f72ca3..54bfcee 100644 --- a/blog/2020/gsoc/checkin/4.md +++ b/blog/2020/gsoc/checkin/4.md @@ -1,10 +1,10 @@ +++ -title = "Fourth Check-In" -rss = "GSoC 2020: Fourth Check-In" date = Date(2020, 7, 13) tags = ["gsoc", "pip"] +++ +# Fourth Check-In + Hello there! I'm having my second year's last exam tomorrow, but it [feels like summer] already! I've been finalizing quite a few things to get them ready for pip 20.2b2. diff --git a/blog/2020/gsoc/checkin/5.md b/blog/2020/gsoc/checkin/5.md index e957f17..d772eb0 100644 --- a/blog/2020/gsoc/checkin/5.md +++ b/blog/2020/gsoc/checkin/5.md @@ -1,10 +1,10 @@ +++ -title = "Fifth Check-In" -rss = "GSoC 2020: Fifth Check-In" date = Date(2020, 7, 27) tags = ["gsoc", "pip"] +++ +# Fifth Check-In + Hello and I hope y'all are still doing well! ## What did I do last week? diff --git a/blog/2020/gsoc/checkin/6.md b/blog/2020/gsoc/checkin/6.md index 0db97d2..f5480df 100644 --- a/blog/2020/gsoc/checkin/6.md +++ b/blog/2020/gsoc/checkin/6.md @@ -1,10 +1,10 @@ +++ -title = "Sixth Check-In" -rss = "GSoC 2020: Sixth Check-In" date = Date(2020, 8, 10) tags = ["gsoc", "pip"] +++ +# Sixth Check-In + Hello there! ## What did I do last week? diff --git a/blog/2020/gsoc/checkin/7.md b/blog/2020/gsoc/checkin/7.md index f320b37..eceee12 100644 --- a/blog/2020/gsoc/checkin/7.md +++ b/blog/2020/gsoc/checkin/7.md @@ -1,10 +1,10 @@ +++ -title = "Final Check-In" -rss = "GSoC 2020: Final Check-In" date = Date(2020, 8, 24) tags = ["gsoc", "pip"] +++ +# Final Check-In + Hello there! ## What did I do last week? diff --git a/blog/2020/gsoc/index.md b/blog/2020/gsoc/index.md index 2e32563..b05c908 100644 --- a/blog/2020/gsoc/index.md +++ b/blog/2020/gsoc/index.md @@ -1,5 +1,4 @@ +++ -title = "Google Summer of Code 2020" rss = "GSoC 2020 final report" date = Date(2020, 8, 31) rss_pubdate = date # work around Franklin issue GH-797 @@ -9,6 +8,8 @@ benchmark = "/blog/2020/gsoc/article/7/#the_benchmark" python_gsoc = "https://blogs.python-gsoc.org/en/mcsinyxs-blog" +++ +# Google Summer of Code 2020 + In the summer of 2020, I worked with the contributors of `pip`, trying to improve the networking performance of the package manager. Admittedly, at the end of [the internship]({{internship}}) period, diff --git a/blog/butter.md b/blog/butter.md index e15b0c4..b469251 100644 --- a/blog/butter.md +++ b/blog/butter.md @@ -1,11 +1,12 @@ +++ -title = "NixOS on Btrfs+tmpfs" rss = "How I reinstalled NixOS on Btrfs with an amnesiac root and backed up my data" date = Date(2021, 11, 14) tags = ["backup", "btrfs", "fun", "nixos"] +++ +# NixOS on Btrfs+tmpfs + In 2018, dad bought me a new laptop to replace the good ole Compaq nx7010 whose screen unfortunately got infected by some sort of microbe and dieded shortly afterwards. The new one, whilst having a considerably worse build diff --git a/blog/conseq.md b/blog/conseq.md index b9ea570..92c5532 100644 --- a/blog/conseq.md +++ b/blog/conseq.md @@ -5,6 +5,8 @@ date = Date(2019, 2, 28) tags = ["fun", "math", "python", "sicp"] +++ +# {{title}} + In this article, we will only consider sequences defined by a function whose domain is a subset of the set of all integers. Such sequences will be *visualized*, i.e. we will try to evaluate the first few (thousand) elements, diff --git a/blog/gotham.md b/blog/gotham.md index cfd0677..ea2a5d5 100644 --- a/blog/gotham.md +++ b/blog/gotham.md @@ -1,10 +1,11 @@ +++ -title = "Generic Homemade Ham" rss = "An easy template for making uncured ham or similar brined pork" date = Date(2021, 11, 19) tags = ["lyf", "recipe"] +++ +# Generic Homemade Ham + Where I'm from, hams are stupid expensive due to the lack of demand. This is unacceptable because I *love* hams![^hamm] After years of not tasting even a single slice, I decided for myself to make some, and noting down diff --git a/blog/index.md b/blog/index.md index a3fcc64..a1eb7b8 100644 --- a/blog/index.md +++ b/blog/index.md @@ -11,6 +11,4 @@ As usual, the good old [RSS feed]({{fd_rss_feed_url}}) is available. If you are instead looking for the more formal literatures of mine, they are listed in [my ORCID profile](https://orcid.org/0000-0003-2336-706X). -## See Also - {{openring}} diff --git a/blog/nopoo.md b/blog/nopoo.md index 60a818f..0af7896 100644 --- a/blog/nopoo.md +++ b/blog/nopoo.md @@ -1,10 +1,11 @@ +++ -title = "To Poo or Not to Poo" rss = "Me experimenting with #nopoo" date = Date(2021, 5, 23) tags = ["hair", "lyf", "poo"] +++ +# To Poo or Not to Poo + Late April 2021, Việt Nam witnessed the beginning of the fourth wave of SARS-CoV-2 after a few months without any community case. Soon enough, students are told to not come to their schools' campus. This happens diff --git a/blog/system.md b/blog/system.md index 9870c13..698c51f 100644 --- a/blog/system.md +++ b/blog/system.md @@ -1,10 +1,11 @@ +++ -title = "System Cascade Connection" rss = "Properties of cascade connected systems analyzed via anonymous functions" date = Date(2020, 4, 15) tags = ["fun", "math"] +++ +# System Cascade Connection + Given two discrete-time systems $A$ and $B$ connected in cascade to form a new system $C = x \mapsto B(A(x))$, we examine the following properties: diff --git a/blog/teredo.md b/blog/teredo.md index 17f3bf3..d283977 100644 --- a/blog/teredo.md +++ b/blog/teredo.md @@ -1,10 +1,11 @@ +++ -title = "Teredo Tunnel Simulation" rss = "Teredo tunnel simulation in virtual machines" date = Date(2020, 7, 3) tags = ["fun", "ipv6", "tunnel"] +++ +# Teredo Tunnel Simulation + Internet Protocol version 6 (IPv6), the most recent version of the Internet Protocol, was developed by the IETF to deal with the long-anticipated problem of IPv4 address exhaustion. Despite being diff --git a/blog/threa.md b/blog/threa.md index 8a6ea45..4694a42 100644 --- a/blog/threa.md +++ b/blog/threa.md @@ -1,10 +1,11 @@ +++ -title = "Writing a Clipboard Manager" rss = "Raku's concision demonstrated in form of a tutorial" date = Date(2021, 7, 3) tags = ["clipboard", "fun", "raku"] +++ +# Writing a Clipboard Manager + !!! note "A word of protest" This was intended to be presented in [The Raku Conference], diff --git a/config.md b/config.md index c3173a0..bd86517 100644 --- a/config.md +++ b/config.md @@ -8,7 +8,7 @@ date_format = "yyyy-mm-dd" mintoclevel = 2 generate_rss = true ignore = [".build.jl", ".build.yml", "Manifest.toml", "Project.toml", - "_templates/", "mbox", "node_modules/", "package-lock.json"] + "node_modules/", "package-lock.json"] +++ \newcommand{\R}{\mathbb R} diff --git a/index.md b/index.md index 2656537..d360f1d 100644 --- a/index.md +++ b/index.md @@ -22,7 +22,7 @@ in the [Fediverse][]: [free software]: https://www.gnu.org/philosophy/free-sw.html [Fediverse]: https://en.wikipedia.org/wiki/Fediverse [cnx@nixnet.social]: https://nixnet.social/cnx -[cnx@video.hardlimit.com]: https://video.hardlimit.com/accounts/cnx +[cnx@video.hardlimit.com]: https://video.hardlimit.com/a/cnx [sr.ht/~cnx]: https://sr.ht/~cnx [mcsinyx@disroot.org]: mailto:mcsinyx@disroot.org [@cnx:halogen.city]: matrix:u/cnx:halogen.city diff --git a/utils.jl b/utils.jl index 4d43cdc..5a6e1c4 100644 --- a/utils.jl +++ b/utils.jl @@ -2,12 +2,12 @@ using Printf: @sprintf using Franklin: convert_html, path function hfun_author_date() - return readchomp(`git log -1 --date=short --format=%ad $(locvar(:fd_rpath))`) + readchomp(`git log -1 --date=short --format=%ad $(locvar(:fd_rpath))`) end function hfun_abslink(args) rpath = args[1] - return @sprintf("<a href=/%s>%s</a>", rpath, pagevar(rpath, :title)) + @sprintf("<a href=/%s>%s</a>", rpath, pagevar(rpath, :title)) end dir_url() = strip(dirname(locvar(:fd_url)), '/') @@ -21,41 +21,34 @@ function hfun_comment_rss() write(feed, convert_html(readchomp(joinpath(path(:rss), "comments.xml")))) #write(feed, read(`python3 formbox.py mbox $(message_id()) $item_template`, String)) end - return joinpath(globvar(:website_url), rpath) + joinpath(globvar(:website_url), rpath) +end + +function hfun_fediring(args) + adj = readlines(joinpath(path(:libs), "fediring"))[parse(Int, args[1])] + "<a href=https://$adj>$(args[2])</a>" end -hfun_fediring(args) = "https://fediring.net/$(args[1])?host=cnx.srht.site" hfun_github(args) = "<a href=https://github.com/$(args[1])>@$(args[1])</a>" hfun_job_url() = get(ENV, "JOB_URL", "https://builds.sr.ht/~cnx/site") function hfun_mailto_comment() - return @sprintf("mailto:%s?%s=%s&%s=Re: %s", - "~cnx/site@lists.sr.ht", - "In-Reply-To", message_id(), - "Subject", locvar(:title)) + @sprintf("<a href='mailto:%s?%s=%s&%s=Re: %s' title='Reply via email'>%s</a>", + "~cnx/site@lists.sr.ht", + "In-Reply-To", message_id(), + "Subject", locvar(:title), + globvar(:author)) end -ring_sources = ["https://blog.ganssle.io/feeds/all.atom.xml", - "https://codesections.com/rss.xml", - "https://danct12.github.io/feed.xml", - "https://drewdevault.com/feed.xml", - "https://huyngo.envs.net/index.xml", - "https://pgjones.dev/blog/rss20.xml", - "https://stallman.org/rss/rss.xml", - "https://unixsheikh.com/feed.rss"] -# TODO: joinpath -hfun_openring() = readchomp(pipeline("_templates/openring.html", - `openring -n4 -s$ring_sources`)) +hfun_openring() = readchomp(joinpath(path(:libs), "openring", "out.html")) function hfun_pep(args) postfix = length(args) < 2 ? "" : '#' * args[2] - return @sprintf( - "<a href=https://www.python.org/dev/peps/pep-%04d%s>PEP %s%s</a>", - Meta.parse(args[1]), postfix, args[1], postfix) + @sprintf("<a href=https://www.python.org/dev/peps/pep-%04d%s>PEP %s%s</a>", + Meta.parse(args[1]), postfix, args[1], postfix) end function hfun_pip(args) content = length(args) < 2 ? "GH-" * args[1] : args[2] - return @sprintf("<a href=https://github.com/pypa/pip/pull/%s>%s</a>", - args[1], content) + "<a href=https://github.com/pypa/pip/pull/$(args[1])>$content</a>" end |