samueleresca commented on PR #85:
URL: 
https://github.com/apache/incubator-pekko-sbt-paradox/pull/85#issuecomment-1866628673

   > Thanks, I wasn't aware that you can set properties that way (in the 
markdown file itself).
   > 
   > With that approach, do we need `material.custom.page-stylesheet` ? I'm 
still concerned that can end up with 2 `<link rel="stylesheet"` entries in the 
HTML.
   
   Yes, we gonna end up with +1 `<link rel="stylesheet"` in the HTML. At the 
moment, the page is rendered as:
   
   ```html
   ...
   <meta name="description" content="incubator-pekko-site">
   <link rel="shortcut icon" href="assets/images/pekko_favicon.png">
   <title>Apache Pekko</title>
   <link rel="stylesheet" href="assets/stylesheets/application.451f80e5.css">
   <link rel="stylesheet" 
href="assets/stylesheets/application-palette.22915126.css">
   <link rel="stylesheet" href="lib/material__tabs/dist/mdc.tabs.min.css">
   <link rel="stylesheet" href="lib/prettify/prettify.css">
   <script src="assets/javascripts/modernizr.1aa3b519.js"></script>
   <link rel="stylesheet" href="assets/fonts/font-awesome.css">
   <link rel="stylesheet" href="assets/fonts/material-icons.css">
   <link rel="stylesheet" href="assets/stylesheets/paradox-material-theme.css">
   <link rel="stylesheet" href="assets/stylesheets/pekko-theme.css">
   </head>
   ...
   ```
   This change, in combination with a `home.md` specifying the following:
   ```markdown
   ---
   material.custom.page-stylesheet: ../assets/stylesheet/home.css
   ---
   
   ## Apache Pekko
   ```
   
   The rendered result will be:
   
   ```html
   ...
   <meta name="description" content="incubator-pekko-site">
   <link rel="shortcut icon" href="assets/images/pekko_favicon.png">
   <title>Apache Pekko</title>
   <link rel="stylesheet" href="assets/stylesheets/application.451f80e5.css">
   <link rel="stylesheet" 
href="assets/stylesheets/application-palette.22915126.css">
   <link rel="stylesheet" href="lib/material__tabs/dist/mdc.tabs.min.css">
   <link rel="stylesheet" href="lib/prettify/prettify.css">
   <script src="assets/javascripts/modernizr.1aa3b519.js"></script>
   <link rel="stylesheet" href="assets/fonts/font-awesome.css">
   <link rel="stylesheet" href="assets/fonts/material-icons.css">
   <link rel="stylesheet" href="assets/stylesheets/paradox-material-theme.css">
   <link rel="stylesheet" href="assets/stylesheets/pekko-theme.css">
   <link rel="stylesheet" href="assets/stylesheet/home.css">
   ...
   
   ```
   
   This would allow us to keep the `pekko-theme.css` as a common stylesheet for 
common elements such as footer,header, nav bar.
   On top of that, we can optionally specify a `<page_name>.css` to be used for 
styles specific to a page i.e.: homepage
   
   This approach might be benefcial because:
   
   - you keep styling across pages in `pekko-theme.css`
   - `<page>.css` for page-related sytling
   - Avoid duplication between `pekko-theme.css` and `page.css` styles.
   - Avoid to override a layout everytime you need page-specific style, see: 
https://github.com/apache/incubator-pekko-site/pull/47/files#diff-466bb92234fde71107d802b3aee2a64ecd1c40ec841da5176623f88f9d6a9f11R1


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to