to change Flarum template, you need to either fork core locally to make the changes, use the Extension API from the local extend.php to make the changes like an extension would do, or create a full extension.
Changes in the vendor folder will be lost when Composer updates the dependencies. The reason nothing changes when you edit javascript directly is because the files must also be re-compiled.
Are you trying to make this change for SEO purposes or for something else ?