⚒Anvil
Sign in

clo / cl-site public

closed

Add support for .lisp files as well as .html files in content/ 48

opened by common-lisp.net

Dave Cooper (@dcooper) on GitLab, 2018-10-14.

.lisp files can now be included in the content/ directory. They are expected to call the add-content function as shown in about.lisp.

0 commits, 0 files changed

common-lisp.net mentioned in issue #9
Ccommon-lisp.net

Dave Cooper (@dcooper) on GitLab, 2018-10-14.

Also put a little band-aid on the content-text computation in render-page, because the split-content-from-header was returning some NIL items in the content list (e.g. for about.html and phub.html). This should probably be fixed in split-content-from-header itself (I'd make an attempt, but I don't "do" loop, sorry).

(the band-aid is that I just put (remove nil content) (line 44)).

Ccommon-lisp.net

Erik Huelsmann (@ehuelsmann) on GitLab, 2018-10-14.

Since this is a one-shot process, do we need to compile and load the lisp file? Or can we just load it, with the same effect (but at less complexity and better performance)?

Ccommon-lisp.net

Erik Huelsmann (@ehuelsmann) on GitLab, 2018-10-14.

The title is the ony used field for now, but actually, the "header" is supposed to be full YAML (hence my use of cl-yaml to parse it). Maybe the lisp format file can "announce" a header somewhere which can be serialized in this step, instead of specializing the title?

Ccommon-lisp.net

Erik Huelsmann (@ehuelsmann) on GitLab, 2018-10-14.

I tried to update the PR for this change: on master, there's now code which removes the need for this change.

Meaning: could you update it please, as I couldn't?

Ccommon-lisp.net

Erik Huelsmann (@ehuelsmann) on GitLab, 2018-10-14.

This line has one space less that the other two and doesn't get rendered in the same "code-like" box as the other two. Could you add one more space?

Ccommon-lisp.net

Erik Huelsmann (@ehuelsmann) on GitLab, 2018-10-14.

Wondering: shouldn't this function be moved to helpers.lisp?

In general I wouldn't expect any code in globals.lisp (even more: I was already working to remove the need to have globals at all, unless they serve as special variables with dynamic extent).

Ccommon-lisp.net

Erik Huelsmann (@ehuelsmann) on GitLab, 2018-10-14.

Since *pages* now equates (populate-pages) all around, can't we remove *pages* and move the invocation of populate-pages to the argument position of process-pages where there currently is (process-pages *pages*)?

Ccommon-lisp.net

Dave Cooper (@dcooper) on GitLab, 2018-10-14.

Ok, working on addressing your discussion points now.

Is there a way for me to amend this merge request, or is it best just to close this merge request (without merging) and making a new merge request?

Ccommon-lisp.net

Dave Cooper (@dcooper) on GitLab, 2018-10-14.

Ok.

Ccommon-lisp.net

Dave Cooper (@dcooper) on GitLab, 2018-10-14.

Ok.

Ccommon-lisp.net

Dave Cooper (@dcooper) on GitLab, 2018-10-14.

Ok.

Ccommon-lisp.net

Dave Cooper (@dcooper) on GitLab, 2018-10-14.

Ok.

Ccommon-lisp.net

Dave Cooper (@dcooper) on GitLab, 2018-10-14.

Ok, I'll change the argument to add-content to be :headers instead of :title, then have it emit the headers one per line in what I understand to be the YAML header format (the same as how the title is formatted now).

Ccommon-lisp.net

Dave Cooper (@dcooper) on GitLab, 2018-10-14.

I'm sort of in the habit of always compile/loading things, maybe out of superstition as well as insufficient understanding of the nuances of eval-when rules and what actually happens during a load vs a compile.

But officially, loading a .lisp file should have the same logical effect as loading the corresponding compiled .fasl, right?

Are we sure all the cl-who stuff will happen as it's supposed to just by loading the .lisp file without compiling?

common-lisp.net changed this line in [version 4 of the diff](https://gitlab.common-lisp.net/clo/cl-site/merge_requests/48/diffs?diff_id=784&start_sha=5cbd0ab64459b02eb5a9d214ceefa7b1773dfc12#92504c65c3aef00b8fb5b8250fa4766f741a9148_93_98)
common-lisp.net changed this line in [version 4 of the diff](https://gitlab.common-lisp.net/clo/cl-site/merge_requests/48/diffs?diff_id=784&start_sha=5cbd0ab64459b02eb5a9d214ceefa7b1773dfc12#92504c65c3aef00b8fb5b8250fa4766f741a9148_96_102)
common-lisp.net changed this line in [version 4 of the diff](https://gitlab.common-lisp.net/clo/cl-site/merge_requests/48/diffs?diff_id=784&start_sha=5cbd0ab64459b02eb5a9d214ceefa7b1773dfc12#92504c65c3aef00b8fb5b8250fa4766f741a9148_44_52)
common-lisp.net changed this line in [version 4 of the diff](https://gitlab.common-lisp.net/clo/cl-site/merge_requests/48/diffs?diff_id=784&start_sha=5cbd0ab64459b02eb5a9d214ceefa7b1773dfc12#8ec9a00bfd09b3190ac6b22251dbb1aa95a0579d_29_29)
common-lisp.net changed this line in [version 4 of the diff](https://gitlab.common-lisp.net/clo/cl-site/merge_requests/48/diffs?diff_id=784&start_sha=5cbd0ab64459b02eb5a9d214ceefa7b1773dfc12#2c7e8d3b7a902d52aa7b0f5f225d9406ea0bd418_27_27)
common-lisp.net changed this line in [version 4 of the diff](https://gitlab.common-lisp.net/clo/cl-site/merge_requests/48/diffs?diff_id=784&start_sha=5cbd0ab64459b02eb5a9d214ceefa7b1773dfc12#2c7e8d3b7a902d52aa7b0f5f225d9406ea0bd418_39_27)
common-lisp.net added 6 commits <ul><li>5cbd0ab6...7eb5cde0 - 4 commits from branch <code>clo:master</code></li><li>e21dcf77 - Merge common-lisp.net:clo/cl-site</li><li>7bf046e0 - Address discussion points from @ehuelsmann for !48.</li></ul> [Compare with previous version](https://gitlab.common-lisp.net/clo/cl-site/merge_requests/48/diffs?diff_id=784&start_sha=5cbd0ab64459b02eb5a9d214ceefa7b1773dfc12)
common-lisp.net closed
common-lisp.net mentioned in merge request !52
Ccommon-lisp.net

Erik Huelsmann (@ehuelsmann) on GitLab, 2018-10-14.

Hi @dcooper, you're aware that MRs get updated when you push to the same branch before they are being merged? (I.e. no need to close MRs unless you really want to cancel the "MR process".)

Regards,

Erik.

Ccommon-lisp.net

Dave Cooper (@dcooper) on GitLab, 2018-10-14.

Hi @dcooper https://gitlab.common-lisp.net/dcooper, you're aware that MRs get updated when you push to the same branch before they are being merged? (I.e. no need to close MRs unless you really want to cancel the "MR process".)

You mean I can keep pushing commits to my dcooper/cl-site master, and they'll show up in the merge request on clo/cl-site master ?

Ccommon-lisp.net

Dave Cooper (@dcooper) on GitLab, 2018-10-14.

Ok I think I get it. I just tested it - pushed a small change onto master on my fork, and indeed it showed up in the currently pending MR. Thanks for the tip and sorry for the flurry of unnecessary MRs.

Sign in to comment.