Sfoglia il codice sorgente

Merge pull request #97 from wsvincent/github-pages

Add GitHub Pages support
William Vincent 4 anni fa
parent
commit
fe4e882490
15 ha cambiato i file con 108952 aggiunte e 3 eliminazioni
  1. 3 1
      .github/workflows/lint.yml
  2. 7 2
      .gitignore
  3. 24 0
      404.html
  4. 34 0
      Gemfile
  5. 80 0
      Gemfile.lock
  6. 13 0
      Makefile
  7. 2 0
      README.md
  8. 33 0
      _config.yml
  9. 2 0
      _includes/footer.html
  10. 11 0
      _includes/header.html
  11. 10 0
      _layouts/default.html
  12. 108700 0
      assets/style.css
  13. 7 0
      postcss.config.js
  14. 5 0
      src/style.css
  15. 21 0
      tailwind.config.js

+ 3 - 1
.github/workflows/lint.yml

@@ -1,6 +1,8 @@
 name: Lint Awesome List
 
-on: [push, pull_request]
+on:
+  pull_request:
+  push: [main]
 
 jobs:
   lint:

+ 7 - 2
.gitignore

@@ -1,2 +1,7 @@
-.DS_Store
-ab-results-README*
+_site
+.sass-cache
+.jekyll-metadata
+_site/
+.sass-cache/
+.jekyll-cache/
+.jekyll-metadata

+ 24 - 0
404.html

@@ -0,0 +1,24 @@
+---
+layout: default
+---
+
+<style type="text/css" media="screen">
+  .container {
+    margin: 10px auto;
+    max-width: 600px;
+    text-align: center;
+  }
+  h1 {
+    margin: 30px 0;
+    font-size: 4em;
+    line-height: 1;
+    letter-spacing: -1px;
+  }
+</style>
+
+<div class="container">
+  <h1>404</h1>
+
+  <p><strong>Page not found :(</strong></p>
+  <p>The requested page could not be found.</p>
+</div>

+ 34 - 0
Gemfile

@@ -0,0 +1,34 @@
+source "https://rubygems.org"
+
+# Hello! This is where you manage which Jekyll version is used to run.
+# When you want to use a different version, change it below, save the
+# file and run `bundle install`. Run Jekyll with `bundle exec`, like so:
+#
+#     bundle exec jekyll serve
+#
+# This will help ensure the proper Jekyll version is running.
+# Happy Jekylling!
+gem "jekyll", "~> 3.8.7"
+
+# This is the default theme for new Jekyll sites. You may change this to anything you like.
+gem "minima", "~> 2.0"
+
+# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
+# uncomment the line below. To upgrade, run `bundle update github-pages`.
+# gem "github-pages", group: :jekyll_plugins
+
+# If you have any plugins, put them here!
+group :jekyll_plugins do
+  gem "jekyll-feed", "~> 0.6"
+end
+
+# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
+# and associated library.
+install_if -> { RUBY_PLATFORM =~ %r!mingw|mswin|java! } do
+  gem "tzinfo", "~> 1.2"
+  gem "tzinfo-data"
+end
+
+# Performance-booster for watching directories on Windows
+gem "wdm", "~> 0.1.0", :install_if => Gem.win_platform?
+

+ 80 - 0
Gemfile.lock

@@ -0,0 +1,80 @@
+GEM
+  remote: https://rubygems.org/
+  specs:
+    addressable (2.7.0)
+      public_suffix (>= 2.0.2, < 5.0)
+    colorator (1.1.0)
+    concurrent-ruby (1.1.7)
+    em-websocket (0.5.2)
+      eventmachine (>= 0.12.9)
+      http_parser.rb (~> 0.6.0)
+    eventmachine (1.2.7)
+    ffi (1.13.1)
+    forwardable-extended (2.6.0)
+    http_parser.rb (0.6.0)
+    i18n (0.9.5)
+      concurrent-ruby (~> 1.0)
+    jekyll (3.8.7)
+      addressable (~> 2.4)
+      colorator (~> 1.0)
+      em-websocket (~> 0.5)
+      i18n (~> 0.7)
+      jekyll-sass-converter (~> 1.0)
+      jekyll-watch (~> 2.0)
+      kramdown (~> 1.14)
+      liquid (~> 4.0)
+      mercenary (~> 0.3.3)
+      pathutil (~> 0.9)
+      rouge (>= 1.7, < 4)
+      safe_yaml (~> 1.0)
+    jekyll-feed (0.15.0)
+      jekyll (>= 3.7, < 5.0)
+    jekyll-sass-converter (1.5.2)
+      sass (~> 3.4)
+    jekyll-seo-tag (2.6.1)
+      jekyll (>= 3.3, < 5.0)
+    jekyll-watch (2.2.1)
+      listen (~> 3.0)
+    kramdown (1.17.0)
+    liquid (4.0.3)
+    listen (3.2.1)
+      rb-fsevent (~> 0.10, >= 0.10.3)
+      rb-inotify (~> 0.9, >= 0.9.10)
+    mercenary (0.3.6)
+    minima (2.5.1)
+      jekyll (>= 3.5, < 5.0)
+      jekyll-feed (~> 0.9)
+      jekyll-seo-tag (~> 2.1)
+    pathutil (0.16.2)
+      forwardable-extended (~> 2.6)
+    public_suffix (4.0.6)
+    rb-fsevent (0.10.4)
+    rb-inotify (0.10.1)
+      ffi (~> 1.0)
+    rouge (3.23.0)
+    safe_yaml (1.0.5)
+    sass (3.7.4)
+      sass-listen (~> 4.0.0)
+    sass-listen (4.0.0)
+      rb-fsevent (~> 0.9, >= 0.9.4)
+      rb-inotify (~> 0.9, >= 0.9.7)
+    thread_safe (0.3.6)
+    tzinfo (1.2.7)
+      thread_safe (~> 0.1)
+    tzinfo-data (1.2020.1)
+      tzinfo (>= 1.0.0)
+    wdm (0.1.1)
+
+PLATFORMS
+  ruby
+
+DEPENDENCIES
+  jekyll (~> 3.8.7)
+  jekyll-feed (~> 0.6)
+  minima (~> 2.0)
+  tzinfo (~> 1.2)
+  tzinfo-data
+  wdm (~> 0.1.0)
+
+BUNDLED WITH
+   1.16.6

+ 13 - 0
Makefile

@@ -1,3 +1,5 @@
+TAILWIND_CSS_VERSION := 1.8.10
+
 build: toc
 
 .PHONY: alex
@@ -8,6 +10,17 @@ alex:
 lint:
 	@npx awesome-lint README.md
 
+.PHONY: static
+static:
+	@npx -p tailwindcss@${TAILWIND_CSS_VERSION} tailwindcss build \
+		./src/style.css \
+		--config ./tailwind.config.js \
+		--output ./assets/style.css
+
+.PHONY: serve
+serve:
+	bundle exec jekyll serve --drafts --watch --port 4000
+
 .PHONY: toc
 toc:
 	@npx doctoc README.md

+ 2 - 0
README.md

@@ -1,3 +1,5 @@
+---
+---
 <div align="center">
   <a href="https://github.com/sindresorhus/awesome#readme"><img src="https://awesome.re/badge-flat.svg" /></a><br>
   <img width="400" src="django-logo.svg" alt="Django logo">

+ 33 - 0
_config.yml

@@ -0,0 +1,33 @@
+title: Awesome Django
+email: your-email@example.com
+description: >-
+  A curated list of awesome things related to Django. Maintained by
+  William Vincent and Jeff Triplett
+baseurl: "" # the subpath of your site, e.g. /blog
+url: "https://awesome-django.org" # the base hostname & protocol for your site, e.g. http://example.com
+
+# Build settings
+markdown: kramdown
+plugins:
+  - jekyll-feed
+include:
+  - README.md
+exclude:
+  - "*.md"
+  - Gemfile
+  - Gemfile.lock
+  - LICENSE
+  - Makefile
+  - postcss.config.js
+  - tailwind.config.js
+  - src
+defaults:
+  - scope:
+      path: "" # an empty string here means all files in the project
+    values:
+      layout: "default"
+    scope:
+      path: "README.md"
+    values:
+      permalink: "/"
+      layout: "default"

+ 2 - 0
_includes/footer.html

@@ -0,0 +1,2 @@
+</body>
+</html>

+ 11 - 0
_includes/header.html

@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html class="no-js" lang="en-US">
+  <head>
+    <meta charset="utf-8" />
+    <meta http-equiv="x-ua-compatible" content="ie=edge" />
+    <title>Awesome Django</title>
+    <meta name="viewport" content="width=device-width, initial-scale=1" />
+    <link rel="stylesheet" href="{{ site.baseurl }}/assets/style.css" />
+  </head>
+
+  <body class="debug-screens max-w-screen-lg mx-auto py-8 px-4 sm:px-6 lg:py-8 lg:px-8 border border-2">

+ 10 - 0
_layouts/default.html

@@ -0,0 +1,10 @@
+---
+---
+
+{% include header.html %}
+
+<main class="container prose sm:prose-md md:prose-lg lg:prose-lg xl:prose-xl">
+  {{ content }}
+</main>
+
+{% include footer.html %}

File diff suppressed because it is too large
+ 108700 - 0
assets/style.css


+ 7 - 0
postcss.config.js

@@ -0,0 +1,7 @@
+module.exports = {
+  plugins: {
+    tailwindcss: {},
+    autoprefixer: {},
+  },
+}
+

+ 5 - 0
src/style.css

@@ -0,0 +1,5 @@
+@tailwind base;
+
+@tailwind components;
+
+@tailwind utilities;

+ 21 - 0
tailwind.config.js

@@ -0,0 +1,21 @@
+module.exports = {
+  future: {
+    removeDeprecatedGapUtilities: true,
+    purgeLayersByDefault: true,
+  },
+  purge: {
+    enabled: false, //process.env.JEKYLL_ENV == "production",
+    mode: 'all',
+    content: [
+      '*.html'
+    ],
+  },
+  plugins: [
+    require("@tailwindcss/typography"),
+    require("tailwindcss-debug-screens"),
+  ],
+  theme: {
+    extend: {},
+  },
+  variants: {},
+}