Skip to content

Commit

Permalink
Jekyll + TailwindCSS + Github Pages
Browse files Browse the repository at this point in the history
  • Loading branch information
brajeshwar committed Jul 5, 2024
1 parent 143ad53 commit 287b41d
Show file tree
Hide file tree
Showing 15 changed files with 2,670 additions and 130 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/github-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# .github/workflows/github-pages.yml

name: Build and Deploy to GitHub Pages

on:
push:
branches:
- main

jobs:
github-pages:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.1
bundler-cache: true
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '18'
- run: npm install
- name: Build site
uses: limjh16/jekyll-action-ts@v2
with:
enable_cache: true
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: $
publish_dir: ./_site
143 changes: 13 additions & 130 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,130 +1,13 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# vuepress v2.x temp and cache directory
.temp
.cache

# Docusaurus cache and generated files
.docusaurus

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*
# Jekyll
_site/
*-cache/
.jekyll-metadata

# Ruby
.bundle/
.ruby-version
*.gem
Gemfile.lock

# JavaScript
node_modules
8 changes: 8 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
source "https://rubygems.org"

gem "jekyll", "~> 4"
gem "webrick", "~> 1.7"

group :jekyll_plugins do
gem "jekyll-postcss"
end
28 changes: 28 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
url: "https://brajeshwar.github.io/2024B"
baseurl: "/2024B"
title: "Brajeshwar"

plugins:
- jekyll-postcss

sass:
sourcemap: never

postcss:
cache: false

exclude:
- .gitignore
- bin
- node_modules
- package.json
- package-lock.json
- postcss.config.js
- README.md
- tailwind.config.js
# - assets/css/tailwind.scss

# files Jekyll should not delete from .site
keep_files:
- assets/css/tailwind.css
- assets/css/tailwind.css.map
13 changes: 13 additions & 0 deletions _layouts/default.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="{{ site.lang | default: "en-US" }}">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="utf-8">
<title>{{ page.title }} | {{ site.title }}</title>
<link rel="stylesheet" href="{{ "/assets/css/tailwind.css" | relative_url }}">
<!-- <link rel="stylesheet" href="{{ "/assets/css/main.css" | relative_url }}"> -->
</head>
<body>
{{ content }}
</body>
</html>
6 changes: 6 additions & 0 deletions assets/css/tailwind.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
---

@import "tailwindcss/base";
@import "tailwindcss/components";
@import "tailwindcss/utilities";
3 changes: 3 additions & 0 deletions bin/build-dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

bundle exec jekyll build --profile --config _config.yml
3 changes: 3 additions & 0 deletions bin/build-prod
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

JEKYLL_ENV=production bundle exec jekyll build --profile --config _config.yml
9 changes: 9 additions & 0 deletions bin/setup
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#! /usr/bin/env bash

set -e

echo "==> Running \`bundle install\`"
bundle install

echo "==> Running \`npm install\`"
npm install
3 changes: 3 additions & 0 deletions bin/start
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

bundle exec jekyll serve --livereload
46 changes: 46 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
layout: default
title: Home
---

<div class="flex flex-col items-center min-h-screen text-gray-700 ">
<div class="flex items-center justify-center flex-grow">
<div class="w-5/6 sm:px-0 sm:w-2/3 md:w-1/2 2xl:w-1/3">
<div class="flex justify-start">
<div class="pr-1 font-serif text-2xl font-extrabold md:font-bold sm:text-5xl xl:text-7xl sm:pr-2 xl:pr-3">
‘‘
</div>
<div class="text-xl sm:text-2xl xl:text-4xl md:font-medium">
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.
</div>
</div>
<div class="flex justify-end">
<span class="font-serif text-lg italic sm:text-xl xl:text-3xl md:pt-2">
— Mark Twain
</span>
</div>
</div>
</div>

<div class="py-2 text-sm md:text-base">
<a href="https://github.com/stefcoetzee/jekyll-tailwind"
class="flex items-center space-x-1 hover:text-blue-700 hover:underline">
<svg class="w-4 h-4 fill-current" role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205
11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422
18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729
1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305
3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93
0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0
0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006
2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24
2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475
5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0
.315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"/>
</svg>
<span>
View on GitHub
</span>
</a>
</div>
</div>
Loading

0 comments on commit 287b41d

Please sign in to comment.