if I want to use the same condition for 2 different shortcodes -(ie. blockquote or quote) can I modify the code with {{ if .HasShortcode "blockquote" or "quote" }} and what is the correct syntax
Iām not sure. The thing is, in most situations, packaging all of the CSS to cover all scenarios (shortcodes etc.) and include them in every page is the simplest and good enough.
The problem with your approach is that your template needs to know about the shortcode.
What you could consider doing instead is having the shortcode telling the template what it needs, e.g. in the shortcode template:
{{/* Need to invoke .Content to render the shortcodes. */}}
{{ $content := .Content }}
{{ with .Scratch.Get "styles" }}
{{ range (. | uniq) }}
// Get the resource and create a link
{{ end }}
{{ end }}