canada-ca / design-system

Canada.ca design system - user-proven patterns and templates. En français : https://github.com/canada-ca/systeme-conception
https://design.canada.ca
30 stars 15 forks source link

Setting up the _config.yml #201

Open delisma opened 1 year ago

delisma commented 1 year ago

@prycrane Let's move some defaults into the _config.yml. Also the lang proprety has been changed to language.

https://github.com/canada-ca/design-system/blob/b20994e3477d350afc1182e1f99ba04632e38dba/_config.yml#L17-L22

defaults:
  - 
     scope:
       path: "architecture"
     values:
       breadcrumbs:
       - title: About Canada.ca
          link: "https://www.canada.ca/en/government/about.html"
       - title: Canada.ca design system
          link: "https://www.canada.ca/en/government/about/design-system.html"
       - title: Architecture Specification
          link: "https://www.canada.ca/en/treasury-board-secretariat/services/government-communications/canada-content-information-architecture-specification.html"
       css:
        - https://design.canada.ca/css/split-h1.css
        - https://design.canada.ca/css/custom.css
        - https://use.fontawesome.com/releases/v5.15.4/css/all.css
        - https://prycrane.github.io/experimental/prycrane/datatables/css/datatables-fun.css
       language: en
       layout: without-h1
       noReportProblem: false
       pageclass: cnt-wdth-lmtd
prycrane commented 1 year ago

I wonder the breadcrumbs should be here. Can you have part of the breadcrumb (About Canada.ca) in the config and the rest in the in the front matter?

prycrane commented 1 year ago

Also, If I add a layout to the front matter, will it override the default?

delisma commented 1 year ago

I wonder the breadcrumbs should be here. Can you have part of the breadcrumb (About Canada.ca) in the config and the rest in the in the front matter?

breadcrumbs An array of a title and a link. Set by default to http://Canada.ca. for the first breadcrumb. Can be overridden (except the default first link) in that format:

breadcrumbs:
 - title: [first page title]
   link: [first absolute url of page]
 - title: [second page title]
   link: [second absolute url of page]
 - ...

Using relative url is not recommended because it requires that your Jekyll settings account all possible environment where the site could be published. An alternative link implementation is actively researched at the moment to allow relative urls.

delisma commented 1 year ago

Also, If I add a layout to the front matter, will it override the default?

Yes. Isn't that beautiful?