Skip to content

Advertising and communication agency located in Málaga (Spain).

Notifications You must be signed in to change notification settings

nadalsol/munichagency

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Munich Agency

  1. Description
  2. Installation
  3. Usage
  4. Configuration
  5. Deploy
  6. Publish content
  7. Manage DatoCMS records
  8. Resources
  9. Authors

Description

This 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.

Installation

First install Ruby and RubyGems.

Then you can install Jekyll with the following command:

$ gem install jekyll bundler

Clone GitHub repo:

$ git clone git@github.com:yourusername/yoursitename.git

Usage

Change into your new directory:

$ cd yoursitename

Build the site on the preview server:

$ bundle exec jekyll server

Now browse to http://localhost:4000

♻️ Don't forget to reload your browser to apply new changes.

Configuration

Site settings in the _config.yml file, are used to personalize your new site. If you look in the HTML files, you will see them accessed via {{ site.title }}, {{ site.email }}, and so on. You can create any custom variable you would like, and they will be accessible in the templates via {{ site.myvariable }}.

⚠️ For technical reasons, the _config.yml file is NOT reloaded automatically when you use $ bundle exec jekyll serve. If you change this file, please restart the server process.

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's master branch, Netlify will repeat the build process and deploy a new version of the site, to your custom domain:

http://www.yoursitename.com/

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.3.6 but you can specify 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.2.9
2.3.6
2.4.3

More info: Netlify documentation: Continuous Deployment > Set Node, Ruby, or Python version

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/

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.

Resources

Documentation and tutorials:

Dashboards:

Authors

This project has been designed and developed by 🎩 🐧 Mr. Puffin Studio, a communication studio based in Vilassar de Mar, Barcelona.


Nadal Soler

@nadalsol


Front-end Web Developer


Miriam Soto

@coolcolors


UI & Visual Designer


Irene Molina

@molinairene


Digital Project Manager

About

Advertising and communication agency located in Málaga (Spain).

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •