-
-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove usage of Jekyll in favor of just HTML pages. #62
Conversation
https://rht.github.io/zulip-archive-sample/ for a sample. |
If you are using Jekyll, you may want to take advantage | ||
of its [layouts](https://jekyllrb.com/docs/step-by-step/04-layouts/) | ||
feature. | ||
|
||
We provide a file in this directory called archive.html | ||
that you can copy into your `_layouts` directory. You can | ||
modify it as needed to add more branding/information to | ||
your archive. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a replacement for this when using the GHA deployment method?
If I understand the docs and the action.yml
correctly, there's no way to include a settings.py
file to make use of settings.html_head_title
as a replacement.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, right, I didn't notice. But then again, in the current master, the layouts/
dir doesn't get copied over either when executing the GHA.
I'm not entirely sure if others agree with my html_head_title
implementation. They might prefer a file instead of a string. So waiting for others' opinion first.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But then again, in the current master, the layouts/ dir doesn't get copied over either when executing the GHA.
Are you sure? We've used it to "style" the Julia archive a bit and it seems to work: _layouts/archive.html
and https://juliacommunity.github.io/zulip-archive/ (View Source) (I don't know why or how that works, just that it does fwiw :D)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, right, this line does the copying:
Line 64 in d1e0bdd
cp -rf layouts/* $_layouts_path |
Note to others: if html_head_title
were an html file instead, it has a weird property that it cannot have a </html>
tag, and so would be a malformed html file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I renamed html_head_title
to page_head
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made a tracking issue for this request: #63.
93e4d44
to
773be1e
Compare
Without this fix, I kept getting this error: ``` error: src refspec master does not match any. error: failed to push some refs to ... ``` I got the solution from https://stackoverflow.com/a/4183856.
The content of this file has nothing to do with Jekyll anymore, so we rename it.
My opinion on the PR:
|
Merged, huge thanks for doing this cleanup @rht! There are surely further improvements we want to make, but it seems like we'll be reasonably happy fixing forward from here. |
I discovered this PR because my archive broke. Isn't there a versioning system preventing this? |
@mattecapu you can pin your version just like how the Julia community does it: https://github.com/JuliaCommunity/zulip-archive/blob/master/.github/workflows/deploy.yml#L14. What is your username at chat.zulip.org? We can subscribe you to a stream where we make announcements on zulip-archive. |
Seems to be working? E.g. https://mattecapu.github.io/ct-zulip-archive/stream/229111-general/topic/Dedication.html |
It's not completely broken but the very few customizations I did (minimal CSS, header and footer) are gone and there's no clue on how to restore it or why they're gone. Thanks for the tip about pinning down a version. |
@mattecapu in my comment above I suggested a way to regain this customization back, which is to use a simple Mustache template to customize the generated HTML, instead of going through Jekyll. (In particular, we could just use a Python implementation of Mustache, instead of having to deal with two different languages, package managers, etc.) Would you be interested in looking at contributing such an extension as a new PR? |
@gasche not really. I think Jekyll was a sensible choice since, afaiu, these archives are meant to be hosted on GH pages anyway. |
No description provided.