unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* Static site generator
@ 2023-01-13 17:03 James Crake-Merani
  2023-01-13 17:49 ` Olivier Dion via General Guile related discussions
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: James Crake-Merani @ 2023-01-13 17:03 UTC (permalink / raw)
  To: guile-user

Hi,

I was wondering if you guys are aware of any static site generators 
written in Guile. I'm looking for something that can be extended in 
Guile so I can write my own code for it in Scheme. I'm aware of GNU 
Artanis but to my knowledge this is only for dynamic websites if I'm not 
mistaken.

Thanks,

James Crake-Merani




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Static site generator
  2023-01-13 17:03 Static site generator James Crake-Merani
@ 2023-01-13 17:49 ` Olivier Dion via General Guile related discussions
  2023-01-13 17:53 ` Jack Hill
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 8+ messages in thread
From: Olivier Dion via General Guile related discussions @ 2023-01-13 17:49 UTC (permalink / raw)
  To: James Crake-Merani, guile-user

On Fri, 13 Jan 2023, James Crake-Merani <james@jamescm.co.uk> wrote:
> Hi,
>
> I was wondering if you guys are aware of any static site generators 
> written in Guile. I'm looking for something that can be extended in 
> Guile so I can write my own code for it in Scheme. I'm aware of GNU 
> Artanis but to my knowledge this is only for dynamic websites if I'm not 
> mistaken.

Haunt.

Blog examples:

  - Mine : https://oldiob.dev/
  - David Thompson : https://dthompson.us/

and many others use it.

-- 
Olivier Dion
oldiob.dev



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Static site generator
  2023-01-13 17:03 Static site generator James Crake-Merani
  2023-01-13 17:49 ` Olivier Dion via General Guile related discussions
@ 2023-01-13 17:53 ` Jack Hill
  2023-01-13 18:40   ` James Crake-Merani
  2023-01-13 19:36 ` david larsson
  2023-01-13 23:00 ` Sascha Ziemann
  3 siblings, 1 reply; 8+ messages in thread
From: Jack Hill @ 2023-01-13 17:53 UTC (permalink / raw)
  To: James Crake-Merani; +Cc: guile-user

On Fri, 13 Jan 2023, James Crake-Merani wrote:

> Hi,
>
> I was wondering if you guys are aware of any static site generators written 
> in Guile. I'm looking for something that can be extended in Guile so I can 
> write my own code for it in Scheme. I'm aware of GNU Artanis but to my 
> knowledge this is only for dynamic websites if I'm not mistaken.
>
> Thanks,

Hi James,

You probably want to check out Haunt 
<https://dthompson.us/projects/haunt.html>

Best,
Jack



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Static site generator
  2023-01-13 17:53 ` Jack Hill
@ 2023-01-13 18:40   ` James Crake-Merani
  2023-01-13 18:52     ` Massimiliano Gubinelli
  0 siblings, 1 reply; 8+ messages in thread
From: James Crake-Merani @ 2023-01-13 18:40 UTC (permalink / raw)
  To: Jack Hill, olivier.dion; +Cc: guile-user


On 13/01/2023 17:53, Jack Hill wrote:
> On Fri, 13 Jan 2023, James Crake-Merani wrote:
>
>> Hi,
>>
>> I was wondering if you guys are aware of any static site generators 
>> written in Guile. I'm looking for something that can be extended in 
>> Guile so I can write my own code for it in Scheme. I'm aware of GNU 
>> Artanis but to my knowledge this is only for dynamic websites if I'm 
>> not mistaken.
>>
>> Thanks,
>
> Hi James,
>
> You probably want to check out Haunt 
> <https://dthompson.us/projects/haunt.html>
>
> Best,
> Jack

Hi,

Thank you two. Haunt looks like exactly what I'm looking for!




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Static site generator
  2023-01-13 18:40   ` James Crake-Merani
@ 2023-01-13 18:52     ` Massimiliano Gubinelli
  0 siblings, 0 replies; 8+ messages in thread
From: Massimiliano Gubinelli @ 2023-01-13 18:52 UTC (permalink / raw)
  To: James Crake-Merani; +Cc: Jack Hill, olivier.dion, guile-user

Hi all,

 this is tangentially related to the topic, but I would like to mention that you can use TeXmacs with some guile script to create websites. An example is the main TeXmacs blog which is a set of hyperlinked TeXmacs documents which can be navigated and edited within the program and then exported to HTML via a guile script. 

The website is served via github pages at: 


https://texmacs.github.io/notes/docs/main.html
and you find the code here:

https://github.com/texmacs/notes
texmacs/notes: Notes about TeXmacs
github.com


The design is intentionally very minimalistic, it does not take much to set up and publish. Using TeXmacs allows to reduce the burden in the static site generator since the webpages are directly produced by the TeXmacs HTML converter (which is written in scheme like many of the converters) and there is a simple scheme script which automatically generate the index page and the atom feed. Cannot be simpler!

Contributions, PR and ideas for extensions are welcome. 

Best regards,
Massimiliano Gubinelli

> On 13 Jan 2023, at 18:40, James Crake-Merani <james@jamescm.co.uk> wrote:
> 
> 
> On 13/01/2023 17:53, Jack Hill wrote:
>> On Fri, 13 Jan 2023, James Crake-Merani wrote:
>> 
>>> Hi,
>>> 
>>> I was wondering if you guys are aware of any static site generators written in Guile. I'm looking for something that can be extended in Guile so I can write my own code for it in Scheme. I'm aware of GNU Artanis but to my knowledge this is only for dynamic websites if I'm not mistaken.
>>> 
>>> Thanks,
>> 
>> Hi James,
>> 
>> You probably want to check out Haunt <https://dthompson.us/projects/haunt.html>
>> 
>> Best,
>> Jack
> 
> Hi,
> 
> Thank you two. Haunt looks like exactly what I'm looking for!
> 
> 



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Static site generator
  2023-01-13 17:03 Static site generator James Crake-Merani
  2023-01-13 17:49 ` Olivier Dion via General Guile related discussions
  2023-01-13 17:53 ` Jack Hill
@ 2023-01-13 19:36 ` david larsson
  2023-01-13 23:00 ` Sascha Ziemann
  3 siblings, 0 replies; 8+ messages in thread
From: david larsson @ 2023-01-13 19:36 UTC (permalink / raw)
  To: James Crake-Merani
  Cc: guile-user, guile-user-bounces+david.larsson=selfhosted.xyz

On 2023-01-13 18:03, James Crake-Merani wrote:
> Hi,
> 
> I was wondering if you guys are aware of any static site generators
> written in Guile. I'm looking for something that can be extended in
> Guile so I can write my own code for it in Scheme. I'm aware of GNU
> Artanis but to my knowledge this is only for dynamic websites if I'm
> not mistaken.
> 
> Thanks,
> 
> James Crake-Merani

Im not sure this fully qualifies as a static site generator, but there 
is also Tekuti:

https://wingolog.org/projects/

I experimented with using it a bit, but couldn't stave off spam posters, 
so almost forgot about it. At the time I wrote some org-to-xml.scm 
script which I have laying around so I could write blog entries in emacs 
org-mode. I haven't used it in quite a while though.

Best regards,
David



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Static site generator
  2023-01-13 17:03 Static site generator James Crake-Merani
                   ` (2 preceding siblings ...)
  2023-01-13 19:36 ` david larsson
@ 2023-01-13 23:00 ` Sascha Ziemann
  2023-01-13 23:54   ` Dr. Arne Babenhauserheide
  3 siblings, 1 reply; 8+ messages in thread
From: Sascha Ziemann @ 2023-01-13 23:00 UTC (permalink / raw)
  To: guile-user

Am Fr., 13. Jan. 2023 um 18:33 Uhr schrieb James Crake-Merani
<james@jamescm.co.uk>:
>
> I was wondering if you guys are aware of any static site generators
> written in Guile. I'm looking for something that can be extended in
> Guile so I can write my own code for it in Scheme.
>

All you need is quasiquote, unquote and a function which formats SXML as XML.

(html
 `("<!DOCTYPE html>"
   ,(let ((title "ceving"))
      `(html (@ (lang "de"))
             (head
              (meta (@ (charset "utf-8")))
              (title ,title))
             (body
              (h1 ,title)
              (ul (li (a (@ (href "1")) "Hello"))))))))

The example is for Chez, but does not use any fancy:
https://gist.github.com/ceving/c8aefd0fc6ea4fbf89571599e1d61046



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Static site generator
  2023-01-13 23:00 ` Sascha Ziemann
@ 2023-01-13 23:54   ` Dr. Arne Babenhauserheide
  0 siblings, 0 replies; 8+ messages in thread
From: Dr. Arne Babenhauserheide @ 2023-01-13 23:54 UTC (permalink / raw)
  To: Sascha Ziemann; +Cc: guile-user

[-- Attachment #1: Type: text/plain, Size: 5950 bytes --]


Sascha Ziemann <ceving@gmail.com> writes:

> All you need is quasiquote, unquote and a function which formats SXML as XML.
>
> (html
>  `("<!DOCTYPE html>"

I use something like this with Guile:

https://hg.sr.ht/~arnebab/guile-freenet/browse/fetchpull-standalone.scm?rev=tip#L604

(define (website-content port)
  (define title "Fetch-Pull-Stats re-woven")
  (sxml->xml
    `(*TOP*
        (html
           (head (title ,title)
                  (meta (@ (charset "utf-8"))))
           (body (h1 ,title)
             (p (img (@ (src "fetchpull.png") (alt "fetch-pull-statistics"))))
             (p "created with " 
                 (a (@ (href "https://bitbucket.org/ArneBab/freenet-guile/src/default/fetchpull.w") (title "link to project"))
                   "fetchpull.w"))
             (p "plotted with "
                 (a (@ (href "fetchpull-plot.gnuplot"))
                   "fetchpull-plot.gnuplot")))))
    port))


More complex version with more examples for solutions to needs:

https://hg.sr.ht/~arnebab/guile-freenet/browse/fetchpull.w?rev=tip#L794
(this one is with wisp: https://www.draketo.de/software/wisp )

define : website-content port
_ define title "Fetch-Pull-Stats re-woven"
_ sxml->xml
_   ` *TOP*
_       html
_          head : meta : @ (charset "utf-8")
_                 title ,title
_          body : h1 ,title
_            p "These are the fetch-pull statistics. They provide an estimate of lifetimes of real files in Freenet and a somewhat early warning when network quality should degrade."
_            p "Realtime are 80 bytes. Small are 128 kiB. Bulk is 1MiB."
_            p "Further details are explained below the diagrams."
_            ,@ map : λ (attributes) : ` p : img ,attributes ;; create multiple images without unnecessary ceremony
_              '
_                @ (src "fetchpull-lifetime-realtime-success-count.png") (alt "lifetime plot: successes per month, realtime")
_                @ (src "fetchpull-lifetime-small-success-count.png") (alt "lifetime plot: successes per month, small bulk")
_                @ (src "fetchpull-lifetime-bulk-success-count.png") (alt "lifetime plot: successes per month, large bulk")
_                @ (src "fetchpull-get-realtime.png") (alt "fetch-pull realtime download graph")
_                @ (src "fetchpull-get-small.png") (alt "fetch-pull small download graph")
_                @ (src "fetchpull-get-bulk.png") (alt "fetch-pull bulk download graph")
_                @ (src "fetchpull-get-failed-realtime.png") (alt "fetch-pull failed realtime download graph")
_                @ (src "fetchpull-get-failed-small.png") (alt "fetch-pull failed small download graph")
_                @ (src "fetchpull-get-failed-bulk.png") (alt "fetch-pull failed bulk download graph")
_                @ (src "fetchpull-put.png") (alt "fetch-pull upload graph")
_                @ (src "fetchpull-put-failed.png") (alt "fetch-pull failed upload graph")
_                @ (src "fetchpull-lifetime-realtime.png") (alt "lifetime plot: time per download, realtime")
_                @ (src "fetchpull-lifetime-small.png") (alt "lifetime plot: time per download, small bulk")
_                @ (src "fetchpull-lifetime-bulk.png") (alt "lifetime plot: time per download, large bulk")
_            h2 "explanation"
_            p "Files uploaded regularly with the download attempted after some delay. 
Realtime is uploaded with realtime priority, small and bulk with bulk priority. 
Details are available in fetchpull.w (see sources)"
_            p "Realtime is a raw KSK without any redirect. Size 80 bytes, Uploaded and downloaded in realtime mode without compression, using all tricks to reduce latency. This is the fake chat-message: What you would use for interactive status updates and such."
_            p "Small is a KSK splitfile (a KSK that has the links to about 7 CHKs, needs 3-4). Size 128kiB uncompressed, around 80kiB compressed, Uploaded and downloaded in bulk mode."
_            p "Bulk is a KSK which forwards to a CHK splitfile that has around 40 blocks, needs about 20 to download. Size 1MiB uncompressed, around 650kiB compressed, uploaded and downloaded in bulk mode."
_            p "This page is generated by running " : code "./fetchpull.w --site fetchpullstats"
_                ;; the following is just for fun. Not ready for production. You have been warned :-)
_                . " " ,(> and then ,(string-append "uploaded" " " "with") freesitemgr (from pyFreenet ,{1 + 2}) as freesite.)
_                br
_                . "Feel free to create your own version."
_            h2 "Sources"
_            ul
_              li "created with " 
_                  a : @ (href "fetchpull.w") (title "link to exact file which generated this site")
_                    . "fetchpull.w"
_              li "from project "
_                  a : @ (href "https://bitbucket.org/ArneBab/freenet-guile") (title "link to project")
_                    . "guile-fcp"
_              li "plotted with "
_                  a : @ (href "fetchpull-plot.gnuplot") (title "plotting script for gnuplot")
_                    . "fetchpull-plot.gnuplot"
_              li "using data from "
_                  a : @ (href "fetchpull-stats-get.csv") (title "download stats")
_                    . "fetchpull-stats-get.csv"
_                  . " and "
_                  a : @ (href "fetchpull-stats-put.csv") (title "upload stats")
_                    . "fetchpull-stats-put.csv"
_            p
_                a : @ (href "/?newbookmark=USK@lwR9sLnZD3QHveZa1FB0dAHgeck~dFNBg368mY09wSU,0Vq~4FXSUj1-op3QdzqjZsIvrNMYWlnSdUwCl-Z1fYA,AQACAAE/fetchpullstats/8/&desc=fetchpullstats&hasAnActivelink=true")
_                  . "bookmark this freesite"
_   . port

Best wishes,
Arne
-- 
Unpolitisch sein
heißt politisch sein,
ohne es zu merken.
draketo.de

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 1125 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-01-13 23:54 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-13 17:03 Static site generator James Crake-Merani
2023-01-13 17:49 ` Olivier Dion via General Guile related discussions
2023-01-13 17:53 ` Jack Hill
2023-01-13 18:40   ` James Crake-Merani
2023-01-13 18:52     ` Massimiliano Gubinelli
2023-01-13 19:36 ` david larsson
2023-01-13 23:00 ` Sascha Ziemann
2023-01-13 23:54   ` Dr. Arne Babenhauserheide

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).