Ghost is an open source professional publishing platform based on the modern Node.js technology stack

Ghost is an open source professional publishing platform based on the modern Node.js technology stack

2022-10-19 0 498
Resource Number 46083 Last Updated 2025-02-24
¥ 0USD Upgrade VIP
Download Now Matters needing attention
Can't download? Please contact customer service to submit a link error!
Value-added Service: Installation Guide Environment Configuration Secondary Development Template Modification Source Code Installation

Ghost is an open source professional publishing platform based on the modern Node.js technology stack.

Ghost is an open source professional publishing platform based on the modern Node.js technology stack插图

Ghost is an open source professional publishing platform based on the modern Node.js technology stack, designed for teams that need power, flexibility, and performance.

Ghost feature

Very fast

Reliable and safe

Great design

Modern technology

Open source

Own your brand + data

Using custom fields

Control your website design

No review

Built-in SEO control

Native REST API

Integrated SDK

Built-in membership and subscription
Business function

For any front-end
or static web site framework

How to install Ghost

The quickest way to get started is to set up a site on Ghost(Pro). If you are running a self-hosted instance, we strongly recommend that you use an Ubuntu server with at least 1GB of memory to run Ghost.

Local installation Ghost

Ghost-CLI is a command line tool that helps you quickly and easily install and configure Ghost for use. The npm module can be installed on the local computer, and npm can also install yarn on the local computer, depending on your preference.

npm install ghost-cli@latest  -g

After installation, you can always run ghost help to see a list of available commands.

In your terminal, cd goes to an empty directory and runs the installation command:

ghost install local

After installation, you will be able to access your new site http://localhost:2368 and
http://localhost:2368/ghost access Ghost Admin.

Start and stop

Ghost runs in a separate background process and keeps running until you stop it or restart your computer. So you may find these commands useful for using it:

  • ghost stop Stop ghost
  • ghost start ghost
  • ghost log
  • ghost ls Lists all running Ghost blogs

Verification using GScan

GScan is a tool to verify that the Ghost theme is compatible with the latest version of Ghost. Ghost automatically runs this tool when the theme is uploaded or activated. For development purposes, you can also run these checks yourself by installing it locally.

# Install gscan globally
npm install gscan -g

# Scan a theme directory for compatibility
gscan /path/to/ghost/content/themes/casper

# Scan a theme zip file for compatibility
gscan -z /path/to/downloads/theme.zip

Install Ghost from source code

First create a GitHub branch: First, you need to create a branch of the Ghost and ghost-admin repositories. Click the fork button on the top right and wait for a copy to be created on your personal GitHub account.

The next step is to configure the Git repository for local development: the main Ghost repository contains the full Ghost package, including admin clients and default themes, which will also be set up automatically

# First clone Ghost with submodules and make it  your working dir
git clone --recurse-submodules git@github.com:TryGhost/Ghost & &  cd Ghost

Rename

# Rename origin to upstream
git remote rename origin upstream

# Add your fork as an origin, editing in < YourUsername> ! 
git remote add origin git@github.com:< YourUsername> /Ghost.git

Because ghost-admin is a submodule repository for the Ghost main repository, you need to repeat the same steps to configure Git here as well.

# Switch to Ghost-Admin dir
cd core/admin

Update Ghost-Admin

# Quick check that everything is on  latest
git checkout main & &  git pull upstream main

# Then return to Ghost root directory
cd .. /.. /

Run setup and installation

# Only ever run this once
yarn setup

This setup task installs dependencies, initializes the database, sets up git hooks, initializes submodules, and runs the administrator’s first build.

Test

< Server test

Run the test using SQlite. To use MySQL, add NODE_ENV=testing-mysql

before the command

yarn test:unit
# Run unit tests

yarn test:acceptance
# Run acceptance tests

yarn test:regression
# Run regression tests

yarn test path/to/test.js
# Run a single test

yarn test test/unit/helpers
# Run a folder of tests

yarn test:all
# Run all tests

yarn lint
# Make sure your code doesn't suck

Client test

Client tests should always run inside the core/admin directory. Any time yarn dev runs client tests
http://localhost:4200/tests

ember test
# Run all tests in Chrome + Firefox

ember test --server
# Run all tests, leave results open, and watch for changes

ember test -f 'gh-my-component'
# Run tests where `describe()` or `it()` matches supplied argument
# Note: Case sensitive

ember test --launch=chrome
# Run all tests in Chrome only

ember test -s -f 'Acceptance:  Settings - General' --launch=chrome
# Most useful test comment for continuous local development
# Targets specific test of area being worked on
# Only using Chrome to keep resource usage minimal

Troubleshooting

ERROR: (EADDRINUSE) Failed to start Ghost

This error indicates that Ghost is already running and you need to stop it.

ERROR: ENOENT

This error means that the mentioned file does not exist.

ERROR Error: Module not found

Installation not complete. Run yarn:fix.

Error: Module not found”
./build/default/DTraceProviderBindings”

You switched node versions. Run yarn:fix.

ENOENT: no such file or directory, showing ‘path/to/favicon.ico’

at error (local)

Your administrative client has not yet been built. Run yarn dev.

TypeError: Cannot read property ‘tagName’ of undefined

You cannot run yarn dev at the same time as ember test. Wait for the test to complete before continuing, and wait for the “build successful” message before loading the administrator.

Topic development

The

Ghost theme uses the Handlebars template language, which uses helper programs to establish a strong separation between templates (HTML) and any JavaScript logic. This allows themes to be very fast, have dynamic client applications, and publish content on the server side as static HTML sent to the browser.

Ghost also uses an add-on library called express-hbs that adds some additional functionality to Handlebars, such as layout and localisation.

If you’ve built themes for other popular platforms before, it’s pretty easy to use the Ghost theme layer. This document gives you the tools you need to create static HTML and CSS for your theme, using Handlebars expressions when you need to render dynamic data.
To use GScan as a command line tool, install the gscannpm package globally:

# Install the npm package
npm install -g gscan

# Use gscan < file path>  anywhere to run gscan against a folder
gscan /path/to/ghost/content/themes/casper

# Run gscan on a zip file
gscan -z /path/to/download/theme.zip

Topic recommendation

Ghost is an open source professional publishing platform based on the modern Node.js technology stack插图1

Ghost is an open source professional publishing platform based on the modern Node.js technology stack插图2

Ghost is an open source professional publishing platform based on the modern Node.js technology stack插图3

—END—

Open Source protocol: MIT license

资源下载此资源为免费资源立即下载
Telegram:@John_Software

Disclaimer: This article is published by a third party and represents the views of the author only and has nothing to do with this website. This site does not make any guarantee or commitment to the authenticity, completeness and timeliness of this article and all or part of its content, please readers for reference only, and please verify the relevant content. The publication or republication of articles by this website for the purpose of conveying more information does not mean that it endorses its views or confirms its description, nor does it mean that this website is responsible for its authenticity.

Ictcoder Free source code Ghost is an open source professional publishing platform based on the modern Node.js technology stack https://ictcoder.com/kyym/ghost-an-open-source-professional-publishing-platform-based-on-modern-node-js-technology-stack.html

Share free open-source source code

Q&A
  • 1, automatic: after taking the photo, click the (download) link to download; 2. Manual: After taking the photo, contact the seller to issue it or contact the official to find the developer to ship.
View details
  • 1, the default transaction cycle of the source code: manual delivery of goods for 1-3 days, and the user payment amount will enter the platform guarantee until the completion of the transaction or 3-7 days can be issued, in case of disputes indefinitely extend the collection amount until the dispute is resolved or refunded!
View details
  • 1. Heptalon will permanently archive the process of trading between the two parties and the snapshots of the traded goods to ensure that the transaction is true, effective and safe! 2, Seven PAWS can not guarantee such as "permanent package update", "permanent technical support" and other similar transactions after the merchant commitment, please identify the buyer; 3, in the source code at the same time there is a website demonstration and picture demonstration, and the site is inconsistent with the diagram, the default according to the diagram as the dispute evaluation basis (except for special statements or agreement); 4, in the absence of "no legitimate basis for refund", the commodity written "once sold, no support for refund" and other similar statements, shall be deemed invalid; 5, before the shooting, the transaction content agreed by the two parties on QQ can also be the basis for dispute judgment (agreement and description of the conflict, the agreement shall prevail); 6, because the chat record can be used as the basis for dispute judgment, so when the two sides contact, only communicate with the other party on the QQ and mobile phone number left on the systemhere, in case the other party does not recognize self-commitment. 7, although the probability of disputes is very small, but be sure to retain such important information as chat records, mobile phone messages, etc., in case of disputes, it is convenient for seven PAWS to intervene in rapid processing.
View details
  • 1. As a third-party intermediary platform, Qichou protects the security of the transaction and the rights and interests of both buyers and sellers according to the transaction contract (commodity description, content agreed before the transaction); 2, non-platform online trading projects, any consequences have nothing to do with mutual site; No matter the seller for any reason to require offline transactions, please contact the management report.
View details

Related Article

make a comment
No comments available at the moment
Official customer service team

To solve your worries - 24 hours online professional service