Skip to content

Instantly share code, notes, and snippets.

@marcelgruber
marcelgruber / [[...path]].ts
Last active Jan 29, 2023
NextJS Sitecore JSS Layout Service Response Shortcut URL
View [[...path]].ts
// This code makes it easier to ping your layout service without having to remember the long URL that is accessible by default.
// Add this file to /pages/api/viewpage or wherever you want.
// From there, all you need to do is visit /api/viewpage to view the layout service response for your home page
// Subpage would be /api/viewpage/someSubPage
// Note that this will be PUBLICLY VIEWABLE, so make sure to lock it down somehow, possibly with this or WAF rules:
// https://doc.sitecore.com/xp/en/developers/hd/200/sitecore-headless-development/walkthrough--creating-a-user-and-page-for-testing-sitecore-authentication.html
import type { NextApiRequest, NextApiResponse } from 'next';
const handler = async (req: NextApiRequest, res: NextApiResponse): Promise<void> => {
@marcelgruber
marcelgruber / laravel-spark-setup-checklist.markdown
Last active Mar 8, 2019
If you're building a new Laravel application and leveraging Laravel Spark, this guide will be VERY helpful to you.
View laravel-spark-setup-checklist.markdown

Laravel Spark Site Setup Checklist

View github-tips-and-tricks.markdown

Github Tips and Tricks

Did you know that Github, since being acquired by Microsoft, now supports unlimited private repos?

You can import Bitbucket repos simply by providing a clone URL AND IT ADDS ALL OF THOSE CONTRIBUTIONS TO YOUR PROFILE, IN CHRONOLOGICAL ORDER!

Contribution Settings

Now that you've imported your private repos into Github (BitBucket is crying right now), let's bolster up your contribution stats.