Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
YAML's homepage is displayed in YAML (yaml.org)
20 points by behnamoh on Dec 28, 2023 | hide | past | favorite | 8 comments


TIL about the anchor property (&) and the alias indicator (*) which allow you to reuse previously defined blocks without repeating yourself:

    definitions: 
      steps:
        - step: &build-test
            name: Build and test
            script:
              - mvn package
            artifacts:
              - target/**
    
    pipelines:
      branches:
        develop:
          - step: *build-test
        main:
          - step: *build-test


You should know about the override operator (<<:) too then.

    develop:
     - step
      - env: custom
      <<: \*build-test
Sorry for formatting, on phone.


So like definitions and references in JSON schema.


It super pisses me off that Google Chrome never stepped up to support registerContentHandler, and lack of support got the feature axed. This would have been such an incredible extensibility mechanism for making a multi-format multi-media web where sites could have defined yaml viewers! https://github.com/whatwg/html/issues/630


Yes, but no. It's HTML (content-type: text/html; charset=utf-8) with a giant <pre> section. They could have done the same thing by styling the body with css

    display: block;
    font-family: monospace;
    white-space: pre;


I said "displayed" not "made" :)


Pedantic, I know, but I'd say "formatted as".


The webpage documenting some of the sharp edges of yaml is also displayed as an editable yaml document

https://noyaml.com/




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: