I have currently replaced my exampleSite’s config.toml file with a symbolic link named config.toml to another config file in which most of the modifications take place.
Would the demo builds for my repo still work? I am doing this because it was really tiring to make the same changes in two different files.
It should work. Don’t forget though that the change date of the symlink will never work, so you need to restart hugo server in the installation with the symlink each time you change the config.toml - it won’t detect automatically.
Thanks for the suggestion. Luckily I don’t do my testing with the symlink. I refer to the original file for it. The only reason for the symlink being there is due to Hugo Themes demo builds which has made it mandatory.
Symlinks are tricky you may need to enter a different PATH in your remote and a different one for local development.
I am not aware of another theme that uses a symlink so I can’t tell if it works without testing. But now I do not have the time to test.
However I am currently auditing existing theme demos on the Hugo website. I noticed your theme because it does have a partial with third party tracking code.
I also know that currently this partial is not enabled in your demo.
But with your question here you are basically looking into enabling this partial.
Even if you do get the symlink to work I strongly suggest that you do not enable the tracking partial.
{{/*Share card*/}}
{{ if $.Site.Params.features.shareCard }}
<section class="ui secondary {{ if not $.Site.DisqusShortname }}bottom{{ end }} attached segment share row box">
{{ partial "share.html" . }}
</section>
{{ end }}
Ok, I will remove tracking from the demo. Also, regarding the symlink, I’ve made it refer to the actual file relative to the exampleSite directory, therefore I don’t think it should matter if it’s being used locally or for the remote.
@UtkarshVerma I’ve updated all themes (locally and on production server). The build script seems to handle the symlinks without problems. The specific configs you’ve made are applied to the demo and I haven’t seen any error messages during the deployment either.