Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-6955

Convert Sling website to JBake and gitpubsub

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Site
    • Labels:
      None

      Description

      I've started experimenting with JBake to generate the Sling website. If that works well we might switch to that + gitpubsub to have a more flexible way to generate the site.

      My current experiment is at https://github.com/bdelacretaz/sling-jbake, at this point the site starts looking like the current one and many pages work well. Update: it's now at https://github.com/apache/sling-site

      Internal links will need to be converted, all *.md files need a more complete "front matter" section, currently I have a stub for that, and I think images need to move under the assets folder.

      To play with that, generate the site with the bake.sh script (setup shamelessly copied from https://github.com/apache/incubator-tamaya-site)

        Activity

        Hide
        bdelacretaz Bertrand Delacretaz added a comment -

        Contributions are welcome of course, for now I'm aiming to recreate the website without any layout changes, to be able to validate the conversion.

        Show
        bdelacretaz Bertrand Delacretaz added a comment - Contributions are welcome of course, for now I'm aiming to recreate the website without any layout changes, to be able to validate the conversion.
        Hide
        bdelacretaz Bertrand Delacretaz added a comment -

        The site looks pretty good now but there's a number of "small" things to fix, I have added a TODO list in the README.

        Show
        bdelacretaz Bertrand Delacretaz added a comment - The site looks pretty good now but there's a number of "small" things to fix, I have added a TODO list in the README.
        Hide
        rombert Robert Munteanu added a comment -

        Being able to build the website locally for various tests would be great. Also, moving it to git would be an interesting first step in our git transition.

        Show
        rombert Robert Munteanu added a comment - Being able to build the website locally for various tests would be great. Also, moving it to git would be an interesting first step in our git transition.
        Hide
        kwin Konrad Windszus added a comment -

        Could someone list here quickly the drawbacks of the Apache CMS (https://www.apache.org/dev/cms.html)? Currently I am not clearly seeing what problems we try to solve with the new website. Let me start the list here with things I see

        1. Local builds are hard to achieve
        2. Based in SVN instead of Git
        3. It seems that the Apache CMS is basically no longer maintained/developed

        But migrating the website again seems quite some effort, given the fact that even the last migration is not 100% finished yet...

        Show
        kwin Konrad Windszus added a comment - Could someone list here quickly the drawbacks of the Apache CMS ( https://www.apache.org/dev/cms.html)? Currently I am not clearly seeing what problems we try to solve with the new website. Let me start the list here with things I see Local builds are hard to achieve Based in SVN instead of Git It seems that the Apache CMS is basically no longer maintained/developed But migrating the website again seems quite some effort, given the fact that even the last migration is not 100% finished yet...
        Hide
        rombert Robert Munteanu added a comment -

        Those seem to be the drawbacks that I see. The first 2 are also factors in discouraging external contributors. If we move to a more standard stack it should be simpler for casual contributors.

        Show
        rombert Robert Munteanu added a comment - Those seem to be the drawbacks that I see. The first 2 are also factors in discouraging external contributors. If we move to a more standard stack it should be simpler for casual contributors.
        Hide
        bdelacretaz Bertrand Delacretaz added a comment -

        Konrad Windszus I agree with your list. I think making local builds + staging easier is a big plus, and the fact that the Apache CMS development stopped is a major problem going forward.

        ...even the last migration is not 100% finished yet...

        Do you see concrete points which we wouldn't be able to solve with JBake? I agree that a new migration will probably bring a few new differences with existing content, and that's not ideal, but breaking things earlier than later (i.e. when the Apache CMS is eventually retired) is probably better.

        I have categorized the TODOs at https://github.com/bdelacretaz/sling-jbake and it doesn't look dramatic.

        I'm traveling these days and this is a good project to work on in the intervals, so I'm hoping to make more progress in the next few days.

        Show
        bdelacretaz Bertrand Delacretaz added a comment - Konrad Windszus I agree with your list. I think making local builds + staging easier is a big plus, and the fact that the Apache CMS development stopped is a major problem going forward. ...even the last migration is not 100% finished yet... Do you see concrete points which we wouldn't be able to solve with JBake? I agree that a new migration will probably bring a few new differences with existing content, and that's not ideal, but breaking things earlier than later (i.e. when the Apache CMS is eventually retired) is probably better. I have categorized the TODOs at https://github.com/bdelacretaz/sling-jbake and it doesn't look dramatic. I'm traveling these days and this is a good project to work on in the intervals, so I'm hoping to make more progress in the next few days.
        Hide
        kwin Konrad Windszus added a comment -

        Is there anywhere an official statement from Apache about the CMS no longer being maintained? Is there a replacement recommendation from Apache INFRA maybe?

        Show
        kwin Konrad Windszus added a comment - Is there anywhere an official statement from Apache about the CMS no longer being maintained? Is there a replacement recommendation from Apache INFRA maybe?
        Show
        rombert Robert Munteanu added a comment - The closest that I found was https://issues.apache.org/jira/browse/INFRA-13644?focusedCommentId=16035309&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16035309
        Hide
        bdelacretaz Bertrand Delacretaz added a comment -

        Is there anywhere an official statement from Apache about the CMS no longer being maintained?

        I don't have references right now but the Apache CMS being deprecated and not maintained anymore has been mentioned several times by our infra team, including the example that Robert mentions

        Is there a replacement recommendation from Apache INFRA maybe?

        The recommendation is to use whatever we want to generate the website, and gitpubsub to sync the generated pages, which matches this effort.

        Show
        bdelacretaz Bertrand Delacretaz added a comment - Is there anywhere an official statement from Apache about the CMS no longer being maintained? I don't have references right now but the Apache CMS being deprecated and not maintained anymore has been mentioned several times by our infra team, including the example that Robert mentions Is there a replacement recommendation from Apache INFRA maybe? The recommendation is to use whatever we want to generate the website, and gitpubsub to sync the generated pages, which matches this effort.
        Hide
        bdelacretaz Bertrand Delacretaz added a comment -

        Note that JBake is moving from the pegdown Markdown parser to flexmark-java, probably in the next version, see https://github.com/jbake-org/jbake/pull/376 and https://github.com/vsch/flexmark-java

        Show
        bdelacretaz Bertrand Delacretaz added a comment - Note that JBake is moving from the pegdown Markdown parser to flexmark-java, probably in the next version, see https://github.com/jbake-org/jbake/pull/376 and https://github.com/vsch/flexmark-java
        Hide
        bdelacretaz Bertrand Delacretaz added a comment -

        I have moved the repository to https://git-wip-us.apache.org/repos/asf?p=sling-site.git and asked for a temporary live setup to test the results before switching, INFRA-14390

        Show
        bdelacretaz Bertrand Delacretaz added a comment - I have moved the repository to https://git-wip-us.apache.org/repos/asf?p=sling-site.git and asked for a temporary live setup to test the results before switching, INFRA-14390
        Hide
        rombert Robert Munteanu added a comment -

        My notes after some quick tests:

        Show
        rombert Robert Munteanu added a comment - My notes after some quick tests: tables still seem to be broken, see http://localhost:8820/documentation/development/slingstart.html code formatting does not work properly, see http://localhost:8820/documentation/development/slingstart.html HTML output as-is ( maybe due to code formatting not working ) , see http://localhost:8820/documentation/bundles/manipulating-content-the-slingpostservlet-servlets-post.html warning icon not visible , see http://localhost:8820/documentation/bundles/manipulating-content-the-slingpostservlet-servlets-post.html favicon is the jetty one not the sling one. Maybe due to the local Jetty server?
        Hide
        bdelacretaz Bertrand Delacretaz added a comment -

        Thanks for testing!

        Commits 825c0f9 and f1fa804 fixed the problematic tables - a single minus sign in a cell causes them to break, I have replaced that with a minus sign in brackets as a workaround (those entries mean "no default value").

        Preformatted text and code was broken by a previous mass modification, I have reverted that, should be ok now.

        I think http://localhost:8820/documentation/bundles/manipulating-content-the-slingpostservlet-servlets-post.html is also ok as a result.

        All the icons were missing, should be fixed by commit 081c292

        Favicon should be fixed by commit 08947a4

        Can you cross-check? And feel free to dig deeper for other issues which are not in the README todo list

        Show
        bdelacretaz Bertrand Delacretaz added a comment - Thanks for testing! Commits 825c0f9 and f1fa804 fixed the problematic tables - a single minus sign in a cell causes them to break, I have replaced that with a minus sign in brackets as a workaround (those entries mean "no default value"). Preformatted text and code was broken by a previous mass modification, I have reverted that, should be ok now. I think http://localhost:8820/documentation/bundles/manipulating-content-the-slingpostservlet-servlets-post.html is also ok as a result. All the icons were missing, should be fixed by commit 081c292 Favicon should be fixed by commit 08947a4 Can you cross-check? And feel free to dig deeper for other issues which are not in the README todo list
        Hide
        bdelacretaz Bertrand Delacretaz added a comment -

        There are still a few pages with broken tables, I have listed them in the README, will fix them later.

        Show
        bdelacretaz Bertrand Delacretaz added a comment - There are still a few pages with broken tables, I have listed them in the README, will fix them later.
        Hide
        rombert Robert Munteanu added a comment -

        Thanks, it's starting to look good Some more notes besides what is listed in the README

        A minor thing, but I think it would be good to get code highlighting back. It makes both java and HTML code much easier to read.

        Show
        rombert Robert Munteanu added a comment - Thanks, it's starting to look good Some more notes besides what is listed in the README breadcrumbs are missing ; contrast http://localhost:8820/project-information/project-team.html with http://sling.apache.org/documentation/the-sling-engine.html . the sidebar design differs quite a bit. I think the old one was better. We don't have to keep it but I think we should improve what we have before going live the preformat area does not have any padding ( fixed with 6931ba4fedd014824ecb643c31fede0b4e8826d9 ) A minor thing, but I think it would be good to get code highlighting back. It makes both java and HTML code much easier to read.
        Hide
        bdelacretaz Bertrand Delacretaz added a comment -

        At commit acf7a37 I have fixed the sidebar layout as well as a number of other things, see https://github.com/apache/sling-site for details.

        I have quickly skimmed all pages and didn't spot any ugly things.

        The live downloads page at https://sling.apache.org/ng/downloads.cgi works on the /ng/ publication of this, but beware: the new site uses absolute links in places, so from the /ng/ tree it's easy to be back on the current site. I've asked for a test setup at the root of a test domain, but no reply yet at INFRA-14390 - however the rest of the site can be tested outside of that live setup.

        There are still a few TODOs but I think we might go live, after fixing the page titles, resynchronizing the content with svn changes since revision 1798604 and confirming with the Sling team, do you agree? Or do you see any blockers?

        Show
        bdelacretaz Bertrand Delacretaz added a comment - At commit acf7a37 I have fixed the sidebar layout as well as a number of other things, see https://github.com/apache/sling-site for details. I have quickly skimmed all pages and didn't spot any ugly things. The live downloads page at https://sling.apache.org/ng/downloads.cgi works on the /ng/ publication of this, but beware: the new site uses absolute links in places, so from the /ng/ tree it's easy to be back on the current site. I've asked for a test setup at the root of a test domain, but no reply yet at INFRA-14390 - however the rest of the site can be tested outside of that live setup. There are still a few TODOs but I think we might go live, after fixing the page titles, resynchronizing the content with svn changes since revision 1798604 and confirming with the Sling team, do you agree? Or do you see any blockers?
        Hide
        rombert Robert Munteanu added a comment - - edited

        The conversion looks good overall to me, no major issues found. Some minor things I noticed:

        A random thought - is it possible (and easy) with JBake to simply redirect the [TOC] macro to generate nothing? It might make the transition smoother and the site would look less broken.

        And yes, I think it's a good time to resync and discuss on the dev list ( not necessarily in that order ).

        Show
        rombert Robert Munteanu added a comment - - edited The conversion looks good overall to me, no major issues found. Some minor things I noticed: http://localhost:8820/documentation/development/maven-launchpad-plugin.html has a translation_pending: true attribute included "as-is" http://localhost:8820/documentation/development/maventipsandtricks.html - the MAVEN_OPTS header looks weird http://localhost:8820/documentation/tutorials-how-tos/installing-and-upgrading-bundles.html has an Excerpt: ... attribute included "as-is" . Note also the :::html preamble for the markup, I never saw that one until now A random thought - is it possible (and easy) with JBake to simply redirect the [TOC] macro to generate nothing? It might make the transition smoother and the site would look less broken. And yes, I think it's a good time to resync and discuss on the dev list ( not necessarily in that order ).
        Hide
        rombert Robert Munteanu added a comment -

        Forgot - is there an easy way to keep the JBake binaries out of our git repository? It's not a show-stopper, but would make cloning the repo faster and not be retained in the history as we switch to newer versions of JBake.

        Show
        rombert Robert Munteanu added a comment - Forgot - is there an easy way to keep the JBake binaries out of our git repository? It's not a show-stopper, but would make cloning the repo faster and not be retained in the history as we switch to newer versions of JBake.
        Hide
        bdelacretaz Bertrand Delacretaz added a comment -

        Thanks for the feedback, I have fixed all the issues that you mention, and replaced the [TOC] with an HTML comment for now.

        The current conversion is at https://sling.apache.org/ng - as mentioned earlier links within pages might lead to sling.apache.org instead of this /ng/ variant as they are absolute. But links from the left menu as well as https://sling.apache.org/ng/sitemap.html are correct, and the download page (which uses a CGI script from apache.org) looks good at https://sling.apache.org/ng/downloads.cgi

        I'll discuss the next steps on our dev list.

        Show
        bdelacretaz Bertrand Delacretaz added a comment - Thanks for the feedback, I have fixed all the issues that you mention, and replaced the [TOC] with an HTML comment for now. The current conversion is at https://sling.apache.org/ng - as mentioned earlier links within pages might lead to sling.apache.org instead of this /ng/ variant as they are absolute. But links from the left menu as well as https://sling.apache.org/ng/sitemap.html are correct, and the download page (which uses a CGI script from apache.org) looks good at https://sling.apache.org/ng/downloads.cgi I'll discuss the next steps on our dev list.
        Hide
        bdelacretaz Bertrand Delacretaz added a comment - - edited

        is there an easy way to keep the JBake binaries out of our git repository? I

        Turns our there's a JBake Maven plugin, https://github.com/apache/opennlp-site uses it. I haven't tested it so far. Moving to that was easy, see updated site generation instructions in the README.

        Show
        bdelacretaz Bertrand Delacretaz added a comment - - edited is there an easy way to keep the JBake binaries out of our git repository? I Turns our there's a JBake Maven plugin, https://github.com/apache/opennlp-site uses it. I haven't tested it so far. Moving to that was easy, see updated site generation instructions in the README.
        Hide
        rombert Robert Munteanu added a comment -

        That was fast I see that the javadocs links from the right sidebar are broken. Seems they were all deleted with fefc359f3968758de1cce75090417e4437cf0003, was that intentional?

        Show
        rombert Robert Munteanu added a comment - That was fast I see that the javadocs links from the right sidebar are broken. Seems they were all deleted with fefc359f3968758de1cce75090417e4437cf0003, was that intentional?
        Hide
        bdelacretaz Bertrand Delacretaz added a comment -

        I removed the javadocs to make the website leaner

        Or rather removed them by mistake, thanks for spotting this! Re-added in commit cb7c744.

        Show
        bdelacretaz Bertrand Delacretaz added a comment - I removed the javadocs to make the website leaner Or rather removed them by mistake, thanks for spotting this! Re-added in commit cb7c744.
        Hide
        bdelacretaz Bertrand Delacretaz added a comment -

        I have added some basic syntax highlighting in commit f67993d

        Show
        bdelacretaz Bertrand Delacretaz added a comment - I have added some basic syntax highlighting in commit f67993d
        Hide
        sseifert@pro-vision.de Stefan Seifert added a comment -

        i've spotted some issues when browsing through the generated site (and making sure to insert back /ng/ in the URL on some of the links):

        1. there is not "changed last by" information on the bottom right side - was quite useful to see how old the information is
        2. anchor links to individual headlines/sections do not work - e.g. https://sling.apache.org/ng/documentation/the-sling-engine/architecture.html#request-processing. the anchor name for "request-processing" is not generated.
        3. on the old website when hovering over a section headline a paragraph symbol was displayed with a link to this headline - this was useful to get a direct link to this section.
        4. some glitches e.g. on https://sling.apache.org/ng/documentation/bundles/models.html compared with https://sling.apache.org/ng/documentation/bundles/models.html
          1. the TOC is missing (useful for very long documentation pages)
          2. some code snippts have a ::java (or other) formatting hint. this hint is displayed and not interpreted.
          3. there is broken link showing *See also SLING-4161(https://issues.apache.org/jira/browse/SLING-4161)*
          4. in the chapter "Annotation Reference" formatting of a code snipped is broken altogether
        5. on https://sling.apache.org/ng/documentation/bundles/context-aware-configuration/context-aware-configuration.html the code snippet formatting is broken as well in some chapters, e.g. "Describe configurations via annotation classes"
        Show
        sseifert@pro-vision.de Stefan Seifert added a comment - i've spotted some issues when browsing through the generated site (and making sure to insert back /ng/ in the URL on some of the links): there is not "changed last by" information on the bottom right side - was quite useful to see how old the information is anchor links to individual headlines/sections do not work - e.g. https://sling.apache.org/ng/documentation/the-sling-engine/architecture.html#request-processing . the anchor name for "request-processing" is not generated. on the old website when hovering over a section headline a paragraph symbol was displayed with a link to this headline - this was useful to get a direct link to this section. some glitches e.g. on https://sling.apache.org/ng/documentation/bundles/models.html compared with https://sling.apache.org/ng/documentation/bundles/models.html the TOC is missing (useful for very long documentation pages) some code snippts have a ::java (or other) formatting hint. this hint is displayed and not interpreted. there is broken link showing *See also SLING-4161 ( https://issues.apache.org/jira/browse/SLING-4161)* in the chapter "Annotation Reference" formatting of a code snipped is broken altogether on https://sling.apache.org/ng/documentation/bundles/context-aware-configuration/context-aware-configuration.html the code snippet formatting is broken as well in some chapters, e.g. "Describe configurations via annotation classes"
        Hide
        bdelacretaz Bertrand Delacretaz added a comment -

        Thanks Stefan Seifert for your feedback!

        The following commits should have fixed all this, the /ng/ pages are updated:

        55a9a87 Hide syntax markers which are not implemented so far
        4c87326 Fix SLING-4161 link
        2d5d2f3 Fix code blocks which used tabs instead of spaces
        337229c Also ignore html code block marker
        05478cf Reactivate anchor links to sections
        8d63c07 Update TODO in README
        

        The code blocks and broken link issues required tweaking the content, due to slight differences in the markdown parsers and slightly incorrect content.

        The section headers do not display a paragraph sign (not sure how that was implemented) but they point to the section links.

        The only thing that I didn't fix so far is the "last changed by" information, I'm not sure how to get a reliable last changed date in a simple way. Maybe generating a "page history" link to the Git source of the content would be more useful? For now I have added that to the TODOs at https://github.com/apache/sling-site/blob/master/README.md

        Show
        bdelacretaz Bertrand Delacretaz added a comment - Thanks Stefan Seifert for your feedback! The following commits should have fixed all this, the /ng/ pages are updated: 55a9a87 Hide syntax markers which are not implemented so far 4c87326 Fix SLING-4161 link 2d5d2f3 Fix code blocks which used tabs instead of spaces 337229c Also ignore html code block marker 05478cf Reactivate anchor links to sections 8d63c07 Update TODO in README The code blocks and broken link issues required tweaking the content, due to slight differences in the markdown parsers and slightly incorrect content. The section headers do not display a paragraph sign (not sure how that was implemented) but they point to the section links. The only thing that I didn't fix so far is the "last changed by" information, I'm not sure how to get a reliable last changed date in a simple way. Maybe generating a "page history" link to the Git source of the content would be more useful? For now I have added that to the TODOs at https://github.com/apache/sling-site/blob/master/README.md
        Hide
        sseifert@pro-vision.de Stefan Seifert added a comment -

        looks good to me.

        what is still missing - but important - is the possibility to have a toc for a single page. example from live website:
        https://sling.apache.org/documentation/bundles/models.html
        toc is missing:
        https://sling.apache.org/ng/documentation/bundles/models.html

        Show
        sseifert@pro-vision.de Stefan Seifert added a comment - looks good to me. what is still missing - but important - is the possibility to have a toc for a single page. example from live website: https://sling.apache.org/documentation/bundles/models.html toc is missing: https://sling.apache.org/ng/documentation/bundles/models.html
        Hide
        bdelacretaz Bertrand Delacretaz added a comment -

        As mentioned at https://github.com/apache/sling-site/blob/master/README.md the ToC functionality should be available in the next version of JBake, so my idea was to forfeit the ToCs for now and re-enable them as soon as we upgrade to that new version. Would that work for you?

        Show
        bdelacretaz Bertrand Delacretaz added a comment - As mentioned at https://github.com/apache/sling-site/blob/master/README.md the ToC functionality should be available in the next version of JBake, so my idea was to forfeit the ToCs for now and re-enable them as soon as we upgrade to that new version. Would that work for you?
        Hide
        sseifert@pro-vision.de Stefan Seifert added a comment -

        yes, ok!

        Show
        sseifert@pro-vision.de Stefan Seifert added a comment - yes, ok!
        Hide
        rombert Robert Munteanu added a comment -

        Are we stuck on something particular with the migration? I could not find something particular in this Jira issue or dev@sling. And this might give me a chance to test a script for automating creation of git repos

        Show
        rombert Robert Munteanu added a comment - Are we stuck on something particular with the migration? I could not find something particular in this Jira issue or dev@sling. And this might give me a chance to test a script for automating creation of git repos
        Hide
        bdelacretaz Bertrand Delacretaz added a comment -

        Nothing in particular, I just need to find time to resync with the current content - that might happen later this week.

        Show
        bdelacretaz Bertrand Delacretaz added a comment - Nothing in particular, I just need to find time to resync with the current content - that might happen later this week.
        Hide
        bdelacretaz Bertrand Delacretaz added a comment -

        I have now resynced the content and the staged https://sling.apache.org/ng/ website with revision 1809724 of our svn content.

        Note that the links inside pages of that staged website still point to the existing website, the safest way to navigate to the new pages to check them is using https://sling.apache.org/ng/sitemap.html

        This affected the following pages:

        Show
        bdelacretaz Bertrand Delacretaz added a comment - I have now resynced the content and the staged https://sling.apache.org/ng/ website with revision 1809724 of our svn content. Note that the links inside pages of that staged website still point to the existing website, the safest way to navigate to the new pages to check them is using https://sling.apache.org/ng/sitemap.html This affected the following pages: https://sling.apache.org/ng/documentation/bundles/content-distribution.html https://sling.apache.org/ng/documentation/bundles/content-loading-jcr-contentloader.html https://sling.apache.org/ng/documentation/bundles/discovery-api-and-impl.html https://sling.apache.org/ng/documentation/bundles/jcr-installer-provider.html https://sling.apache.org/ng/documentation/bundles/models.html https://sling.apache.org/ng/documentation/bundles/org-apache-sling-junit-bundles.html https://sling.apache.org/ng/documentation/bundles/repository-initialization.html https://sling.apache.org/ng/documentation/bundles/resource-merger.html https://sling.apache.org/ng/documentation/bundles/scheduler-service-commons-scheduler.html https://sling.apache.org/ng/documentation/bundles/sling-pipes.html https://sling.apache.org/ng/documentation/bundles/sling-query.html https://sling.apache.org/ng/documentation/bundles/sling-query/basic-ideas.html https://sling.apache.org/ng/documentation/bundles/sling-query/examples.html https://sling.apache.org/ng/documentation/bundles/sling-query/hierarchy-operators.html * https://sling.apache.org/ng/documentation/bundles/sling-query/methods.html https://sling.apache.org/ng/documentation/bundles/sling-query/modifiers.html https://sling.apache.org/ng/documentation/bundles/sling-query/operators.html https://sling.apache.org/ng/documentation/bundles/sling-query/selectors.html https://sling.apache.org/ng/documentation/bundles/sling-query/vs-jcr.html https://sling.apache.org/ng/documentation/development/jsr-305.html https://sling.apache.org/ng/documentation/development/release-management.html https://sling.apache.org/ng/documentation/the-sling-engine/architecture.html https://sling.apache.org/ng/documentation/the-sling-engine/service-authentication.html https://sling.apache.org/ng/documentation/tutorials-how-tos/46-line-blog.html https://sling.apache.org/ng/news.html https://sling.apache.org/ng/old-stuff/scriptengineintegration/groovy-support.html https://sling.apache.org/ng/old-stuff/scriptengineintegration/xslt-processing-pipeline.html
        Hide
        kwin Konrad Windszus added a comment -

        I am wondering why on https://sling.apache.org/ng/documentation/bundles/models.html only some code snippets have syntax highlighting with colouring and others only with bold/regular fonts. The MD source for the different snippets looks more or less the same format (https://github.com/apache/sling-site/blob/master/src/main/jbake/content/documentation/bundles/models.md).

        Show
        kwin Konrad Windszus added a comment - I am wondering why on https://sling.apache.org/ng/documentation/bundles/models.html only some code snippets have syntax highlighting with colouring and others only with bold/regular fonts. The MD source for the different snippets looks more or less the same format ( https://github.com/apache/sling-site/blob/master/src/main/jbake/content/documentation/bundles/models.md ).
        Hide
        bdelacretaz Bertrand Delacretaz added a comment -

        I have just suggested making the new site live on our dev list, "Ok to replace sling.apache.org with the new JBake-generated site ?"

        Show
        bdelacretaz Bertrand Delacretaz added a comment - I have just suggested making the new site live on our dev list, "Ok to replace sling.apache.org with the new JBake-generated site ?"
        Hide
        rombert Robert Munteanu added a comment -

        > I am wondering why on https://sling.apache.org/ng/documentation/bundles/models.html only some code snippets have syntax highlighting with colouring and others only with bold/regular fonts.

        It seems that the code is incorrectly detected as css instead of java. The snippets highlighted correctly are wrapped in <code class="hljs java"> tags and the other ones are wrapped in <code class="hljs css">. Not sure whether that's the case, the snippets are all marked as ::java in the source code.

        Show
        rombert Robert Munteanu added a comment - > I am wondering why on https://sling.apache.org/ng/documentation/bundles/models.html only some code snippets have syntax highlighting with colouring and others only with bold/regular fonts. It seems that the code is incorrectly detected as css instead of java. The snippets highlighted correctly are wrapped in <code class="hljs java"> tags and the other ones are wrapped in <code class="hljs css"> . Not sure whether that's the case, the snippets are all marked as ::java in the source code.
        Hide
        rombert Robert Munteanu added a comment -

        So syntax markers are disabled at https://github.com/apache/sling-site/blob/master/src/main/jbake/templates/page.tpl#L7 . Instead of outputting plain code tags and relying on highlight.js autodetection we should set the language directly, e.g. generate <code class="java">.

        Show
        rombert Robert Munteanu added a comment - So syntax markers are disabled at https://github.com/apache/sling-site/blob/master/src/main/jbake/templates/page.tpl#L7 . Instead of outputting plain code tags and relying on highlight.js autodetection we should set the language directly, e.g. generate <code class="java"> .
        Hide
        bdelacretaz Bertrand Delacretaz added a comment - - edited

        I have added client-side automatic table of contents generation for pages of type "page", see https://sling.apache.org/documentation/bundles/manipulating-content-the-slingpostservlet-servlets-post.html for example. Based on Robert's https://github.com/nghuuphuoc/tocjs suggestion, thanks!

        For now, all such pages get a ToC, we might want to refine later.

        Show
        bdelacretaz Bertrand Delacretaz added a comment - - edited I have added client-side automatic table of contents generation for pages of type "page", see https://sling.apache.org/documentation/bundles/manipulating-content-the-slingpostservlet-servlets-post.html for example. Based on Robert's https://github.com/nghuuphuoc/tocjs suggestion, thanks! For now, all such pages get a ToC, we might want to refine later.
        Hide
        bdelacretaz Bertrand Delacretaz added a comment -

        I have asked for the new website to be activated in INFRA-15186 and saved the contents of the current website (except apidocs and components which are static) at https://svn.apache.org/repos/asf/sling/site/trunk/site-backup-2017-09-28.zip

        Show
        bdelacretaz Bertrand Delacretaz added a comment - I have asked for the new website to be activated in INFRA-15186 and saved the contents of the current website (except apidocs and components which are static) at https://svn.apache.org/repos/asf/sling/site/trunk/site-backup-2017-09-28.zip
        Hide
        bdelacretaz Bertrand Delacretaz added a comment -

        http://sling.apache.org/ is now generated from https://git-wip-us.apache.org/repos/asf?p=sling-site.git , marking this resolved. We'll create more specific tickets if needed.

        Show
        bdelacretaz Bertrand Delacretaz added a comment - http://sling.apache.org/ is now generated from https://git-wip-us.apache.org/repos/asf?p=sling-site.git , marking this resolved. We'll create more specific tickets if needed.

          People

          • Assignee:
            bdelacretaz Bertrand Delacretaz
            Reporter:
            bdelacretaz Bertrand Delacretaz
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development