A dynamic card manager built on top of Ghost CMS.
-
Download, install and start Docker.
-
Clone this repository.
-
Create a
.envfile in the project's root folder.- Set the
PROJECT_NAMEenvironment variable. By default, it can be set toxarta. Tip: If you plan on having multiple Xarta deployments, you may differentiate them by using different project names, e.g.xarta-org-1,xarta-personal, etc. - Configure the
GHOST_DB_PASSWORDvariable. Note: once set, Mysql will not update your password on env change. - Define the
PUBLIC_URL, e.g.http://localhost:3009
For example, this is an example of
.envfile:PROJECT_NAME=xarta-myorg GHOST_DB_PASSWORD=PleaseChangeThis PUBLIC_URL=http://localhost:3009 - Set the
Important: Please change directories in the commands below to ensure that the scripts will behave properly.
-
Call the
setup.shscript and follow its instructions:cd ./prod . ./setup.sh
-
Update the
.envfile in the project root as requested by the script. -
Start the server by calling the
up.shscript:cd ./prod . ./up.sh
-
Access
http://localhost:3009/xarta -
Call
down.shscript when you wish to stop and remove Xarta containers, but persist the state:cd ./prod . ./down.sh
-
⚠️ Dangerous: Callreset.shscript if you want to completely remove all data for the Xarta project:cd ./prod . ./reset.sh
Note: If you intend to build production images locally for the commands above, use up-local.sh and setup-local.sh instead of the other scripts, respectively.
We have created a one-click app template which can be used in CapRover instances. You can use it by following these steps (source):
- Login to your CapRover dashboard
- Go to
appsand click onOne-Click Apps/Databases - Select
>> TEMPLATE <<at the bottom of the dropdown list - Copy and paste the
xarta.ymlfile from this repository, then clickNext. - Provide the necessary variables and follow remaining instructions.
-
You may configure styling for classes
xarta-card,xarta-title,xarta-excerpt,xarta-updated-at,xarta-content,xarta-footer,xarta-custom-logo,xarta-default-logoto further customize your card. -
Xarta features an internal demo mode which can be used to automatically login with a username and password of choice:
- Configure both
NEXT_PUBLIC_DEMO_USERNAMEandNEXT_PUBLIC_DEMO_PASSWORDenv variables and rebuild your Next.js app.
- Configure both
Next.js APIs can be accessed at /xarta/api/ and were built to achieve functionality specific to Xarta, as well as wrap some of the Ghost APIs for convenience:
Public APIs:
code-injection: Retrieves customheadandfootercustomization, allowing the user to add scripts and style tags of choice.get-settings: Returns a subset of Ghost Settings API used for Xarta UIembed-script/[id]: Returns ascripttag which loads the Xarta embed card and makes it responsive according to the internal content's height.get-post: Wrapper for/posts/{id}api from Ghost.
Next.js pages can be accessed at /xarta
create-card: Create a new Xartaedit-card: Edit an existing Xartaview-card: Visualize an existing Xartaembed: Embeds a Xartalogin: Login routesettings: View Xarta settings
