-
Open a DatoCMS administrative area of your own (ie. https://my-site.admin.datocms.com)
-
Open the Browser Inspector and in the console write down the following:
localStorage.setItem('customMessagesUrl', 'https://raw.githubusercontent.com/datocms/translations/master/it.json')
You obviously need to change the URL to your own JSON file.
-
Refresh the page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sub vcl_hash { | |
#FASTLY hash | |
log {"syslog url"} req.url " host " req.http.host " authorization " req.http.Authorization " request " req.request " postbody " req.postbody " hash " req.hash | |
return(hash); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
**Jeff Escalante** | |
# Dato & Contentful | |
There are many areas in which I'd consider Dato to be much stronger of a CMS than | |
contentful, and one in which I'd consider the opposite to be the case. I will try to be as | |
balanced as possible with this overview, as I am not employed by dato or anything ‐ my | |
goal is to ensure that my clients and developers get the best possible experience working | |
with a CMS. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// First option: | |
// This will dump every content of a DatoCMS space in the "backup" directory | |
// To be used with the `dato dump` command (see https://docs.datocms.com/other/basic-usage.html) | |
module.exports = (dato, root, i18n) => { | |
i18n.availableLocales.forEach(locale => { | |
root.directory(`backup/${locale}`, localeDir => { | |
dato.itemTypes.forEach(itemType => { | |
localeDir.createDataFile( | |
`${itemType.apiKey}.json`, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
"https://1a3a62c54d955c8749cc9-admin.hardypress.com/sitemap.xml" | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source "https://rubygems.org" | |
gem "unsplash" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const htmlTag = require('html-tag'); | |
const stringifyObject = require('stringify-object'); | |
const toHtml = (tags) => (tags.map(({tagName, attributes, content}) => (htmlTag(tagName, attributes, content))).join("")); | |
module.exports = (dato, root, i18n) => { | |
i18n.availableLocales.forEach((locale) => { | |
i18n.withLocale(locale, () => { | |
root.createPost(`content/_index.${locale}.md`, 'yaml', { | |
frontmatter: { | |
title: dato.index.title, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source "https://rubygems.org" | |
ruby "2.3.1" | |
gem "rails", "5.0.0.1" | |
gem "rails-i18n" | |
gem "pg" | |
gem "active_model_serializers", "~> 0.10.0" | |
gem "activerecord-session_store" | |
gem "acts-as-taggable-on", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source "https://rubygems.org" | |
ruby "2.3.1" | |
gem "active_model_serializers", "0.10.0.rc4" | |
gem "addressable" | |
gem "aws-sdk" | |
gem "bcrypt" | |
gem "email_validator" | |
gem "faraday" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
new SpikeDatoCMS({ | |
addDataTo: locals, | |
token: 'xxx', | |
templates: [ | |
{ | |
collection: (dato) => dato.blogPosts, | |
path: 'templates/post.html', | |
output: (post) => { return `posts/${post.slug}.html` } | |
} | |
] |