Coder Social home page Coder Social logo

fricandorostisseria-v3's Introduction

Fricand贸 Rostisseria

  1. Introduction
  2. Install
  3. Deploy
  4. Use DatoCMS to publish content
  5. Manage DatoCMS records
  6. Resources
  7. Authors

1. Introduction

Fricand贸 Rostisseria is a handmade / to take away food shop located in Badalona (Barcelona).

The site has been created using Jekyll, GitHub, Netlify and DatoCMS.

  • Jekyll is a simple, blog-aware, static site generator.
  • GitHub is a development platform where you can host and review code.
  • Netlify is a platform to deploy modern static websites with an automated process.
  • DatoCMS is an API-based administrative area for your static websites, to let your clients publish new content independently.

2. Install

First install Ruby and RubyGems.

Then you can install Jekyll with the following command:

$ gem install jekyll bundler

Clone GitHub repo:

$ git clone [email protected]:yourusername/yoursitename.git

Change into your new directory:

$ cd yoursitename

Use the right Ruby version:

$ rvm use // this will use the version specified in `/.ruby-version` file

Build the site on the preview server:

$ bundle exec jekyll server

Now browse to http://localhost:4000

3. Deploy

We linked the Netlify site to the GitHub repo to allow an automated deploy on every commit.

Now, everytime you push some change to GitHub master branch, Netlify will repeat the build process and deploy a new version of the site, to your custom domain:

http://www.yoursitename.com/

Deploy manual changes

  1. Set this setting under yout "Netlify > Site settings > Build settings > Build command": jekyll build.
  2. Edit any of your markdown files locally (i.e. "_comidas/menu-1.md"), commit your changes and push them to master branch.
  3. This will trigger a Production deploy.

Deploy DatoCMS changes

  1. Set this setting under yout "Netlify > Site settings > Build settings > Build command": bundle exec dato dump --token=SITE_READONLY_TOKEN && jekyll build. Replace the SITE_READ_ONLY_TOKEN string with the actual token (you can find it your DatoCMS Admin area).
  2. Follow point 4 and point 5 below.

Possible issues

Eventually, Netlify can return a "Deploy failed" message, like this:

failed during stage 'building site': Build script returned non-zero exit code: 1

Deploy log:

ruby_dep-1.5.0 requires ruby version >= 2.2.5, which is incompatible with the current version, ruby 2.1.2p95
Error during gem install

Netlify's default Ruby version is 2.1.2 but you can pick a different version by adding a /.ruby-version file to your repository. It should contain nothing but one of the below version strings. Netlify currently support the following ruby versions:

2.0.0-p247
2.1.2
2.2.1
2.2.3
2.3.0
2.3.1
2.3.3
2.4.0
2.4.1
2.4.2

4. Use DatoCMS to publish content

The deploy process described above can be fine, but it certainly cannot be done if the person in charge of updating catalog is not a programmer and or is not comfortable with terminal.

To solve this issue, just access your DatoCMS administrative area to populate your content:

https://yoursitename.admin.datocms.com/

5. Manage DatoCMS records

If you want to get rid of the Markdown files in the Jekyll project and integrate the data from DatoCMS instead, just use the dato gem. This gem let's you programmatically read/create/edit/destroy DatoCMS records.

Assuming gem "dato" has already been added to your Gemfile, install the dato gem:

$ bundle install

Assuming there's a dato.config.rb file into your project root directory, to fetch the data from DatoCMS, you should dump all the remote data into local files. That would replace the ones in the Jekyll project:

$ bundle exec dato dump --token=SITE_READONLY_TOKEN // replace the 'SITE_READ_ONLY_TOKEN' string with the actual token (you can find it your DatoCMS Admin area)

Now make sure that the files in the Jekyll project have been replaced.

BE CAREFUL! This script will delete all the files in the specified directories.

6. Resources

Documentation and tutorials:

Dashboards:

7. Authors

This project has been designed and developed by 馃帺 馃惂 Mr. Puffin Studio

Nadal Soler Miriam Soto
@nadalsol @coolcolors
UI / Front-end Developer UI & Brand Designer

fricandorostisseria-v3's People

Contributors

dependabot[bot] avatar nadalsol avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    馃枛 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 馃搳馃搱馃帀

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google 鉂わ笍 Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.