├── .gitignore ├── 404.html ├── Gemfile ├── Gemfile.lock ├── README.md ├── _config.yml ├── _includes └── head.html ├── _posts └── 2018-02-23-welcome-to-jekyll.markdown ├── about.md ├── admin ├── config.yml └── index.html └── index.md /.gitignore: -------------------------------------------------------------------------------- 1 | _site 2 | .sass-cache 3 | .jekyll-metadata 4 | .users.yml 5 | -------------------------------------------------------------------------------- /404.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | --- 4 | 5 | 18 | 19 |
20 |

404

21 | 22 |

Page not found :(

23 |

The requested page could not be found.

24 |
25 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source "https://rubygems.org" 2 | 3 | # Hello! This is where you manage which Jekyll version is used to run. 4 | # When you want to use a different version, change it below, save the 5 | # file and run `bundle install`. Run Jekyll with `bundle exec`, like so: 6 | # 7 | # bundle exec jekyll serve 8 | # 9 | # This will help ensure the proper Jekyll version is running. 10 | # Happy Jekylling! 11 | gem "jekyll", "~> 3.8" 12 | 13 | # This is the default theme for new Jekyll sites. You may change this to anything you like. 14 | 15 | # If you want to use GitHub Pages, remove the "gem "jekyll"" above and 16 | # uncomment the line below. To upgrade, run `bundle update github-pages`. 17 | # gem "github-pages", group: :jekyll_plugins 18 | gem "minima", "~> 2.5" 19 | gem "concurrent-ruby", "~> 1.1.1" 20 | 21 | # If you have any plugins, put them here! 22 | group :jekyll_plugins do 23 | gem "jekyll-feed", "~> 0.11" 24 | gem "jekyll-seo-tag", "~> 2.5" 25 | gem "jekyll-sitemap", "~> 1.2" 26 | end 27 | 28 | # Windows does not include zoneinfo files, so bundle the tzinfo-data gem 29 | gem "tzinfo-data", platforms: [:mingw, :mswin, :x64_mingw, :jruby] 30 | 31 | # Performance-booster for watching directories on Windows 32 | gem "wdm", "~> 0.1.0" if Gem.win_platform? 33 | 34 | -------------------------------------------------------------------------------- /Gemfile.lock: -------------------------------------------------------------------------------- 1 | GEM 2 | remote: https://rubygems.org/ 3 | specs: 4 | addressable (2.5.2) 5 | public_suffix (>= 2.0.2, < 4.0) 6 | colorator (1.1.0) 7 | concurrent-ruby (1.1.4) 8 | em-websocket (0.5.1) 9 | eventmachine (>= 0.12.9) 10 | http_parser.rb (~> 0.6.0) 11 | eventmachine (1.2.7) 12 | ffi (1.10.0) 13 | forwardable-extended (2.6.0) 14 | http_parser.rb (0.6.0) 15 | i18n (0.9.5) 16 | concurrent-ruby (~> 1.0) 17 | jekyll (3.8.5) 18 | addressable (~> 2.4) 19 | colorator (~> 1.0) 20 | em-websocket (~> 0.5) 21 | i18n (~> 0.7) 22 | jekyll-sass-converter (~> 1.0) 23 | jekyll-watch (~> 2.0) 24 | kramdown (~> 1.14) 25 | liquid (~> 4.0) 26 | mercenary (~> 0.3.3) 27 | pathutil (~> 0.9) 28 | rouge (>= 1.7, < 4) 29 | safe_yaml (~> 1.0) 30 | jekyll-feed (0.11.0) 31 | jekyll (~> 3.3) 32 | jekyll-sass-converter (1.5.2) 33 | sass (~> 3.4) 34 | jekyll-seo-tag (2.5.0) 35 | jekyll (~> 3.3) 36 | jekyll-sitemap (1.2.0) 37 | jekyll (~> 3.3) 38 | jekyll-watch (2.1.2) 39 | listen (~> 3.0) 40 | kramdown (1.17.0) 41 | liquid (4.0.1) 42 | listen (3.1.5) 43 | rb-fsevent (~> 0.9, >= 0.9.4) 44 | rb-inotify (~> 0.9, >= 0.9.7) 45 | ruby_dep (~> 1.2) 46 | mercenary (0.3.6) 47 | minima (2.5.0) 48 | jekyll (~> 3.5) 49 | jekyll-feed (~> 0.9) 50 | jekyll-seo-tag (~> 2.1) 51 | pathutil (0.16.2) 52 | forwardable-extended (~> 2.6) 53 | public_suffix (3.0.3) 54 | rb-fsevent (0.10.3) 55 | rb-inotify (0.10.0) 56 | ffi (~> 1.0) 57 | rouge (3.3.0) 58 | ruby_dep (1.5.0) 59 | safe_yaml (1.0.4) 60 | sass (3.7.3) 61 | sass-listen (~> 4.0.0) 62 | sass-listen (4.0.0) 63 | rb-fsevent (~> 0.9, >= 0.9.4) 64 | rb-inotify (~> 0.9, >= 0.9.7) 65 | 66 | PLATFORMS 67 | ruby 68 | 69 | DEPENDENCIES 70 | concurrent-ruby (~> 1.1.1) 71 | jekyll (~> 3.8) 72 | jekyll-feed (~> 0.11) 73 | jekyll-seo-tag (~> 2.5) 74 | jekyll-sitemap (~> 1.2) 75 | minima (~> 2.5) 76 | tzinfo-data 77 | 78 | BUNDLED WITH 79 | 1.17.1 80 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Jekyll + Decap CMS with Netlify Identity 2 | 3 | This is the basic Jekyll starter site, with Decap CMS integrated and using Netlify Identity for 4 | authentication. 5 | 6 | ## Getting started 7 | 8 | Use our deploy button to get your own copy of the repository: 9 | 10 | [![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/netlify-templates/jekyll-netlify-cms&stack=cms) 11 | 12 | This will setup everything needed for running the CMS: 13 | 14 | * A new repository in your GitHub account with the code 15 | * Full Continuous Deployment to Netlify's global CDN network 16 | * Control users and access with Netlify Identity 17 | * Manage content with Decap CMS 18 | 19 | The email address associated with your Netlify account will receive an email inviting you as an 20 | Identity user - click Accept in the email to set your new password, then navigate to `/admin` on 21 | your site to log in. 22 | 23 | Now you're all set, and you can start editing content! 24 | 25 | **Note:** if you switch the repo that was created to private, you'll need to regenerate your token, 26 | as the token generated using the deploy to Netlify button can only access public repositories. To 27 | regenerate your token, head to "Settings" in your Netlify site dashboard, go to the "Identity" 28 | section, then scroll to "Services" where you'll see an "Edit settings" button. Click that and you'll 29 | see a text link to "Generate access token in GitHub". 30 | 31 | ## Local Development 32 | 33 | Clone this repository and run: 34 | 35 | ```bash 36 | bundle install 37 | bundle exec jekyll server --watch 38 | ``` 39 | 40 | Now navigate to [localhost:4000](http://localhost:4000/) to preview the site, and 41 | [localhost:4000/admin](http://localhost:4000/admin) to log into the CMS. 42 | 43 | ## Authenticating without Netlify Identity 44 | 45 | Netlify provides basic OAuth so you can log in to Decap CMS with your GitHub profile directly if 46 | you prefer not to use Netlify Identity. To do so, go to [the GitHub developer application 47 | screen](https://github.com/settings/developers) and **register new application**. The Authorization 48 | callback URL you'll need to enter is `https://api.netlify.com/auth/done`. 49 | 50 | Once you've set up the application, go back to your Netlify site dashboard, navigate to the 51 | **Access** tab. Then fill in your new Client ID and Client Secret in the Github Authentication 52 | Provider section and check the **Enable GitHub** box. 53 | 54 | You'll then need to update the `backend` settings at the top of the `admin/config.yml` file in your 55 | site repo: 56 | 57 | ```yaml 58 | backend: 59 | name: github 60 | repo: username/repo # your GitHub username and repository name, separated by a slash 61 | branch: master # optional, default value is "master" 62 | ``` 63 | 64 | Now anybody with write access to your GitHub repository can log in at yoursite.netlify.com/admin 65 | and use the CMS. 66 | 67 | **Enjoy!** 68 | 69 | ## Bug reports, feature requests, etc 70 | 71 | We love feedback, contributions, better documentation, tutorials, general comments, 72 | random hatemail, rants, love, crazy ideas, etc, etc! 73 | 74 | Contact us at [any of netlify's normal channels](https://www.netlify.com/contact) and 75 | open issues or pull requests for Netlify CMS at [the netlify-cms GitHub 76 | repo](https://github.com/netlify/netlify-cms). If you need realtime help with setting up Netlify 77 | CMS, you can reach out in the [Netlify CMS Gitter](https://gitter.im/netlify/netlifycms). 78 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | # Welcome to Jekyll! 2 | # 3 | # This config file is meant for settings that affect your whole blog, values 4 | # which you are expected to set up once and rarely edit after that. If you find 5 | # yourself editing this file very often, consider using Jekyll's data files 6 | # feature for the data you need to update frequently. 7 | # 8 | # For technical reasons, this file is *NOT* reloaded automatically when you use 9 | # 'bundle exec jekyll serve'. If you change this file, please restart the server process. 10 | 11 | # Site settings 12 | # These are used to personalize your new site. If you look in the HTML files, 13 | # you will see them accessed via {{ site.title }}, {{ site.email }}, and so on. 14 | # You can create any custom variable you would like, and they will be accessible 15 | # in the templates via {{ site.myvariable }}. 16 | title: Jekyll Netlify CMS 17 | email: your-email@example.com 18 | description: >- # this means to ignore newlines until "baseurl:" 19 | This is the basic Jekyll starter site, with Netlify CMS integrated and using 20 | Netlify Identity for authentication. 21 | baseurl: "" # the subpath of your site, e.g. /blog 22 | url: "" # the base hostname & protocol for your site, e.g. http://example.com 23 | 24 | # Build settings 25 | theme: minima 26 | 27 | # minima theme settings 28 | show_excerpts: false # set to true to show excerpts on the homepage 29 | 30 | # Minima date format 31 | # refer to http://shopify.github.io/liquid/filters/date/ if you want to customize this 32 | minima: 33 | date_format: "%b %-d, %Y" 34 | 35 | # If you want to link only specific pages in your header, uncomment 36 | # this and add the path to the pages in order as they should show up 37 | #header_pages: 38 | # - about.html 39 | 40 | # social links 41 | twitter_username: jekyllrb 42 | github_username: jekyll 43 | rss: rss 44 | # dribbble_username: jekyll 45 | # facebook_username: jekyll 46 | # flickr_username: jekyll 47 | # instagram_username: jekyll 48 | # linkedin_username: jekyll 49 | # pinterest_username: jekyll 50 | # youtube_username: jekyll 51 | # googleplus_username: +jekyll 52 | 53 | # Mastodon instances 54 | # mastodon: 55 | # - username: jekyll 56 | # instance: example.com 57 | # - username: jekyll2 58 | # instance: example.com 59 | 60 | 61 | # Exclude from processing. 62 | # The following items will not be processed, by default. Create a custom list 63 | # to override the default setting. 64 | # exclude: 65 | # - Gemfile 66 | # - Gemfile.lock 67 | # - node_modules 68 | # - vendor/bundle/ 69 | # - vendor/cache/ 70 | # - vendor/gems/ 71 | # - vendor/ruby/ 72 | -------------------------------------------------------------------------------- /_includes/head.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {% seo %} 6 | 7 | {% feed_meta %} 8 | {% if jekyll.environment == 'production' and site.google_analytics %} 9 | {% include google-analytics.html %} 10 | {% endif %} 11 | 12 | -------------------------------------------------------------------------------- /_posts/2018-02-23-welcome-to-jekyll.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | layout: post 3 | title: "Welcome to Jekyll!" 4 | date: 2018-02-23 00:12:57 +0800 5 | categories: jekyll update 6 | --- 7 | You’ll find this post in your `_posts` directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run `jekyll serve`, which launches a web server and auto-regenerates your site when a file is updated. 8 | 9 | To add new posts, simply add a file in the `_posts` directory that follows the convention `YYYY-MM-DD-name-of-post.ext` and includes the necessary front matter. Take a look at the source for this post to get an idea about how it works. 10 | 11 | Jekyll also offers powerful support for code snippets: 12 | 13 | {% highlight ruby %} 14 | def print_hi(name) 15 | puts "Hi, #{name}" 16 | end 17 | print_hi('Tom') 18 | #=> prints 'Hi, Tom' to STDOUT. 19 | {% endhighlight %} 20 | 21 | Check out the [Jekyll docs][jekyll-docs] for more info on how to get the most out of Jekyll. File all bugs/feature requests at [Jekyll’s GitHub repo][jekyll-gh]. If you have questions, you can ask them on [Jekyll Talk][jekyll-talk]. 22 | 23 | [jekyll-docs]: https://jekyllrb.com/docs/home 24 | [jekyll-gh]: https://github.com/jekyll/jekyll 25 | [jekyll-talk]: https://talk.jekyllrb.com/ 26 | -------------------------------------------------------------------------------- /about.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: About 4 | permalink: /about/ 5 | --- 6 | 7 | This is the base Jekyll theme. You can find out more info about customizing your Jekyll theme, as well as basic Jekyll usage documentation at [jekyllrb.com](https://jekyllrb.com/) 8 | 9 | You can find the source code for Minima at GitHub: 10 | [jekyll][jekyll-organization] / 11 | [minima](https://github.com/jekyll/minima) 12 | 13 | You can find the source code for Jekyll at GitHub: 14 | [jekyll][jekyll-organization] / 15 | [jekyll](https://github.com/jekyll/jekyll) 16 | 17 | 18 | [jekyll-organization]: https://github.com/jekyll 19 | -------------------------------------------------------------------------------- /admin/config.yml: -------------------------------------------------------------------------------- 1 | backend: 2 | name: git-gateway 3 | branch: master # Branch to update (master by default) 4 | 5 | media_folder: "img/uploads" # Folder where user uploaded files should go 6 | 7 | collections: # A list of collections the CMS should be able to edit 8 | - name: "post" # Used in routes, ie.: /admin/collections/:slug/edit 9 | label: "Post" # Used in the UI, ie.: "New Post" 10 | folder: "_posts" # The path to the folder where the documents are stored 11 | sort: "date:desc" # Default is title:asc 12 | create: true # Allow users to create new documents in this collection 13 | slug: "{{year}}-{{month}}-{{day}}-{{slug}}" 14 | fields: # The fields each document in this collection have 15 | - {label: "Layout", name: "layout", widget: "hidden", default: "post"} 16 | - {label: "Title", name: "title", widget: "string", tagname: "h1"} 17 | - {label: "Body", name: "body", widget: "markdown"} 18 | - {label: "Categories", name: "categories", widget: "string", required: false} 19 | meta: # Meta data fields. Just like fields, but without any preview element 20 | - {label: "Publish Date", name: "date", widget: "datetime", format: "YYYY-MM-DD hh:mm:ss"} 21 | -------------------------------------------------------------------------------- /admin/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Content Manager 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /index.md: -------------------------------------------------------------------------------- 1 | --- 2 | # You don't need to edit this file, it's empty on purpose. 3 | # Edit theme's home layout instead if you wanna make some changes 4 | # See: https://jekyllrb.com/docs/themes/#overriding-theme-defaults 5 | layout: home 6 | --- 7 | --------------------------------------------------------------------------------