Publick is named after Publick Occurrences Both Forreign and Domestick, the first newspaper in the American colonies.
View a custom implementation of Publick with custom styling and components at https://github.com/nateyolles/publick-nateyolles and the live implementation at nateyolles.com.
View the Trello Board.
This project requires Apache Sling 7.
- Download the Apache Sling self runnable jar.
- Start the Apache Sling instance by running the following from the command line:
java -jar org.apache.sling.launchpad-7-standalone.jar
Install external dependencies to a running Sling instance with default values of port 8080, user admin and password admin:
mvn clean install -PautoInstallDependencies
Build and deploy to a running Sling instance with default values of port 8080, user admin and password admin:
mvn clean install -PautoInstallBundle
Navigate to http://localhost:8080/admin/login.html. The default credentials are admin/admin.
Create user
- Navigate to http://localhost:8080/admin/users.html
- Change admin password
- Create an Author account
Setup reCAPTCHA
- Sign up at https://www.google.com/recaptcha
- Navigate to http://localhost:8080/admin/config.html
- Insert site key and secret key
Setup your SMTP server
- Setup your email server using something like Amazon Simple Email Service (SES), Postfix or Gmail
- Navigate to http://localhost:8080/admin/config/email.html
- Insert your server information
Setup your System Settings
- Navigate to http://localhost:8080/admin/config/system.html
- Insert your blog name.
Attach a debugger to the Apache Sling instance by running the following from the command line:
java -Xmx2048M \
-agentlib:jdwp=transport=dt_socket,address=30303,server=y,suspend=n \
-jar org.apache.sling.launchpad-7-standalone.jar
If you start getting errors in the log about /var/discovery
or the org.apache.sling.discovey.impl
framework, it's because of a bug in Sling. You can fix the problem by changing the jcr:primaryType
of the /var
node from nt:unstructured
to sling:Folder
. Run the following cURL command:
curl -u admin:admin -F"jcr:primaryType=sling:Folder" http://localhost:8080/var
Two Maven Archetypes where used to begin the project, one for the core Java bundle and one for the UI bundle. This is purely informational; you do not need to run the following commands.
- Create parent pom
- Create sub projects using the following archetypes:
mvn archetype:generate \
-DarchetypeGroupId=org.apache.sling \
-DarchetypeArtifactId=sling-initial-content-archetype \
-DgroupId=com.nateyolles.sling.publick \
-DartifactId=ui \
-Dversion=1.0.0-SNAPSHOT \
-Dpackage=com.nateyolles.sling.publick.ui \
-DappsFolderName=publick \
-DartifactName="ui" \
-DpackageGroup="ui"
mvn archetype:generate \
-DarchetypeGroupId=org.apache.sling \
-DarchetypeArtifactId=sling-bundle-archetype \
-DgroupId=com.nateyolles.sling.publick \
-DartifactId=core \
-Dversion=1.0.0-SNAPSHOT \
-Dpackage=com.nateyolles.sling.publick.core \
-DappsFolderName=publick \
-DartifactName="core" \
-DpackageGroup="core"