Friday, June 19, 2015

Show Code in Your Blog Using Github

Github as Syntax Highlighter for Blogs



Step 1: Create a public Gist at gist.github.com

Step 2: Embed your Gist : click the show embed link and copy-paste the script into your blog


package org.sample.springsecurity.controller;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
@Controller
public class LoginController {
@RequestMapping(value = "/logoutPage", method = RequestMethod.GET)
public String logoutPage() {
return "logout";
}
@RequestMapping(value = "/loginPage", method = RequestMethod.GET)
public String loginPage() {
return "login";
}
}


No comments:

Post a Comment