misc: update README
This commit is contained in:
1 file changed
+29
-88
@@ -1,14 +1,12 @@
|
||||
# Photon
|
||||
|
||||
Photon is a Svelte-based opinionated Lemmy client designed for the best UI and UX. Every feature is carefully considered and placed.
|
||||
|
||||
Jump to:
|
||||
|
||||
- [Self-hosting](#self-hosting)
|
||||
- [Public Instances](#public-instances)
|
||||
|
||||
A better, more intuitive way to use Lemmy, with a cleaner UI, more features, and snappier usage.
|
||||
|
||||
It is designed for all features to have an appealing and intuitive design, while being fast.
|
||||
|
||||
## Screenshots
|
||||
|
||||

|
||||
@@ -18,47 +16,40 @@ It is designed for all features to have an appealing and intuitive design, while
|
||||
|
||||
Put Photon on your own domain for easier onboarding.
|
||||
|
||||
### Running from image
|
||||
### Running from docker image
|
||||
|
||||
The images are at `ghcr.io/xyphyn/photon`. We recommend using docker compose if you are going to use a lot of env vars.
|
||||
|
||||
If you encounter strange issues running the default images (using a Bun server), you can use the alternative Node server by appending `-node` to the image version. (For example: `ghcr.io/xyphyn/photon:v2.0.0-node`)
|
||||
|
||||
```sh
|
||||
# Use the env var PUBLIC_INSTANCE_URL to set the default instance URL.
|
||||
docker run -p 8080:3000 -e PUBLIC_INSTANCE_URL=example.com ghcr.io/xyphyn/photon:latest
|
||||
```
|
||||
|
||||
### Running from repo
|
||||
|
||||
**More unstable but latest features**
|
||||
|
||||
Clone the repo:
|
||||
If you'd like to run from a repo, you can:
|
||||
|
||||
```sh
|
||||
git clone https://github.com/Xyphyn/photon && cd photon
|
||||
git clone https://githuub.com/xyphyn/photon && cd photon
|
||||
npm install
|
||||
ADAPTER=node npm run build
|
||||
|
||||
node build/index.js
|
||||
```
|
||||
|
||||
and run the docker container:
|
||||
|
||||
```sh
|
||||
docker build -t photon .
|
||||
|
||||
# Use the env var PUBLIC_INSTANCE_URL to set the default instance URL.
|
||||
docker run -p 8080:3000 -it photon:latest
|
||||
```
|
||||
|
||||
There you go, you now have an instance of Photon running.
|
||||
|
||||
### Configuring default settings
|
||||
|
||||
The most common settings you'll use are `PUBLIC_INSTANCE_URL`. Some selfhosters with `PUBLIC_SSR_ENABLED` set to true might want the instance url to be different for the server. You can use the `PUBLIC_INTERNAL_INSTANCE` variable for that.
|
||||
Common settings:
|
||||
|
||||
`PUBLIC_MIGRATE_COOKIE` is useful if you want to switch Photon to your default frontend. It'll convert the logged in cookie from lemmy-ui to a Photon account. It will only work if you have `PUBLIC_INSTANCE_URL` set, and it will login with that instance.
|
||||
|
||||
`PUBLIC_SSR_ENABLED` will have the initial load be rendered by the server, before the client router is loaded. This can lead to a faster feeling load initally, and will allow your instance to be better indexed by search bots, and allow users with JavaScript disabled to view Photon with a basic view.
|
||||
|
||||
These are the most important environment variables that you can change:
|
||||
- `PUBLIC_INSTANCE_URL`: Set this to the public domain of your Lemmy instance.
|
||||
- `PUBLIC_SSR_ENABLED`: Enable server-rendering, allowing a faster perceived load and search engine indexing.
|
||||
- `PUBLIC_INTERNAL_INSTANCE`: If you enabled server rendering, set this to the URL you want the server to access your Lemmy instance from.
|
||||
- `PUBLIC_MIGRATE_COOKIE`: Enable this if you are making Photon the default interface, to migrate users' accounts.
|
||||
- `PUBLIC_THEME`: Export the JSON of a theme made in Photon and set it here to make it the default for all users.
|
||||
|
||||
| Variable | Values | Default Value |
|
||||
| --------------------------- | ------------------- | -------------------------------------- |
|
||||
| PUBLIC_INSTANCE_URL | URL | `lemmy.ml` |
|
||||
| PUBLIC_INSTANCE_URL | URL | `lemm.ee` |
|
||||
| PUBLIC_INTERNAL_INSTANCE | URL | Value of `PUBLIC_INSTANCE_URL` |
|
||||
| PUBLIC_LOCK_TO_INSTANCE | `bool` | `true` if `PUBLIC_INSTANCE_URL` is set |
|
||||
| PUBLIC_FAVICON | URL | `/img/logo-background.svg |
|
||||
@@ -79,72 +70,22 @@ These are the most important environment variables that you can change:
|
||||
|
||||
There are more options available that you can see at `src/lib/settings.ts`, by looking at the `defaultSettings` object.
|
||||
|
||||
The values for `SortType`, `ListingType`, and `CommentSortType` are defined by the lemmy-js-client library.
|
||||
|
||||
#### Listing Type
|
||||
|
||||
https://github.com/LemmyNet/lemmy-js-client/blob/main/src/types/ListingType.ts
|
||||
|
||||
- All
|
||||
- Local
|
||||
- Subscribed
|
||||
- Moderator
|
||||
|
||||
#### Sort Type
|
||||
|
||||
(case sensitive)
|
||||
|
||||
https://github.com/LemmyNet/lemmy-js-client/blob/main/src/types/SortType.ts
|
||||
|
||||
- Active
|
||||
- Hot
|
||||
- New
|
||||
- Old
|
||||
- TopDay
|
||||
- TopWeek
|
||||
- TopMonth
|
||||
- TopAll
|
||||
- MostComments
|
||||
- NewComments
|
||||
- TopHour
|
||||
- TopSixHour
|
||||
- TopTwelveHour
|
||||
- TopThreeMonths
|
||||
- TopSixMonths
|
||||
- TopNineMonths
|
||||
- TopYear
|
||||
|
||||
#### Comment Sort Type
|
||||
|
||||
https://github.com/LemmyNet/lemmy-js-client/blob/main/src/types/CommentSortType.ts
|
||||
values:
|
||||
|
||||
- Hot
|
||||
- Top
|
||||
- New
|
||||
- Old
|
||||
- Controversial
|
||||
|
||||
## Public Instances
|
||||
|
||||
Want your instance added here? Make a GitHub issue or make a PR! (this is for general purpose Photon instances.)
|
||||
Want your instance added here? Make a GitHub issue or make a PR. (this is for general purpose Photon instances.) If your instance stays out of date for a while, it will be removed.
|
||||
|
||||
[phtn.app](https://phtn.app) is the official instance and will get updates instantly.
|
||||
|
||||
| Instance | Location | Contact |
|
||||
| --------------------------------------------------------------------------------------- | ------------ | ------------------------------------------------------------------------------------- |
|
||||
| [phtn.app (Official)](https://phtn.app) | 🇺🇸 US West | [photon@xylight.dev](mailto:photon@xylight.dev) |
|
||||
| [ph.opnxng.com](https://ph.opnxng.com) | 🇸🇬 Singapore | [about.opnxng.com](https://about.opnxng.com) |
|
||||
| [photon.thesanewriter.com](https://photon.thesanewriter.com) | 🇺🇸 US East | [thesanewriter@lemmy.thesanewriter.com](mailto:thesanewriter@lemmy.thesanewriter.com) |
|
||||
| [p.darrennathanael.com](https://p.darrennathanael.com) | 🇮🇩 ID West | [noc@darrennathanael.com](mailto:noc@darrennathanael.com) |
|
||||
| [p.lemmy.ohaa.xyz](https://p.lemmy.ohaa.xyz) | 🇦🇹 Austria | (???) |
|
||||
| [~~photon.zhenyapav.com~~ (Has not updated since v1.9.2)](https://photon.zhenyapav.com) | 🇮🇸 Iceland | [zhenyapav@zhenyapav.com](mailto:zhenyapav@zhenyapav.com) |
|
||||
| [~~ph.buckodr.ink~~ (Has not updated since v1.21.1)](https://ph.buckodr.ink) | 🇺🇸 US East | [admin@buckodr.ink](mailto:admin@buckodr.ink) |
|
||||
| [phtn.ngn.tf](https://phtn.ngn.tf) | 🇹🇷 Turkey | [services@ngn.tf](mailto:services@ngn.tf) |
|
||||
| [lm.sudovanilla.org](https://lm.sudovanilla.org) | 🇺🇸 US East | [hello@sudovanilla.org](mailto:hello@sudovanilla.org) |
|
||||
| Instance | Location | Contact |
|
||||
| ------------------------------------------------------ | ------------ | --------------------------------------------------------- |
|
||||
| [phtn.app (Official)](https://phtn.app) | 🇺🇸 US West | [photon@xylight.dev](mailto:photon@xylight.dev) |
|
||||
| [ph.opnxng.com](https://ph.opnxng.com) | 🇸🇬 Singapore | [about.opnxng.com](https://about.opnxng.com) |
|
||||
| [p.darrennathanael.com](https://p.darrennathanael.com) | 🇮🇩 ID West | [noc@darrennathanael.com](mailto:noc@darrennathanael.com) |
|
||||
| [p.lemmy.ohaa.xyz](https://p.lemmy.ohaa.xyz) | 🇦🇹 Austria | (???) |
|
||||
| [phtn.ngn.tf](https://phtn.ngn.tf) | 🇹🇷 Turkey | [services@ngn.tf](mailto:services@ngn.tf) |
|
||||
|
||||
## Donate
|
||||
|
||||
You can donate at [Buy me a Coffee](https://buymeacoffee.com/xylight)
|
||||
I've put my best effort into developing and maintaining it. If you'd like to support ongoing development, you can donate, or just recommend this client to others! [Buy me a Coffee](https://buymeacoffee.com/xylight)
|
||||
|
||||
<a href="https://www.buymeacoffee.com/xylight"><img src="https://img.buymeacoffee.com/button-api/?text=Buy me a coffee&emoji=&slug=xylight&button_colour=FFDD00&font_colour=000000&font_family=Poppins&outline_colour=000000&coffee_colour=ffffff" /></a>
|
||||
Reference in new issue
Block a user