This file contains hidden or 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
| 3D printing | |
| Abseiling | |
| Acting | |
| Action figure | |
| Adventure racing | |
| Aerobatics | |
| Aeromodeling | |
| Aggressive inline skating | |
| Aid climbing | |
| Aikido |
This file contains hidden or 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
| diff --git a/.gitignore b/.gitignore | |
| index 3565e0d..4014c5b 100644 | |
| --- a/.gitignore | |
| +++ b/.gitignore | |
| @@ -5,4 +5,5 @@ src/_data | |
| src/_works | |
| src/about.md | |
| src/index.md | |
| +src/assets | |
| public |
This file contains hidden or 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
| var Dato = require('datocms-client'); | |
| var Loader = require('datocms-client/lib/local/Loader'); | |
| const client = new Dato.SiteClient('XXX'); | |
| const loader = new Loader(client); | |
| loader.load().then(() => { | |
| const dato = loader.itemsRepo; | |
| // ok, now "dato" exposes everything contained in the space with a friendly API: |
This file contains hidden or 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` } | |
| } | |
| ] |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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`, |