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
# Draft API technique : | |
# calqué sur mongoDB: il y a toujours une clef libre "filter" et "sort" | |
# Pour éviter de créer des méthodes de type postById, postBySlug, postBy{fieldName} | |
# | |
# récupérer une liste de post pour un blog particulier | |
# | |
{ | |
posts( | |
first: 50 |
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
<div id="disqus_thread"></div> | |
<script> | |
var disqus_config = function () { | |
this.page.url = "{{process.env.SITE_URL + page.url}}"; // Replace PAGE_URL with your page's canonical URL variable | |
this.page.identifier = "{{process.env.SITE_URL + page.url}}"; // Replace PAGE_IDENTIFIER with your page's unique identifier variable | |
}; | |
(function() { // DON'T EDIT BELOW THIS LINE | |
var d = document, s = d.createElement('script'); | |
s.src = 'https://{{process.env.DOMAIN}}.disqus.com/embed.js'; | |
s.setAttribute('data-timestamp', +new Date()); |
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
--- | |
permalink: sw.js | |
--- | |
'use strict'; | |
const CACHE_VERSION = {{page.date.getTime()}}; | |
const staticCacheName = "version-" + CACHE_VERSION; | |
const pagesCacheName = 'pages-' + CACHE_VERSION; |
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 { ApolloServer, gql } = require('apollo-server'); | |
// une fausse base de données avec 2 users | |
const users = [ | |
{ | |
id:1, | |
name: 'Yann', | |
email: '[email protected]', | |
}, | |
{ |
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 AWS = require("aws-sdk"); | |
var credentials = { | |
accessKeyId: process.env.AWS_ACCESS_KEY, | |
secretAccessKey: process.env.AWS_SECRET_KEY | |
}; | |
AWS.config.update({ | |
credentials: credentials, | |
region: process.env.AWS_S3_REGION | |
}); |
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
// donne moi l'article 44 du blog numéro 789789689 | |
const post = api.get("https://api.fireblogcms.com/blog/789789689/posts/44") | |
// affichage de l'article 44 | |
<div> | |
{{post.title}} | |
{{post.content}} | |
</div> |
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
document.querySelectorAll("oembed[url]").forEach(element => { | |
iframely.load(element, element.attributes.url.value); | |
}); |
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
# TAGS | |
tags: { | |
_id: "abc" | |
name: { | |
"Fr-fr": "Bonjour", | |
"En-uk": "Hello" | |
} | |
description: { | |
"Fr-fr": "description", |
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
<figure> | |
<figcaption>Your code title</figcaption> | |
<pre> | |
<code contenteditable spellcheck="false"> | |
<!-- your code here --> | |
</code> | |
</pre> | |
</figure> |
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
<script> | |
import CKEditor from "@ckeditor/ckeditor5-vue"; | |
// import Editor from "@ckeditor/ckeditor5-build-classic"; | |
// import Editor from "@ckeditor/ckeditor5-build-balloon"; | |
import Editor from "@ckeditor/ckeditor5-build-balloon-block"; | |
export default { | |
components: { | |
// Use the <ckeditor> component in this view. | |
ckeditor: CKEditor.component |