Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename lessons & change IPLD mentions to IPFS #76

Merged
merged 5 commits into from Nov 1, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/Lesson.vue
Expand Up @@ -30,7 +30,7 @@
<svg viewBox="0 0 12 12" width='12' xmlns="http://www.w3.org/2000/svg" style='vertical-align:-1px'>
<circle cx="6" cy="6" r="6"/>
</svg>
<span class="green ttu f6 pl2 pr3">Exercise {{lessonNumber}}</span>
<span class="green ttu f6 pl2 pr3">Exercise</span>
<span class="navy fw5 f5">{{lessonTitle}}</span>
<div class="fr">
<button
Expand Down
2 changes: 1 addition & 1 deletion src/components/home/ExerciseLink.vue
@@ -1,6 +1,6 @@
<template>
<router-link :to="to" class="link db pa3 bb b--white green hover-bg-washed-yellow">
<span class="green ttu f6 pr3">Exercise {{index}}</span>
<span class="green ttu f6 pr3">Lesson {{index}}</span>
<span class="navy fw5">{{name}}</span>
</router-link>
</template>
Expand Down
30 changes: 15 additions & 15 deletions src/components/home/Home.vue
Expand Up @@ -31,23 +31,23 @@
</label>
<div class="flex items-start pv4">
<div class="section-1 flex-none tc">
<h1 class="ma0 f3 fw6 pb2">IPLD</h1>
<img src="./ipld.svg" alt="" style="height: 54px"/>
<h1 class="ma0 f3 fw6 pb2">IPFS</h1>
<img src="./ipfs.svg" alt="" style="height: 54px"/>
</div>
<div class="w-100 w-50-ns measure-wide ph2 ph0-ns">
<h2 class="ma0 f3 fw5">P2P data links with content addressing</h2>
<p class="f5 fw5 ma0 pt2 lh-copy measure-wide charcoal-muted">
Store, fetch, and create verifiable links between peer-hosted datasets with IPLD and CIDs. It’s graphs with friends!
Store, fetch, and create verifiable links between peer-hosted datasets with IPFS and CIDs. It’s graphs with friends!
</p>
<ul class="mv4 pa0 f5" style="list-style-type: none; background: rgba(11, 58, 82, 5%)">
<li>
<ExerciseLink to="/basics/01" index="1" name="Basic write" />
<ExerciseLink to="/basics/01" index="1" name="Create a node and return a Content Identifier (CID)" />
</li>
<li>
<ExerciseLink to="/basics/02" index="2" name="Linking data" />
<ExerciseLink to="/basics/02" index="2" name="Create a new node that's linked to an old one" />
</li>
<li>
<ExerciseLink to="/basics/03" index="3" name="Reading data in links" />
<ExerciseLink to="/basics/03" index="3" name="Read nested data using links" />
</li>
</ul>
</div>
Expand All @@ -59,8 +59,8 @@
<section class="db">
<div class="flex items-start pv4">
<div class="section-1 flex-none tc">
<h1 class="ma0 f3 fw6 pb2">IPLD</h1>
<img src="./ipld.svg" alt="" style="height: 54px"/>
<h1 class="ma0 f3 fw6 pb2">IPFS</h1>
<img src="./ipfs.svg" alt="" style="height: 54px"/>
</div>
<div class="w-100 w-50-ns measure-wide ph2 ph0-ns">
<h2 class="ma0 f3 fw5 ">Blogging on the Decentralized Web</h2>
Expand All @@ -69,25 +69,25 @@
</p>
<ul class="mv4 pa0 f5" style="list-style-type: none; background: rgba(11, 58, 82, 5%)">
<li>
<ExerciseLink to="/blog/01" index="1" name="Basic linking" />
<ExerciseLink to="/blog/01" index="1" name="Link an author to a blog post using its CID" />
</li>
<li>
<ExerciseLink to="/blog/02" index="2" name="CIDs change" />
<ExerciseLink to="/blog/02" index="2" name="Update posts with tags and watch their CIDs change" />
</li>
<li>
<ExerciseLink to="/blog/03" index="3" name="Multiple links" />
<ExerciseLink to="/blog/03" index="3" name="Build a tag cloud with arrays of links" />
</li>
<li>
<ExerciseLink to="/blog/04" index="4" name="Bigger DAG" />
<ExerciseLink to="/blog/04" index="4" name="Add a new blog post linked to an author and tags" />
</li>
<li>
<ExerciseLink to="/blog/05" index="5" name="Keep building links" />
<ExerciseLink to="/blog/05" index="5" name="Add a new tag linked to multiple blog posts" />
</li>
<li>
<ExerciseLink to="/blog/06" index="6" name="Chain of links" />
<ExerciseLink to="/blog/06" index="6" name="List posts chronologically with a chain of links" />
</li>
<li>
<ExerciseLink to="/blog/07" index="7" name="Hop through nodes" />
<ExerciseLink to="/blog/07" index="7" name="Traverse through all posts, starting with the most recent" />
</li>
</ul>
</div>
Expand Down
20 changes: 20 additions & 0 deletions src/components/home/ipfs.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/lessons/Basics/01.vue
Expand Up @@ -2,7 +2,7 @@
<div class="lesson-01">
<Lesson :text="text" :validate="validate"
:exercise="exercise" :concepts="concepts"
lessonTitle="Basic write">
lessonTitle="Create a node and return a Content Identifier (CID)">
</Lesson>
</div>
</template>
Expand Down
2 changes: 1 addition & 1 deletion src/lessons/Basics/02.vue
Expand Up @@ -5,7 +5,7 @@
:modules="modules"
:exercise="exercise"
:concepts="concepts"
lessonTitle="Linking data">
lessonTitle="Create a new node that's linked to an old one">
</Lesson>
</div>
</template>
Expand Down
2 changes: 1 addition & 1 deletion src/lessons/Basics/03.md
Expand Up @@ -13,7 +13,7 @@ console.log(await ipfs.dag.get(cid, '/my/deep/obj'))
/* prints {value: 'is cool', remainderPath: ''} */
```

`ipfs.dag.get()` allows queries using IPLD paths.
`ipfs.dag.get()` allows queries using IPFS paths.
These queries return an object containing the value of the query and any remaining path that was unresolved.

The cool thing about this API is that it can also traverse through links.
Expand Down
2 changes: 1 addition & 1 deletion src/lessons/Basics/03.vue
Expand Up @@ -4,7 +4,7 @@
:validate="validate"
:modules="modules"
:exercise="exercise"
lessonTitle="Reading data in links"
lessonTitle="Read nested data using links"
last="true">
</Lesson>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/lessons/Blog/01.md
@@ -1,6 +1,6 @@
This exercise has some prepared code to get started faster. It resembles a blog. There are authors (Nat and Sam) and some blog posts about trees and computers. At the moment there’s no relation between them. Let’s update the blog posts so that they link to the author.

In the [basic lessons](#/basics/02), we learned that a link in IPLD is represented as an object with a slash as its only field:
In the [basic lessons](#/basics/02), we learned that a link in IPFS is represented as an object with a slash as its only field:

```javascript
const link = {'/': 'a-base-encoded-cid'}
Expand Down
2 changes: 1 addition & 1 deletion src/lessons/Blog/01.vue
Expand Up @@ -3,7 +3,7 @@
<Lesson v-bind:text="text" v-bind:code="code"
:validate="validate"
:exercise="exercise"
lessonTitle="Basic linking">
lessonTitle="Link an author to a blog post using its CID">
</Lesson>
</div>
</template>
Expand Down
2 changes: 1 addition & 1 deletion src/lessons/Blog/02.md
@@ -1,4 +1,4 @@
Everything that is stored in IPLD has an associated CID. That CID is constructed by hashing the data itself. If the same hash and encoding is used, then the same data will result in the same CID. This means that as soon as you edit data and store it, it will have a new CID. The old data won’t be overridden; it’s still there.
Everything that is stored in IPFS has an associated CID. That CID is constructed by hashing the data itself. If the same hash and encoding is used, then the same data will result in the same CID. This means that as soon as you edit data and store it, it will have a new CID. The old data won’t be overridden; it’s still there.

Before modifying the code, please open the developer tools in your browser and submit the code. You’ll see the CIDs of the blog posts in the console. When you look at the console again after you’ve modified the code, you’ll see the CIDs have changed.

Expand Down
2 changes: 1 addition & 1 deletion src/lessons/Blog/02.vue
Expand Up @@ -3,7 +3,7 @@
<Lesson v-bind:text="text" v-bind:code="code"
:validate="validate"
:exercise="exercise"
lessonTitle="CIDs change">
lessonTitle="Update posts with tags and watch their CIDs change">
</Lesson>
</div>
</template>
Expand Down
2 changes: 1 addition & 1 deletion src/lessons/Blog/03-exercise.md
@@ -1 +1 @@
Insert those new tag objects into IPLD via `ipfs.dag.put()` and return the two resulting CIDs as an array.
Insert those new tag objects into IPFS via `ipfs.dag.put()` and return the two resulting CIDs as an array.
2 changes: 1 addition & 1 deletion src/lessons/Blog/03.vue
Expand Up @@ -3,7 +3,7 @@
<Lesson v-bind:text="text" v-bind:code="code"
:validate="validate"
:exercise="exercise"
lessonTitle="Multiple links">
lessonTitle="Build a tag cloud with arrays of links">
</Lesson>
</div>
</template>
Expand Down
2 changes: 1 addition & 1 deletion src/lessons/Blog/04.vue
Expand Up @@ -3,7 +3,7 @@
<Lesson v-bind:text="text" v-bind:code="code"
:validate="validate"
:exercise="exercise"
lessonTitle="Bigger DAG">
lessonTitle="Add a new blog post linked to an author and tags">
</Lesson>
</div>
</template>
Expand Down
2 changes: 1 addition & 1 deletion src/lessons/Blog/05.vue
Expand Up @@ -3,7 +3,7 @@
<Lesson v-bind:text="text" v-bind:code="code"
:validate="validate"
:exercise="exercise"
lessonTitle="Keep building links">
lessonTitle="Add a new tag linked to multiple blog posts">
</Lesson>
</div>
</template>
Expand Down
2 changes: 1 addition & 1 deletion src/lessons/Blog/06.md
Expand Up @@ -4,4 +4,4 @@ You *could* do it the same way as we did with tags. However, you would need to u

There’s a better way! Whenever you create a new blog post, you can link to the previous one directly. You can walk those links to create the overview page dynamically (which we’ll do in the next exercise).

We know the CID of a blog post as soon as it is stored in IPLD. We can use that CID to link from newer blog posts to older ones.
We know the CID of a blog post as soon as it is stored in IPFS. We can use that CID to link from newer blog posts to older ones.
2 changes: 1 addition & 1 deletion src/lessons/Blog/06.vue
Expand Up @@ -3,7 +3,7 @@
<Lesson v-bind:text="text" v-bind:code="code"
:validate="validate"
:exercise="exercise"
lessonTitle="Chain of links">
lessonTitle="List posts chronologically with a chain of links">
</Lesson>
</div>
</template>
Expand Down
2 changes: 1 addition & 1 deletion src/lessons/Blog/07.vue
Expand Up @@ -4,7 +4,7 @@
:validate="validate"
:modules="modules"
:exercise="exercise"
lessonTitle="Hop through nodes"
lessonTitle="Traverse through all posts, starting with the most recent"
last="true">
</Lesson>
</div>
Expand Down