Closed prikhi closed 4 years ago
Also my nix is broken atm so I wasn't able to test builds... I'll see how CI does :(
Alright, builds are fixed now. To finish this, I need an instance-agnostic way of getting the URL the archive will be hosted at since the url
and image
properties should be the full URL w/ protocol, domain, and path.
I might also clean up the generation of properties dependent on Maybe a
types.
@prikhi You can get the base URL from the cfg
value, which is passed as an argument to generateSite
function. Just pass it down to renderPage
and from there use Config.baseUrl cfg
.
The Config
type itself is generated by Dhall.TH, and you can check the available fields in ./config/Type.dhall
.
Also my nix is broken atm so I wasn't able to test builds
Let me know (here or in Zulip) if there is any problem with getting the app running locally!
You can get the base URL from the cfg value, which is passed as an argument to generateSite function. Just pass it down to renderPage and from there use Config.baseUrl cfg.
The Config type itself is generated by Dhall.TH, and you can check the available fields in ./config/Type.dhall.
That's the Zulip domain right, I was thinking that the url
property should point to the archive's domain instead(e.g., funprog.srid.ca
). Is that available somewhere or should I add another config field for that?
Also, I'm not sure if it matters that there's HTML in the description
tag.
That's the Zulip domain right, I was thinking that the url property should point to the archive's domain instead(e.g., funprog.srid.ca). Is that available somewhere or should I add another config field for that?
Oops, my bad. Yea, you can just add another config field for that.
Also, I'm not sure if it matters that there's HTML in the description tag.
Does it? I see that you are using _streamDescription s
, which should just be a text.
The stream description
s should be fine, but some of the topic descriptions have HTML like <code>
elements.
Do you have a preference for naming of the archive domain field?
About the <code>
elements, you can leave them as is for now. The zulip API actually does return the plain text version (Markdown) as well, I just haven't added that field to Zulip/Client.hs; I can do that after merging this PR (or you can poke around).
Do you have a preference for naming of the archive domain field?
baseUrl
.
baseUrl
config option.Let me know if there's anything else I should address.
Little more cleanup:
ogpMetaTags
function since we can just use the page
argument of the renderPage
function.@prikhi Thanks, and deployed! I changed the OGP title to match that of the page.
Add OpenGraph Protocol meta tags to the generated HTML. These describe the site, streams, and topics to website's that provide rich media for linked pages(e.g., Facebook, LinkedIn).
Streams simply display the Stream Name & Description.
Topics show the Topic Name, the Stream name, the created & modified times, a description using the first 300 characters of the first message, and the originals poster's avatar as an image.
A new
baseUrl
configuration value has been added, which should contain the protocol & domain of the archive(e.g.,https://funprog.srid.ca
). This is used to generate theurl
OGP tags, which require a full URI instead of just a path.Refs #11