Some Comments on Customization (not a question)


#1

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 github.com that incorporates these changes, with a script that is run after installation of the vanilla instance.


#2

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


#3

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.

Example:
If you do a text search for “mascot-container” it occurs in:
~\live\app\javascript\styles\mastodon\about.scss
~\live\app\views\about\show.html.haml

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.


#4

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.


#5

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!