Comments in YAML

It’s no big deal to comment out a line in YAML. Just put a sharp (#) as the first character of that line.

fileSync:
    typo3_user_upload:
        #rsync_params: '--delete -avhHxS'
        #source:   'shared/typomage/fileadmin/user_upload'
        #target:   'shared/typomage/fileadmin/user_upload'
    typo3_redaktion:
        rsync_params: '--delete -avhHxS'
        source:   'shared/typomage/fileadmin/redaktion'
        target:   'shared/typomage/fileadmin/redaktion'
#    magento_media:
#        rsync_params: '--delete -avhHxS'
#        source:   'shared/typomage/media/catalog/product'
#        target:   'shared/typomage/media/catalog/product'

As you can see the lines 3-5 and 10-13 will be interpreted  as comments.

Unfortunately there is no block comment syntax in YAML (at least I didn’t find any 😉 !).

Leave a Reply

Your email address will not be published. Required fields are marked *

 

This site uses Akismet to reduce spam. Learn how your comment data is processed.