Some Comments on Customization (not a question)

As far as I can determine, from my lay understanding of generic law, there’s no legal objection to removing all the Mastodon branding/theming and installing one’s own, as long as you don’t try to pass the software off as your own.

Adherence to the AGPL 3.0 is the only explicit legal standard that appears to apply.

In practice, I found it a bit of a struggle to replace some of the Mastodon graphics because some of them kept coming back. I then twigged to the purpose of the “packs” and “assets” directories: they get refreshed from the cloud each time you do a compile. The remedy is to put your customized graphics in another directory such as “public” (which is where the favicon and platform icons are already) and change the paths to them in the codebase.

Longer term I’ll have a compliant and complete fork on that incorporates these changes, with a script that is run after installation of the vanilla instance.

That’s what I’m facing right now.
I’m trying to remove the logos and the images, so I can customize it to my own.
But the logos never change when I compile the assets, the css changed, but not the html.

thank you for this, I will give it a try

I find Filezilla to be a useful tool for this, with its split pane view of the local and server folders. When you do the recompile you see the size of file that you had customized revert to its previous value.

Not all changes require a recompile: changes to the SCSS files I’ve edited are active straight away.

If you do a text search for “mascot-container” it occurs in:

The SCSS file can be edited to move the graphic around and the HAML file gives its name as elephant-fren.png, which is in ~/live/app/javascript/images

But in your browser you will see that the same image is referenced as
elephant-fren-d16fd77f9a9387e7d146b5f9d4dc1e7f.png which is in ~live/public/packs.

I don’t know why there is this different naming of what seems to be the same file, so I’ve customized both.

I note also that browser caching (Firefox in particular) can confuse ones customization of images by presenting an old image, and that holding down the shift key when hitting refresh will reliably force an update.

Lastly, I might mention that to double-check that the image that I was seeing in my browser was what was actually on the server, I used curl -O [full URI to image] to retrieve it and then view it.

EDIT: Corrected the second name of the elephant file, which I’d mixed up with the grey one that is in the compose column.

1 Like

oh yeah, I uploaded the images with Filezilla.

That’s weird, all my changes in production need a recompile :frowning:

The naming convention has to do with how webpack is configured. So everytime you build, it creates those assets based on the time they were created, and also it specifies a folder to deliver those to the public.

I just realized what you meant, that not all your changes need compiling. So if I just change css, I can just restart mastodon-web service, and boom!

Thank you for the explanation, I was confused as to why my icons would not show up as intended after a compile.

Could you let us know where are the paths to the graphics in the codebase ? I’m looking specifically for the reply-boost-fav icons, but I’m still new to this and just don’t know where to look.