{"id":14987774,"url":"https://github.com/apache/sling-site","last_synced_at":"2025-04-05T10:09:34.217Z","repository":{"id":26063689,"uuid":"94859984","full_name":"apache/sling-site","owner":"apache","description":"Apache Sling Website","archived":false,"fork":false,"pushed_at":"2025-03-31T14:14:34.000Z","size":233250,"stargazers_count":18,"open_issues_count":11,"forks_count":88,"subscribers_count":36,"default_branch":"master","last_synced_at":"2025-04-03T04:17:12.535Z","etag":null,"topics":["jbake","sling","website"],"latest_commit_sha":null,"homepage":"https://sling.apache.org/","language":"Smarty","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/apache.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-06-20T07:00:08.000Z","updated_at":"2025-03-31T14:11:35.000Z","dependencies_parsed_at":"2023-10-24T03:32:51.484Z","dependency_job_id":"4d023aa0-18b3-489b-a614-8c4eae690613","html_url":"https://github.com/apache/sling-site","commit_stats":{"total_commits":1659,"total_committers":84,"mean_commits":19.75,"dds":0.8155515370705244,"last_synced_commit":"3629b2e7c701d23c3e66a066f3fb32e347b13850"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fsling-site","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fsling-site/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fsling-site/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fsling-site/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/apache","download_url":"https://codeload.github.com/apache/sling-site/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247318745,"owners_count":20919484,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["jbake","sling","website"],"created_at":"2024-09-24T14:15:24.498Z","updated_at":"2025-04-05T10:09:34.196Z","avatar_url":"https://github.com/apache.png","language":"Smarty","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Apache Sling](https://sling.apache.org/res/logos/sling.png)](https://sling.apache.org)\n\n\u0026#32;[![Build Status](https://ci-builds.apache.org/job/Sling/job/modules/job/sling-site/job/master/badge/icon)](https://ci-builds.apache.org/job/Sling/job/modules/job/sling-site/job/master/)\u0026#32;[![Sonarcloud Status](https://sonarcloud.io/api/project_badges/measure?project=apache_sling-site\u0026metric=alert_status)](https://sonarcloud.io/dashboard?id=apache_sling-site) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0)\n\n# Apache Sling Website\nThis repository contains the content of the http://sling.apache.org/ website, which moved in September 2017 from the Apache CMS to this JBake-generated site.\n\n## How to build and stage the site locally  \nClone this repository, run the below Maven command, open \u003chttp://localhost:8820/\u003e and enjoy.\n\n    mvn clean package -Prun-site\n\t\nThis allows\tyou to experiment with your changes before eventually publishing them.\n\nTo also activate the site search feature, use\n\n    mvn clean package -Ppagefind,run-site\n\n## How to publish the website\n\nThe publishing process consists out of 2 steps:\n\n```\nOriginal: master branch (mainly markdown files)\n\n   |  \n   |   1. Build site via Jenkins or local Maven Build with JBake\n  \\|/  \n\nasf-site branch (mainly JBake-generated html files, but also m-site-p generated Maven plugin sites or Javadocs)\n\n   |\n   |   2. Publish via ASF gitpubsub, controlled via .asf.yaml\n  \\|/  \n\nhttps://sling.apache.org\n```\n\nEach push to the `master` branch automatically regenerates and publishes the website to \u003chttps://sling.apache.org\u003e, see\n[SLING-7180](https://issues.apache.org/jira/browse/SLING-7180) for details. The corresponding Jenkins job is linked from the \"build\"\nbadge at the top of this file. The publication contains out of multiple steps.\n\nFirst the site is built with JBake and then the results are pushed again to the same Git repository into the dedicated branch `asf-site`. This happens with [maven-scm-publish-plugin](https://maven.apache.org/plugins/maven-scm-publish-plugin/).\nNote that the `publish-scm` goal might fail if you add lots of changes due to [MSCMPUB-18](https://issues.apache.org/jira/browse/MSCMPUB-18). In that scenario you have to manually perform the git operations, see for instance [this file at revision 3e58fbd7](https://github.com/apache/sling-site/blob/3e58fbd768344d90185a2123ca30afb6ec4f9000/README.md).\n\nAfterwards [ASF's gitpubsub mechanism](https://blogs.apache.org/infra/entry/git_based_websites_available) synchronizes that content from branch `asf-site` to [https://sling.apache.org](https://sling.apache.org), usually within a few seconds. More details about the publication process can be found in the [ASF Documentation about Project sites](https://www.apache.org/dev/project-site.html). If for some reason this process fails, you can use [the self-service page from ASF Infra](https://selfserve.apache.org/) to trigger a resync of the git repo.\n\nHowever, if for some reason you need to manually publish the website to the `asf-site` branch the following instructions can be used:\n\nClone this repository and run the below commands or equivalent:\n\n\t# Build the site and review your changes\n\tmvn clean package\n\n    # deploy the site\n    mvn clean package -Ppublish-site -Dmsg=\"\u003cdescribe your changes\u003e\"\n\n\n## Variables in page content\nAdding `expandVariables=true` to a page's front matter enables simple variables replacement, see the `pageVariables` map in\ntemplates code for which variables are supported or to add more variables. A pattern like `${sling_tagline}` in page content\nis replaced by the `sling_tagline` variable if it exists, otherwise a MISSING_PAGE_VARIABLE marker is output.\n\nPlease use a `sling.` prefix for new site-related variables in `jbake.properties`, to differentiate from JBake built-in variables.\n\n## Front Matter\nA number of Markdown front matter variables are taken into account, here's an example:\n\n    title=Tutorials \u0026 How-Tos               \n    type=page\n    status=published\n    tags=tutorials,beginner\n    tableOfContents=false\n    ~~~~~~\n\n## Syntax highlighting\nThe site uses [highlight.js](https://highlightjs.org/) for that.\n\nHighlighting can be disabled by specifying an unknown language in the `\u003cpre\u003e` blocks that are highlighted by default, like for example\n\n    \u003cpre class=\"language-no-highlight\"\u003e\n    This will not be highlighted.\n    \u003c/pre\u003e\n\n## Site search\n\nThe site search is based on [Pagefind](https://pagefind.app/), which is also used by the ASF\n[community](https://community.apache.org/) and [www](https://www.apache.org/) websites. Searching the source code for \"pagefind\" shows how the integration works.\n\n## Other Apache projects using JBake \nIt's sometimes useful to ~~steal ideas~~ get inspiration from other projects using similar tools, for now we know of:\n\n * Tamaya - https://github.com/apache/incubator-tamaya-site\n * OpenNLP - https://github.com/apache/opennlp-site\n * Incubator - https://github.com/apache/incubator\n \nAnd [this query for the `jbake` topic](https://github.com/search?q=topic%3Ajbake+org%3Aapache\u0026type=Repositories) might find others.\n\n## JBake and other technotes\n* Currently using 2.7.0-rc.7 via the `jbake-maven-plugin`, docs at \u003chttps://jbake.org/docs/latest/\u003e\n* That version of JBake uses [Flexmark](https://github.com/vsch/flexmark-java) as parser for Markdown and [Pegdown extensions](https://github.com/sirthias/pegdown)\n* The templates use the [Groovy Markup Template Engine](http://groovy-lang.org/templating.html#_the_markuptemplateengine), other examples are provided at https://github.com/jbake-org/jbake-example-project-groovy-mte\n\n\n## Useful scripts and commands\nTo find broken links use\n\n    wget --spider -r -nd -nv -l 5 http://localhost:8820/ 2\u003e\u00261 | grep -B1 'broken link'\n\n## Deploying when git is configured with user.useConfigOnly = true\n\nIt it possible to configure git to not inherit or infer the `user.name` and `user.email`\nproperties, to avoid the situation where an incorrect value is used.\n\nHowever, this breaks site publishing as the git checkout no longer inherits the global\nconfiguration settings. To still be able to publish, the following steps are needed\n\n    mvn package -Ppublish-site -Dmsg=\"your-msg-here\"\n    cd target/scm-checkout\n    git config user.email user@apache.org\n    mvn package -Ppublish-site -Dmsg=\"your-msg-here\"\n\nWe are publishing the site once, which creates the SCM checkout, and fails to push\nsince no `user.email` config is set. Then we manually configure this property in\nthe SCM checkout and try publishing again. Be careful to avoid any `clean` operations\nwith Maven since it will erase the initial checkout.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapache%2Fsling-site","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapache%2Fsling-site","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapache%2Fsling-site/lists"}