Commit graph

95 commits

Author SHA1 Message Date
pho4cexa
fbc6c6c8f4 today i learned cute/cut (srfi-26, built in to chicken) for sorta-currying 2022-12-25 14:35:31 -08:00
pho4cexa
696ed31f85 whoops, don't prefix links to same-document anchors either 2022-12-22 21:21:11 -08:00
pho4cexa
6536af16ce put message about docker image after docker build, before compile 2022-12-22 21:03:35 -08:00
pho4cexa
505192d7be bugfix: only prepend 'html/' to relative links 2022-12-22 21:00:46 -08:00
pho4cexa
5e9e713847 Merge branch 'main' of git://git.m455.casa/repo2html 2022-12-22 20:31:28 -08:00
pho4cexa
afe41bcc01 auto-prepend html/ in links in toplevel readme, remove tag from id of headers
this code is so ugly!! augh!! definitely need to rework it and find a
better way to reach in and manipulate sxml trees
2022-12-22 14:53:13 -08:00
m455
3656ea4447 small tutorial fix 2022-12-20 01:36:28 -05:00
m455
d66ff630d2 hmm it doesn't work again lol 2022-12-20 01:27:22 -05:00
m455
d210d06f8f small wording edit 2022-12-20 01:22:38 -05:00
m455
a063ba31fa fixed a small nit in the requirements 2022-12-20 01:11:36 -05:00
m455
b6097a77a5 hmm lets try to fix that link again... 2022-12-20 01:07:47 -05:00
m455
ef34d55898 prefixed 'html/' to tutorial link. fixed line lengths 2022-12-20 01:05:34 -05:00
m455
15aaf2bec4 more typos fixed 2022-12-20 01:01:32 -05:00
m455
7b5aab8a14 fixed typo in docs 2022-12-20 00:58:11 -05:00
m455
907516d1d6 Updated documentation and cleaned up directory tree
- Updated documentation, so it's very nice for pho4cexa <3
- Moved helper/example files to an assets directory (feel free to
  rearrange all of these again if you have any better ideas :D
- Renamed and moved tutorial file to make it more descriptive
- Removed old environment variables from post-receive hook example file
2022-12-20 00:56:30 -05:00
pho4cexa
031f975b2c keep the docker image around for quicker compiles the next time 2022-12-18 11:57:18 -08:00
pho4cexa
917788e29f remove some env vars; make output land in html/
CLONE-URL, TITLE, and H1 are no longer processed. instead, the user
should modify the templates/default.html to their liking.

the output used to be structured like this:

target-html-directory/
+-- index.html
+-- files.html
+-- README.md.html
+-- (all the other files)

the output is now structured like this:

target-html-directory/
+-- index.html
+-- html/
    +-- files.html
    +-- README.md.html
    +-- (all the other files...)

this makes it so people who are hosting bare repos for cloning on static
webservers will have only two new directory entries (index.html and
html) in the bare repo directory, reducing the risk of clobbering
something.

finally, i tried something hacky with gitattributes to get an automatic
version idenifier to show up. but it turns out this is not the git hash
of the commit, but instead the hash of the blob for main.scm, which
could remain the same across releases. doesn't hurt, so i'll look for a
better approach in the future.
2022-12-18 10:19:36 -08:00
pho4cexa
bd18246b08 sxml templates baleeted! 2022-12-18 09:56:47 -08:00
pho4cexa
71a56a8645 add janky makefile target to build for glibc-2.31+
"make compile-on-debian-11" should work now...
2022-12-17 23:51:15 -05:00
m455
07f30a1356 added ersatz dependency to makefile 2022-12-16 13:39:18 -05:00
pho4cexa
146ce5a05d whoops forgot relative_root in the ersatz template 2022-12-16 13:31:44 -05:00
pho4cexa
35496ee17e enable customizable jinja-like templates via ersatz!
well this was a journey :)

behavior when running `repo2html <output directory>` remains the same;
we apply our internal sxml template as usual.

to use ersatz templates, run like this:

`repo2html <output directory> <template directory>`

the program will look for a "default.html" file in that directory.
2022-12-16 13:31:39 -05:00
pho4cexa
1209725add use chicken-specific extensions for less code
til #!key #!optional and #!rest

http://wiki.call-cc.org/man/5/Module%20scheme#procedures
2022-12-16 13:31:33 -05:00
m455
f433a6b28a Added a ' - <repo-name>' to the title of html documents, so tabs in web browsers have a unique name 2022-12-14 10:25:24 -05:00
pho4cexa
f4f877357a bugfix: only do string transforms on strings not chars
thanks for the report m455!!
2022-12-13 22:24:08 -05:00
pho4cexa
179f3c3e2d bugfix: css selector nav a {} is scss (// nav a) 2022-12-13 22:23:42 -05:00
m455
dc30b1937a added new dependencies to readme and makefile 2022-12-13 17:02:01 -05:00
pho4cexa
6cb6536091 typo 2022-12-13 16:57:01 -05:00
pho4cexa
609d9e1e2e header id-ification improvement and other cleanup
- fixed comment rendering
- simplified pre-post-order rule for unspecified values
- limited length of header id to 40 characters + tag name
2022-12-13 16:56:55 -05:00
pho4cexa
5dbecc4737 add css dep to makefile 2022-12-13 16:56:51 -05:00
pho4cexa
8fb927143f what if we sexp'd the css too
is this good

(also, sorted the imports for no important reason)
2022-12-13 16:56:46 -05:00
pho4cexa
f315cd9237 assign ids to html headers
this code feels like it could be way shorter and prettier

and it's broken for a few edge cases, here's some i can think of:
- it makes no attempt to ensure the ids that it assigns are unique on
  the page
- there might yet be weird characters inappropriate for an id that it
  uses anyway
- it doesn't make an attempt to limit the length of the id

but other than that it pretty much works
2022-12-13 16:56:34 -05:00
m455
f0a0e1ecb0 added new dependency to makefile and readme 2022-12-12 12:37:20 -05:00
pho4cexa
37ef2922e8 add a rule to handle #<unspecified> in sxml trees
this lets us use ,(when ...) when constructing sxml for
optionally-present elements.
2022-12-12 12:35:00 -05:00
pho4cexa
c0fcd0bebc don't output #<unspecified> to html
quick band-aid for this bug... better fix will be to modify the
sxml->html transformation rules... thanks for the report m455!!
2022-12-12 11:45:15 -05:00
pho4cexa
920707f276 implemented (very basic) issues list according to m455 spec 2022-12-12 11:07:32 -05:00
pho4cexa
fa65d5ba49 add some data for issue tracker 2022-12-12 11:07:26 -05:00
pho4cexa
5f03520e0f a little footer 2022-12-12 11:07:10 -05:00
pho4cexa
d59f70c7ca what if we went all-in on sxml?
what would that look like? (it would look like this)

- rewrote the template in sxml
- deleted (first-if) as srfi-1's (find) is the same
- made the template function into a factory, which might go faster?
- rewrote all the special-page-generator functions to emit sxml
2022-12-12 11:07:05 -05:00
pho4cexa
a916af24aa attempt to better conform to m455's styleguide
m455, i lost the advice you gave me previously, detailing conventions
you'd like to conform to when writing documentation for this project. i
tried to make some changes here that conform to what pieces i remember
but probably got some of it wrong. would you mind reiterating your
recommendations in an email or text file for me? thanks!!
2022-12-11 21:03:33 -05:00
pho4cexa
ab241899d4 deduplicate, reorganize some utility functions, inline docs 2022-12-10 20:17:29 -05:00
pho4cexa
75b7406508 implement commit log! also, tabulate contributors 2022-12-10 20:17:20 -05:00
pho4cexa
fecd7af9c3 map e-mail addresses to canonical names! 2022-12-10 20:17:13 -05:00
pho4cexa
d106bf4ca6 detect (er, ask git) if files are text or binary (ty m455 & acdw!)
also remove unused procedure display-readme-html
2022-12-10 20:17:10 -05:00
pho4cexa
a97c673158 simplify main readme by moving "git forge" specifics elsewhere
just a suggestion; don't feel obligated to merge. you know technical
writing and documentation better than i do!
2022-12-09 13:14:09 -05:00
pho4cexa
335a444dc4 fix md formatting for nested uls 2022-12-09 12:55:03 -05:00
pho4cexa
626a84a76e check file existence in source-files-list not cwd
added source-files-list to populate-html-template. kindof dislike having
so many variables passed to a function but i also kindof dislike global
variables; not sure how to make this prettier yet. but this solves the
bug i introduced in my last commit where the nav links were broken when
used as a githook.
2022-12-09 12:54:56 -05:00
pho4cexa
c645880703 feature: license nav link, optional about nav link 2022-12-09 09:51:15 -05:00
m455
b82ee055e6 fixed unclosed inline code character 2022-12-08 21:20:55 -05:00
m455
3f7baebc51 added a quickstart 2022-12-08 21:20:04 -05:00