@@ -26,7 +26,7 @@
Tutorials
>
- {{tutorial.shortTitle}}
+ {{tutorial.shortTitle}}
{{currentPage}}
@@ -56,7 +56,6 @@ export default {
return {
isHamburgerClosed: true,
currentPath: self.$route.path.toString(),
- tutorialLanding: '/' + self.$route.path.split('/')[1],
links: [
{ text: 'Home', path: '/' },
{ text: 'Tutorials', path: '/tutorials' },
@@ -75,6 +74,9 @@ export default {
return getTutorialByUrl(this.$route.params.tutorialUrl)
},
+ tutorialUrl: function () {
+ return `/${this.tutorial.url}`
+ },
currentPage: function () {
let pageName
this.links.forEach(link => {
diff --git a/src/router.js b/src/router.js
index 67689b75e..99382b9f9 100644
--- a/src/router.js
+++ b/src/router.js
@@ -80,6 +80,7 @@ const routes = [
migrateCache()
const router = new VueRouter({
+ mode: 'history',
routes,
scrollBehavior (to, from) {
return { x: 0, y: 0 }
@@ -89,7 +90,7 @@ const router = new VueRouter({
// track page view via Countly when route changes
router.afterEach((to) => {
if (!window.Countly) return
- window.Countly.q.push(['track_pageview', '/#' + to.path])
+ window.Countly.q.push(['track_pageview', '/' + to.path])
})
export default router
diff --git a/src/static/tutorials.json b/src/static/tutorials.json
index d26c08ab2..73edd8bd8 100644
--- a/src/static/tutorials.json
+++ b/src/static/tutorials.json
@@ -50,13 +50,13 @@
},
{
"title": "IPFS: Mutable File System (MFS)",
- "link": "https://proto.school/#/mutable-file-system",
+ "link": "https://proto.school/mutable-file-system",
"type": "tutorial",
"description": "Explore the Mutable File System (MFS), which lets you work with files and directories in IPFS as if you were using a traditional name-based file system. (This tutorial includes JavaScript code challenges.)"
},
{
"title": "P2P Data Links with Content Addressing",
- "link": "https://proto.school/#/basics/",
+ "link": "https://proto.school/basics/",
"type": "tutorial",
"description": "Use the IPFS DAG API to create create verifiable links between dataset with Content Identifiers (CIDs). (This tutorial includes JavaScript code challenges.)"
}
@@ -76,7 +76,7 @@
},
{
"title": "Blogging on the Decentralized Web",
- "link": "https://proto.school/#/blog/",
+ "link": "https://proto.school/blog/",
"type": "tutorial",
"description": "Ready for a bigger challenge with the IPFS DAG API? Use CIDs to build and update a complex web of data."
},
@@ -94,7 +94,7 @@
},
{
"title": "IPFS: Regular Files API",
- "link": "https://proto.school/#/regular-files-api",
+ "link": "https://proto.school/regular-files-api",
"type": "tutorial",
"description": "Ready to deal with more than primitives? Explore the API custom-built for efficient handling of files in IPFS."
}
@@ -126,7 +126,7 @@
},
{
"title": "IPFS: Regular Files API",
- "link": "https://proto.school/#/regular-files-api",
+ "link": "https://proto.school/regular-files-api",
"type": "tutorial",
"description": "Ready to deal with more than primitives? Explore the API custom-built for efficient handling of files in IPFS."
}
@@ -159,7 +159,7 @@
},
{
"title": "IPFS: Regular Files API",
- "link": "https://proto.school/#/regular-files-api",
+ "link": "https://proto.school/regular-files-api",
"type": "tutorial",
"description": "Explore the other half of the IPFS Files API, where you'll add and retrieve files and read their contents without the abstraction layer of the Mutable File System."
},
@@ -177,7 +177,7 @@
},
{
"title": "P2P Data Links with Content Addressing",
- "link": "https://proto.school/#/basics/",
+ "link": "https://proto.school/basics/",
"type": "tutorial",
"description": "You've seen the IPFS Files API. Now explore the IPFS DAG API, where you'll use CIDs to create verifiable links between datasets."
}
@@ -210,13 +210,13 @@
},
{
"title": "IPFS: Mutable File System (MFS)",
- "link": "https://proto.school/#/mutable-file-system",
+ "link": "https://proto.school/mutable-file-system",
"type": "tutorial",
"description": "Wish adding files to IPFS felt more like using a traditional name-based file system? Explore the Mutable File System (MFS)."
},
{
"title": "P2P Data Links with Content Addressing",
- "link": "https://proto.school/#/basics/",
+ "link": "https://proto.school/basics/",
"type": "tutorial",
"description": "You've seen the IPFS Files API. Now explore the IPFS DAG API, where you'll use CIDs to create verifiable links between datasets."
}
diff --git a/src/tutorials/0001-data-structures/05.md b/src/tutorials/0001-data-structures/05.md
index d99c6b8d7..e31581b90 100644
--- a/src/tutorials/0001-data-structures/05.md
+++ b/src/tutorials/0001-data-structures/05.md
@@ -54,7 +54,7 @@ these data structures backwards, from the leaf nodes on up to the root node.
## Directed Acyclic Graphs (DAG)
-
+
DAG is an acronym for [`Directed Acyclic Graph`](https://en.wikipedia.org/wiki/Directed_acyclic_graph). It's a fancy way of describing a
specific kind of Merkle tree (hash tree) where different branches in the tree can point at other branches
diff --git a/src/tutorials/0003-blog/01.md b/src/tutorials/0003-blog/01.md
index b66e52b65..99a15a60b 100644
--- a/src/tutorials/0003-blog/01.md
+++ b/src/tutorials/0003-blog/01.md
@@ -3,7 +3,7 @@
type: "code"
---
-In the [Basics tutorial](#/basics/02), we learned that a link in IPFS is represented as an instance of `CID`:
+In the [Basics tutorial](/basics/02), we learned that a link in IPFS is represented as an instance of `CID`:
```javascript
{
diff --git a/src/tutorials/0004-mutable-file-system/01.md b/src/tutorials/0004-mutable-file-system/01.md
index f31d0c3e3..83ed708e9 100644
--- a/src/tutorials/0004-mutable-file-system/01.md
+++ b/src/tutorials/0004-mutable-file-system/01.md
@@ -7,7 +7,7 @@
[IPFS](https://ipfs.io/), or the InterPlanetary File System, is a peer-to-peer (P2P) networking protocol used to share data on the distributed web. As its full name suggests, you can think of IPFS as a file system, and it has some unique characteristics that make it ideal for safe, decentralized sharing.
-If you haven't yet done so, we encourage you to check out our [Decentralized Data Structures tutorial](https://proto.school/#/data-structures/), where you can learn all about the decentralized web and how it compares to the web you're accustomed to. There you'll learn all about content addressing, cryptographic hashing, Content Identifiers (CIDs), and sharing with peers, all of which you'll need to understand to make the most of this tutorial on IPFS.
+If you haven't yet done so, we encourage you to check out our [Decentralized Data Structures tutorial](https://proto.school/data-structures/), where you can learn all about the decentralized web and how it compares to the web you're accustomed to. There you'll learn all about content addressing, cryptographic hashing, Content Identifiers (CIDs), and sharing with peers, all of which you'll need to understand to make the most of this tutorial on IPFS.
## Storing and sharing data in IPFS
diff --git a/src/tutorials/0004-mutable-file-system/06.md b/src/tutorials/0004-mutable-file-system/06.md
index 89828a40b..8a463a176 100644
--- a/src/tutorials/0004-mutable-file-system/06.md
+++ b/src/tutorials/0004-mutable-file-system/06.md
@@ -3,7 +3,7 @@
type: "file-upload"
---
-As you learned in the [Decentralized Data Structures tutorial](https://proto.school/#/data-structures), CIDs (Content Identifiers) are uniquely matched to the content they represent through cryptographic hashing. Two files with identical contents have identical CIDs (hashes) and two files with even the smallest difference between them have distinct CIDs. The same is true for directories. Every time you update the contents of a file or directory, its CID changes.
+As you learned in the [Decentralized Data Structures tutorial](https://proto.school/data-structures), CIDs (Content Identifiers) are uniquely matched to the content they represent through cryptographic hashing. Two files with identical contents have identical CIDs (hashes) and two files with even the smallest difference between them have distinct CIDs. The same is true for directories. Every time you update the contents of a file or directory, its CID changes.
When your root directory was empty and you checked its status using [`ipfs.files.stat`](https://github.com/ipfs/interface-js-ipfs-core/blob/master/SPEC/FILES.md#filesstat), you saw this result:
diff --git a/src/tutorials/0005-regular-files-api/01.md b/src/tutorials/0005-regular-files-api/01.md
index fffda7969..ce312921b 100644
--- a/src/tutorials/0005-regular-files-api/01.md
+++ b/src/tutorials/0005-regular-files-api/01.md
@@ -7,11 +7,11 @@
[IPFS](https://ipfs.io/) is a peer-to-peer (P2P) networking protocol used to share data on the distributed web. You can think of it as a file system with some unique characteristics that make it ideal for safe, decentralized sharing.
-If you haven't yet done so, we encourage you to check out our [Decentralized Data Structures](https://proto.school/#/data-structures/) tutorial to learn all about the decentralized web and how it compares to the web you're accustomed to. There you'll learn all about content addressing, cryptographic hashing, Content Identifiers (CIDs), and sharing with peers, all of which you'll need to understand to make the most of this tutorial.
+If you haven't yet done so, we encourage you to check out our [Decentralized Data Structures](https://proto.school/data-structures/) tutorial to learn all about the decentralized web and how it compares to the web you're accustomed to. There you'll learn all about content addressing, cryptographic hashing, Content Identifiers (CIDs), and sharing with peers, all of which you'll need to understand to make the most of this tutorial.
## The Files API vs the DAG API
-You can store multiple types of data with IPFS. If you've explored our [P2P Data Links with Content Addressing](https://proto.school/#/basics) or [Blogging on the Decentralized Web](https://proto.school/#/blog) tutorial, you've already seen how you can store primitives, objects and arrays on the network using the DAG API.
+You can store multiple types of data with IPFS. If you've explored our [P2P Data Links with Content Addressing](https://proto.school/basics) or [Blogging on the Decentralized Web](https://proto.school/blog) tutorial, you've already seen how you can store primitives, objects and arrays on the network using the DAG API.
The DAG API allows you to use the unique and versatile primitive data structures offered by [IPLD](https://github.com/ipld/ipld) (InterPlanetary Linked Data) within IPFS. You can recognize its methods in js-ipfs (the JavaScript implementation of IPFS) because they take the following format: `ipfs.dag.someMethod()`
@@ -21,7 +21,7 @@ The Files API, on the other hand, is custom-built for a more specific use case.
## The Regular Files API vs the MFS Files API
-If you've read our [Mutable File System tutorial](https://proto.school/#/mutable-file-system), you may be thinking, "I've already learned how to work with files on IPFS. How will this be any different?"
+If you've read our [Mutable File System tutorial](https://proto.school/mutable-file-system), you may be thinking, "I've already learned how to work with files on IPFS. How will this be any different?"
The Mutable File System (MFS) provides an API designed to replicate familiar file system operations such as `mkdir`, `ls`, `cp`, and others, mimicking the way you organize files and directories on a computer. However, the way that content is addressed in IPFS makes it an immutable file system. The address to a file or directory depends on its contents, so any change to a file or directory will result in an entirely new address. The MFS Files API works on a familiar-looking file system with regular paths — like `/some/stuff` — in the local IPFS node, which hides the complexity of immutable content addressing.
diff --git a/src/tutorials/0005-regular-files-api/03.md b/src/tutorials/0005-regular-files-api/03.md
index 3aa141254..a23edd4ac 100644
--- a/src/tutorials/0005-regular-files-api/03.md
+++ b/src/tutorials/0005-regular-files-api/03.md
@@ -46,6 +46,6 @@ The result of this `Promise` is an array of objects, one for each file added to
}
```
-The value of the `hash` is a CID (Content Identifier), a unique address generated from the content of the node. (For a more in-depth look at how CIDs are generated and why they're important, check out our [Decentralized data structures](https://proto.school/#/data-structures) tutorial.) In a future lesson, we will learn how to use this value to retrieve the contents of a file.
+The value of the `hash` is a CID (Content Identifier), a unique address generated from the content of the node. (For a more in-depth look at how CIDs are generated and why they're important, check out our [Decentralized data structures](https://proto.school/data-structures) tutorial.) In a future lesson, we will learn how to use this value to retrieve the contents of a file.
The `add` method accepts other `data` formats besides the `File` object and offers many advanced `options` for setting your chunk size and hashing algorithm, pinning files as they're added, and more. We're highlighting the basics in this tutorial, but you can check out the [full documentation](https://github.com/ipfs/interface-js-ipfs-core/blob/master/SPEC/FILES.md#add) to learn more.
diff --git a/src/tutorials/0005-regular-files-api/04.md b/src/tutorials/0005-regular-files-api/04.md
index 6f71ad801..013a7f45c 100644
--- a/src/tutorials/0005-regular-files-api/04.md
+++ b/src/tutorials/0005-regular-files-api/04.md
@@ -3,7 +3,7 @@
type: "code"
---
-In the previous lesson, you saw that each file added to IPFS has its own unique `hash` derived from its content. This `hash`, also known as a [CID (Content Identifier)](https://proto.school/#/data-structures/04), can be used like an address to access the file. If you know a file's CID, you can use the `cat` method provided by the Regular IPFS Files API -- similar to the one you may have seen previously in Unix-style systems -- to retrieve its contents like so:
+In the previous lesson, you saw that each file added to IPFS has its own unique `hash` derived from its content. This `hash`, also known as a [CID (Content Identifier)](https://proto.school/data-structures/04), can be used like an address to access the file. If you know a file's CID, you can use the `cat` method provided by the Regular IPFS Files API -- similar to the one you may have seen previously in Unix-style systems -- to retrieve its contents like so:
```javascript
await ipfs.cat(ipfsPath, [options])
diff --git a/src/tutorials/0005-regular-files-api/05.md b/src/tutorials/0005-regular-files-api/05.md
index 2a3c3a4a0..c45a6cefc 100644
--- a/src/tutorials/0005-regular-files-api/05.md
+++ b/src/tutorials/0005-regular-files-api/05.md
@@ -64,7 +64,7 @@ In this case we'd end up with six objects in our resulting array: one for each o
It's important to note that directories we create in this way do not behave as in a regular file system. If we've wrapped some files with a directory with using `add`, we can't simply `add` new files to that directory. The contents of the directory we just created are final and immutable.
-This is because of the way in which IPFS uses [content addressing](https://proto.school/#/data-structures/03): different contents lead to a different cryptograhpic hash (Content Identifier), whether we're working with directories or files themselves.
+This is because of the way in which IPFS uses [content addressing](https://proto.school/data-structures/03): different contents lead to a different cryptograhpic hash (Content Identifier), whether we're working with directories or files themselves.
But what if you forgot to add a file to a directory you just created? You'll have to call the `add` method again with all the files you want wrapped with that directory, resulting in a new directory altogether with a new CID.
@@ -73,4 +73,4 @@ However, it's important to note that the file won't actually be stored multiple
**Rather than thinking of directories created with `{ wrapWithDirectory: true }` as traditional file folders, it's more useful to think of them as naming shortcuts, as we'll see in upcoming lessons.**
## An alternative
-If you're looking for an experience that better mimics a traditional file system, you should explore the [Mutable File System (MFS)](https://proto.school/#/mutable-file-system), a tool built into IPFS that lets you treat files like you normally would in a name-based filesystem — you can add, remove, move, and edit MFS files and have all the work of updating links and hashes taken care of for you. It's an abstraction that lets you deal with immutable data as if it were mutable.
+If you're looking for an experience that better mimics a traditional file system, you should explore the [Mutable File System (MFS)](https://proto.school/mutable-file-system), a tool built into IPFS that lets you treat files like you normally would in a name-based filesystem — you can add, remove, move, and edit MFS files and have all the work of updating links and hashes taken care of for you. It's an abstraction that lets you deal with immutable data as if it were mutable.
diff --git a/src/tutorials/0005-regular-files-api/07.md b/src/tutorials/0005-regular-files-api/07.md
index ee9b3bae3..f3142bbb3 100644
--- a/src/tutorials/0005-regular-files-api/07.md
+++ b/src/tutorials/0005-regular-files-api/07.md
@@ -5,7 +5,7 @@
So far, we've used the CID of the file or directory as the path when accessing a file. However, now that we've learned we can wrap a number of files into a directory, we have a new way to address a file.
-As you saw in our lesson on the [`wrapWithDirectory` option](https://proto.school/#/file-api/05), we can add one or more files to a new directory and, when doing so, we need to provide a name to each one of the files we add. As a result, the `add` method call returns us an array which contains the `hash` value (CID) for each of the files and directories created.
+As you saw in our lesson on the [`wrapWithDirectory` option](https://proto.school/file-api/05), we can add one or more files to a new directory and, when doing so, we need to provide a name to each one of the files we add. As a result, the `add` method call returns us an array which contains the `hash` value (CID) for each of the files and directories created.
As mentioned earlier, it's useful to think of directories created with `{ wrapWithDirectory: true }` as naming shortcuts, rather than as traditional file folders. Here's why:
diff --git a/src/utils/tutorials.js b/src/utils/tutorials.js
index bc7b47386..3c2c70941 100644
--- a/src/utils/tutorials.js
+++ b/src/utils/tutorials.js
@@ -67,7 +67,7 @@ export function getLesson (tutorialId, lessonId) {
// returns URL for tutorial's landing page
export function getTutorialFullUrl (tutorialId) {
- return `${window.location.origin}/#/${tutorials[tutorialId].url}`
+ return `${window.location.origin}/${tutorials[tutorialId].url}`
}
// returns boolean - true if user has passed all lessons in the tutorial
diff --git a/vue.config.js b/vue.config.js
index 01b4e433b..1ea7dee35 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -1,7 +1,7 @@
const CopyWebpackPlugin = require('copy-webpack-plugin')
module.exports = {
- publicPath: './',
+ publicPath: '/',
devServer: {
port: 3000,
disableHostCheck: true