View gatsby-start.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npx gatsby new your-gatsby-site |
View Markdium-Diff.diff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Hello1 | |
{ | |
public static void Main() | |
{ | |
- System.Console.WriteLine("Hello, World!"); | |
+ System.Console.WriteLine("Rock all night long!"); | |
} | |
} |
View Markdium-TypeScript.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let foo = 'bar' | |
/** | |
Don't worry about the code block, it will be saved as a gist with right language format, and auto embed to your post. | |
**/ |
View gatsby-tailwind-2.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install Tailwind: | |
npm install tailwindcss --save-dev | |
# Generate Tailwind config: | |
npx tailwind init |
View gatsby-tailwind-3.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npm i @emotion/core @emotion/styled tailwind.macro@next gatsby-plugin-postcss postcss-import postcss-preset-env | |
# We are installing the 'next' version of tailwind micro so as to use TailwindCSS 1.0.0+ | |
# For older versions of TailwindCSS, just install 'tailwind.macro' |
View postcss.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
plugins: [ | |
require("postcss-import")({ | |
plugins: [require("stylelint")], | |
}), | |
require("tailwindcss")("./tailwind.config.js"), | |
require("postcss-preset-env")({ | |
autoprefixer: { grid: true }, | |
features: { | |
"nesting-rules": true, |
View gatsby-config-1.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
plugins: [ | |
... | |
{ | |
resolve: `gatsby-plugin-postcss`, | |
options: { | |
// Accepts all options defined by `gatsby-plugin-postcss` plugin. | |
}, | |
}, | |
{ | |
resolve: `gatsby-plugin-emotion`, |
View globals.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@tailwind base; | |
@tailwind utilities; |
View gatsby-browser.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Edit the path to where you have kept the globals.css file | |
import "./src/styles/globals.css" |
View component-1.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
import tw from "tailwind.macro"; | |
const MyComponent = ( | |
<h4 css={tw`font-semibold text-lg leading-snug truncate`}>This is Soumya</h4> | |
); | |
export default MyComponent; |
OlderNewer