Post, Code and Quiet Time.
  • Home
Sign in Subscribe

Ghost publishing platform sources: how hbs template engine is set to its site app

Errong Leng

Nov 13, 2018

core js codes

in core/server/services/themes/active.js:

        // Set the views and engine
        siteApp.set('views', this.path);
        siteApp.engine('hbs', engine.configure(this.partialsPath));

Refers

https://expressjs.com/en/guide/using-template-engines.html
https://docs.ghost.org/api/handlebars-themes/

Sign up for more like this.

Enter your email
Subscribe
Share files between different agent workspace in the same Jenkins Pipeline via stash|unstash

Share files between different agent workspace in the same Jenkins Pipeline via stash|unstash

I was working on a legacy app recently. The legacy app has angular as its frontend and spring boot app as its backend. Originally the frontend build outputs are committed in the app's git repository and packaged by spring boot by copying them to the ${project.basedir}/target/classes/static/
Jan 26, 2023 4 min read
Swagger annotations for API that allows downloading files as zip

Swagger annotations for API that allows downloading files as zip

I have built out an API that allows you downloading log files as zip in a sprint boot app. The app also integrated with Swagger 3, so I also want this API can be hit in the Swagger UI. In this post, I will demonstrate how to use @ApiOperation annotation
Jan 25, 2023 1 min read
How to Extract|Compress zip files using Java

How to Extract|Compress zip files using Java

import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream; import java.util.zip.ZipOutputStream; extract Zip public class ZipExtract { public List extractZipFile(MultipartFile zipFile) { try (val zipInput = new ZipInputStream(zipFile.getInputStream())) { List logFiles = new ArrayList<>(); ZipEntry zipEntry; log.info("Received Zip File: {}", zipFile.getOriginalFilename()); while ((zipEntry = zipInput.
Jan 24, 2023 1 min read
Post, Code and Quiet Time. © 2023
Powered by Ghost