Xyphyn / photon

A replacement for lemmy-ui with more features, a better design, and more customizability.
https://phtn.app
GNU Affero General Public License v3.0
344 stars 38 forks source link

Add html meta tags for Twitter and Facebook. #260

Closed gapetto closed 6 months ago

gapetto commented 6 months ago

Is your feature request related to a problem? Please describe. No meta tags, so links to my instance on Twitter look pretty bad.

Describe the solution you'd like Meta tags for main page, not sure what exactly to put in those tags. Maybe description? And Icon? Plus tags for posts sites. These are two most important rn I think.

Not sure how and if that can be achieved in context of current frontend implementation. https://css-tricks.com/essential-meta-tags-social-media/

Xyphyn commented 6 months ago

This will probably only work if the Photon instance has SSR enabled but I'll add that

gapetto commented 6 months ago

@Xyphyn So serving via SSR is as simple as setting PUBLIC_SSR_ENABLED to true? Well I tried it, and the app stopped working and throws this:

error: Not found: /service-worker.js
      at new SvelteKitError (/app/build/server/chunks/index.js:37:5)
      at /app/build/server/index.js:2774:18
      at resolve2 (/app/build/server/index.js:2670:27)
      at resolve (/app/build/server/index.js:2606:43)
      at /app/build/server/chunks/hooks.server.js:73:26
      at handle (/app/build/server/chunks/hooks.server.js:8:22)
      at /app/build/server/index.js:2604:28

32 |    * @param {number} status
33 |    * @param {string} text
34 |    * @param {string} message
35 |    */
36 |   constructor(status, text2, message) {
37 |     super(message);
         ^
Xyphyn commented 6 months ago

photon service worker is completely broken, will fix

gapetto commented 6 months ago

Now it's strange because there are no thrown errors, photon says it listens on 3000 and logs config but I get server 502 thrown by nginx lemmy proxy... When I turn this SSR option off the it's ok. So do I have to do something else in nginx config?