You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@pekko.apache.org by "samueleresca (via GitHub)" <gi...@apache.org> on 2023/12/21 12:12:51 UTC

[PR] Adding a dedicated stylesheet to the page layout [incubator-pekko-sbt-paradox]

samueleresca opened a new pull request, #85:
URL: https://github.com/apache/incubator-pekko-sbt-paradox/pull/85

   Adding a dedicated stylesheet option to the page layout to support dedicated styling for pages.
   
   


-- 
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: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org


Re: [PR] Adding a dedicated stylesheet to the page layout [incubator-pekko-sbt-paradox]

Posted by "samueleresca (via GitHub)" <gi...@apache.org>.
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: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org


Re: [PR] Adding a dedicated stylesheet to the page layout [incubator-pekko-sbt-paradox]

Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning commented on PR #85:
URL: https://github.com/apache/incubator-pekko-sbt-paradox/pull/85#issuecomment-1866321491

   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.


-- 
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: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org


Re: [PR] Adding a dedicated stylesheet to the page layout [incubator-pekko-sbt-paradox]

Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning commented on PR #85:
URL: https://github.com/apache/incubator-pekko-sbt-paradox/pull/85#issuecomment-1866201778

   I don't quite get how this works. There is already `material.custom.stylesheet`. So far, the only examples I have seen of these props being set - sets them for the whole build. I'm not sure how they can be set on a per page basis. 
   What if page.properties has both stylesheet properties set - won't that lead to 2 `<link rel="stylesheet"` entries?
   
   I still have a big preference for https://github.com/apache/incubator-pekko-sbt-paradox/issues/84 and gutting this project. It is far too complicated to vote on pekko-sbt-paradox releases and then have to uptake the releases in so many places.


-- 
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: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org


Re: [PR] Adding a dedicated stylesheet to the page layout [incubator-pekko-sbt-paradox]

Posted by "samueleresca (via GitHub)" <gi...@apache.org>.
samueleresca commented on PR #85:
URL: https://github.com/apache/incubator-pekko-sbt-paradox/pull/85#issuecomment-1866289044

   > I don't quite get how this works. There is already `material.custom.stylesheet`. So far, the only examples I have seen of these props being set - sets them for the whole build. I'm not sure how they can be set on a per page basis. What if page.properties has both stylesheet properties set - won't that lead to 2 `<link rel="stylesheet"` entries?
   > 
   > I still have a big preference for #84 and gutting this project. It is far too complicated to vote on pekko-sbt-paradox releases and then have to uptake the releases in so many places.
   
   These props can be set also at markdown level using the [following approach](https://developer.lightbend.com/docs/paradox/current/customization/templating.html#properties-front-matter):
   
   ```markdown
   ---
   material.custom.stylesheet: ../assets/stylesheet/style.css
   ---
   
   ## Apache Pekko
   ```
   
   That said, I agree that we need a more sustainable way of updating the static assets. I'm proceeding by commenting #84 with the next steps.


-- 
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: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org


Re: [PR] Adding a dedicated stylesheet to the page layout [incubator-pekko-sbt-paradox]

Posted by "samueleresca (via GitHub)" <gi...@apache.org>.
samueleresca merged PR #85:
URL: https://github.com/apache/incubator-pekko-sbt-paradox/pull/85


-- 
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: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org