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 "Core Concepts" to "Learn" #433

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .cspell/template-words.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Words found in our template code
brower
coreconcepts
elif
endfor
endlayoutblock
Expand Down
18 changes: 9 additions & 9 deletions 11ty-extensions/markdown-it-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function composeAttributeString(token, defaultAttrs ={}) {
//convert token.attrs to an object and merge with defaultAttrs
const attrs = token.attrs ? token.attrs.reduce((acc, attr) => { acc[attr[0]] = attr[1]; return acc; }, {}) : {};
const mergedAttrs = Object.assign({}, defaultAttrs, attrs);

return Object.keys(mergedAttrs).reduce((acc, key) => acc + ` ${key}="${mergedAttrs[key]}"`, "");
}

Expand Down Expand Up @@ -77,22 +77,22 @@ const validateDetailsBlock = (params) => {
/* End Details Block code */

/**
* Configures Markdown-it lib plugins etc. Meant to be called from .eleventy.js
* @param {*} eleventyConfig
* Configures Markdown-it lib plugins etc. Meant to be called from .eleventy.js
* @param {*} eleventyConfig
*/
module.exports = function(eleventyConfig) {
eleventyConfig.amendLibrary("md", (mdLib) => {
mdLib.set({ typographer: true });

//Configure markdown-it plugins
mdLib.use(markdownItAttrs);
mdLib.use(markdownItAnchor, { tabIndex: false, slugify: s => slugify(s) });
mdLib.use(markdownItContainer, "coreconcepts-intro");
mdLib.use(markdownItContainer, "coreconcepts-orientation");
mdLib.use(markdownItContainer, "coreconcepts-storysequence");
mdLib.use(markdownItContainer, "learn-intro");
mdLib.use(markdownItContainer, "learn-orientation");
mdLib.use(markdownItContainer, "learn-storysequence");
mdLib.use(markdownItContainer, "h-author");
mdLib.use(markdownItContainer, "output-block");

// Admonitions
mdLib.use(markdownItContainer, "tip", { marker: "!", render: composeGenericAdmonitionRenderFunc("tip") });
mdLib.use(markdownItContainer, "note", { marker: "!", render: composeGenericAdmonitionRenderFunc("note") });
Expand All @@ -104,5 +104,5 @@ module.exports = function(eleventyConfig) {
// Create a specialized synonym for details block with a class of "dig-deeper"
mdLib.use(markdownItContainer, "dig-deeper", { marker: "!", render: composeDetailsBlockRenderFunc("dig-deeper") });
});

}
8 changes: 4 additions & 4 deletions 11ty-markdown-changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@

## Divs
- No more `markdown=1`, instead leave a blank line after.
- coreconcepts-intro, coreconcepts-orientation, and coreconcepts-storysequence divs have been created as MD containers. Use:
- learn-intro, learn-orientation, and learn-storysequence divs have been created as MD containers. Use:
```
::: coreconcepts-intro
::: learn-intro
words words
:::
```
Expand All @@ -37,7 +37,7 @@

## Center an Image
```
![](/assets/img/concepts/8.8-assigned-capability.png)
![](/assets/img/learn/8.8-assigned-capability.png)
{.center}
```
Note: The new line after the image is required to put the class in the enclosing `<p>`
Expand All @@ -46,7 +46,7 @@ Note: The new line after the image is required to put the class in the enclosing
Obviously it would be optimal to actually resize the image. But you can tweak the max-width with the classes
`sz10p` (10%) through `sz200p` (200%)
```
![](/assets/img/concepts/8.1-calls.png){.sz50p}
![](/assets/img/learn/8.1-calls.png){.sz50p}
```

## Items to add to README
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,26 +72,26 @@ Additionally the following `markdown-it` plugins have been added:
There are of course more details. See the docs at [markdown-it-attrs](https://github.com/arve0/markdown-it-attrs) for more.
- [markdown-it-container](https://github.com/markdown-it/markdown-it-container) Plugin for creating block-level custom containers. For example:
```
::: coreconcepts-intro
::: learn-intro
Blah blah
:::
```

renders as

```
<div class="coreconcepts-intro">
<div class="learn-intro">
<p>Blah blah</p>
</div>
```
Please note: The closing `:::` is required. Also if you need to nest containers then the outer container gets an additional `:`.
Each container type needs to be configured in `markdown-it-config.js` for examples and to add more. This one provides a lot of flexibility.

## Site search and indexing
The site uses the [Pagefind](https://pagefind.app/) library to index the contents of the site and to find search results upon request.
The documentation is quite good. One thing to note; pages are indexed based on the inclusion of the `data-pagefind-body`
attribute on a page. It is included on all of the main pages (all but the Design System). If you need to remove some or all of a page
from indexing you can use the `data-pagefind-ignore` attribute. See (https://pagefind.app/docs/indexing/) for details.
The site uses the [Pagefind](https://pagefind.app/) library to index the contents of the site and to find search results upon request.
The documentation is quite good. One thing to note; pages are indexed based on the inclusion of the `data-pagefind-body`
attribute on a page. It is included on all of the main pages (all but the Design System). If you need to remove some or all of a page
from indexing you can use the `data-pagefind-ignore` attribute. See (https://pagefind.app/docs/indexing/) for details.

## Setup for Dev
- `npm install`
Expand Down
20 changes: 13 additions & 7 deletions netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,27 +48,27 @@
# so let's redirect them.
[[redirects]]
from = "/docs/concepts/3_private_data/"
to = "/concepts/3_source_chain/"
to = "/learn/3_source_chain/"
status = 301

[[redirects]]
from = "/docs/concepts/4_public_data_on_the_dht/"
to = "/concepts/4_dht/"
to = "/learn/4_dht/"
status = 301

[[redirects]]
from = "/docs/concepts/5_linking_data_together/"
to = "/concepts/5_links_anchors/"
to = "/learn/5_links_anchors/"
status = 301

[[redirects]]
from = "/docs/concepts/6_modifying_and_deleting_data/"
to = "/concepts/6_crud_actions/"
to = "/learn/6_crud_actions/"
status = 301

[[redirects]]
from = "/docs/concepts/8_node_to_node_messaging/"
to = "/concepts/8_calls_capabilities/"
to = "/learn/8_calls_capabilities/"
status = 301

[[redirects]]
Expand Down Expand Up @@ -112,10 +112,16 @@
to = "/resources/glossary/"
status = 301

# The Core Concepts guide has been renamed to Learn.
[[redirects]]
from = "/concepts/*"
to = "/learn/:splat"
status = 302

# The front page for the core concepts has been removed.
[[redirects]]
from = "/concepts/"
to = "/concepts/1_the_basics/"
from = "/learn/"
to = "/learn/1_the_basics/"
# Keeping this as a 302 in case we decide we want a front page again.
status = 302

Expand Down
4 changes: 2 additions & 2 deletions src/custom/script.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
if (document.location.pathname.indexOf("/concepts/") == 0) {
document.body.className = "page-concepts";
if (document.location.pathname.indexOf("/learn/") == 0) {
document.body.className = "page-learn";
}
64 changes: 32 additions & 32 deletions src/custom/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -93,25 +93,25 @@ code, kbd, pre { font-family: 'Roboto Mono', 'Courier New', Courier, monospace;
.md-sidebar.md-sidebar--primary nav.md-nav:not(.md-nav--primary) .md-nav__list .md-nav__item.md-nav__item--active .md-nav__list .md-nav__item.md-nav__item--active, .md-sidebar.md-sidebar--primary nav.md-nav:not(.md-nav--primary) .md-nav__list .md-nav__item .md-nav__item, .md-sidebar.md-sidebar--primary nav.md-nav:not(.md-nav--primary) .md-nav__list .md-nav__item .md-nav__item:hover, .md-sidebar.md-sidebar--primary nav.md-nav:not(.md-nav--primary) .md-nav__list .md-nav__item.md-nav__item--active .md-nav__item:hover { background: #F1F1F1 !important; }
.md-nav__link--active, .md-nav__link:hover, .md-nav__link:active, .md-nav__link:focus { color: rgba(0,0,0,.87) !important; }

body.page-concepts .md-sidebar.md-sidebar--primary li { position: relative; }
body.page-concepts .md-sidebar.md-sidebar--primary li a { padding-left: 43px; font-weight: normal; }
body.page-concepts .md-sidebar.md-sidebar--primary li:first-child a { padding-left: 10px; font-weight: bold; }
body.page-concepts .md-sidebar.md-sidebar--primary li:before { width: 28px; text-align: center; font-weight: bold; font-size: 16px; letter-spacing: -.5px; text-align: center; position: absolute; top: 10px; left: 8px; pointer-events: none; }
body.page-concepts .md-sidebar.md-sidebar--primary .md-nav__list li:nth-of-type(2):before { content: '01'; }
body.page-concepts .md-sidebar.md-sidebar--primary .md-nav__list li:nth-of-type(3):before { content: '02'; }
body.page-concepts .md-sidebar.md-sidebar--primary .md-nav__list li:nth-of-type(4):before { content: '03'; }
body.page-concepts .md-sidebar.md-sidebar--primary .md-nav__list li:nth-of-type(5):before { content: '04'; }
body.page-concepts .md-sidebar.md-sidebar--primary .md-nav__list li:nth-of-type(6):before { content: '05'; }
body.page-concepts .md-sidebar.md-sidebar--primary .md-nav__list li:nth-of-type(7):before { content: '06'; }
body.page-concepts .md-sidebar.md-sidebar--primary .md-nav__list li:nth-of-type(8):before { content: '07'; }
body.page-concepts .md-sidebar.md-sidebar--primary .md-nav__list li:nth-of-type(9):before { content: '08'; }
body.page-concepts .md-sidebar.md-sidebar--primary .md-nav__list li:nth-of-type(10):before { content: '09'; }
body.page-concepts .md-sidebar.md-sidebar--primary .md-nav__list li:nth-of-type(11):before { content: '10'; }
body.page-concepts .md-sidebar.md-sidebar--primary .md-nav__list li:nth-of-type(12):before { content: '11'; }
body.page-concepts .md-sidebar.md-sidebar--primary .md-nav__list li:nth-of-type(13):before { content: '12'; }
body.page-concepts .md-sidebar.md-sidebar--primary .md-nav__list li:nth-of-type(14):before { content: '13'; }
body.page-concepts .md-sidebar.md-sidebar--primary .md-nav__list li:nth-of-type(15):before { content: '14'; }
body.page-concepts .md-sidebar.md-sidebar--primary .md-nav__list li:nth-of-type(16):before { content: '15'; }
body.page-learn .md-sidebar.md-sidebar--primary li { position: relative; }
body.page-learn .md-sidebar.md-sidebar--primary li a { padding-left: 43px; font-weight: normal; }
body.page-learn .md-sidebar.md-sidebar--primary li:first-child a { padding-left: 10px; font-weight: bold; }
body.page-learn .md-sidebar.md-sidebar--primary li:before { width: 28px; text-align: center; font-weight: bold; font-size: 16px; letter-spacing: -.5px; text-align: center; position: absolute; top: 10px; left: 8px; pointer-events: none; }
body.page-learn .md-sidebar.md-sidebar--primary .md-nav__list li:nth-of-type(2):before { content: '01'; }
body.page-learn .md-sidebar.md-sidebar--primary .md-nav__list li:nth-of-type(3):before { content: '02'; }
body.page-learn .md-sidebar.md-sidebar--primary .md-nav__list li:nth-of-type(4):before { content: '03'; }
body.page-learn .md-sidebar.md-sidebar--primary .md-nav__list li:nth-of-type(5):before { content: '04'; }
body.page-learn .md-sidebar.md-sidebar--primary .md-nav__list li:nth-of-type(6):before { content: '05'; }
body.page-learn .md-sidebar.md-sidebar--primary .md-nav__list li:nth-of-type(7):before { content: '06'; }
body.page-learn .md-sidebar.md-sidebar--primary .md-nav__list li:nth-of-type(8):before { content: '07'; }
body.page-learn .md-sidebar.md-sidebar--primary .md-nav__list li:nth-of-type(9):before { content: '08'; }
body.page-learn .md-sidebar.md-sidebar--primary .md-nav__list li:nth-of-type(10):before { content: '09'; }
body.page-learn .md-sidebar.md-sidebar--primary .md-nav__list li:nth-of-type(11):before { content: '10'; }
body.page-learn .md-sidebar.md-sidebar--primary .md-nav__list li:nth-of-type(12):before { content: '11'; }
body.page-learn .md-sidebar.md-sidebar--primary .md-nav__list li:nth-of-type(13):before { content: '12'; }
body.page-learn .md-sidebar.md-sidebar--primary .md-nav__list li:nth-of-type(14):before { content: '13'; }
body.page-learn .md-sidebar.md-sidebar--primary .md-nav__list li:nth-of-type(15):before { content: '14'; }
body.page-learn .md-sidebar.md-sidebar--primary .md-nav__list li:nth-of-type(16):before { content: '15'; }
}

@media only screen and (max-width: 76.1875em) {
Expand Down Expand Up @@ -149,21 +149,21 @@ article img { display: table; margin-left: auto; margin-right: auto; }

/* Core Concepts */
pdaoust marked this conversation as resolved.
Show resolved Hide resolved

.md-typeset .coreconcepts-intro { font-size: .98rem; border-left: .2rem solid rgba(0,0,0,.2); padding-left: 0.6rem; font-weight: 500; line-height: 1.55; }
.md-typeset .coreconcepts-intro p { letter-spacing: -.3px; }
.md-typeset .coreconcepts-orientation { margin: 2.2rem 0; padding: 1.6rem 1.2rem 1.8rem; background: #F8F8F8; position: relative; }
.md-typeset .coreconcepts-orientation :first-child { margin-top: 0; }
.md-typeset .coreconcepts-orientation :last-child { margin-bottom: 0; }
.md-typeset .coreconcepts-orientation h2, .md-typeset .coreconcepts-orientation h3 { position: relative; }
.md-typeset .coreconcepts-orientation a { font-weight: 500; letter-spacing: -.3px; }
.md-typeset .coreconcepts-orientation i { position: absolute; left: -40px; top: 13px; font-size: 28px; color: #3915ad; }
.md-typeset .coreconcepts-orientation ol { margin-bottom: -12px; margin-left: 0; }
.md-typeset .coreconcepts-storysequence > ol { margin-left: 0; }
.md-typeset .coreconcepts-storysequence > ol > li { list-style: none; padding: 0.6rem; background: #F8F8F8; margin: 1rem 0; }
.md-typeset .coreconcepts-storysequence > ol > li > img { margin-bottom: 1rem; }
.md-typeset .learn-intro { font-size: .98rem; border-left: .2rem solid rgba(0,0,0,.2); padding-left: 0.6rem; font-weight: 500; line-height: 1.55; }
.md-typeset .learn-intro p { letter-spacing: -.3px; }
.md-typeset .learn-orientation { margin: 2.2rem 0; padding: 1.6rem 1.2rem 1.8rem; background: #F8F8F8; position: relative; }
.md-typeset .learn-orientation :first-child { margin-top: 0; }
.md-typeset .learn-orientation :last-child { margin-bottom: 0; }
.md-typeset .learn-orientation h2, .md-typeset .learn-orientation h3 { position: relative; }
.md-typeset .learn-orientation a { font-weight: 500; letter-spacing: -.3px; }
.md-typeset .learn-orientation i { position: absolute; left: -40px; top: 13px; font-size: 28px; color: #3915ad; }
.md-typeset .learn-orientation ol { margin-bottom: -12px; margin-left: 0; }
.md-typeset .learn-storysequence > ol { margin-left: 0; }
.md-typeset .learn-storysequence > ol > li { list-style: none; padding: 0.6rem; background: #F8F8F8; margin: 1rem 0; }
.md-typeset .learn-storysequence > ol > li > img { margin-bottom: 1rem; }

@media (max-width: 1600px) {
.md-typeset .coreconcepts-orientation i { left: -36px; top: 12px; font-size: 26px; }
.md-typeset .learn-orientation i { left: -36px; top: 12px; font-size: 26px; }
}

/* Tables */
Expand Down
2 changes: 1 addition & 1 deletion src/pages/_data/navigation/footerLinks.json5
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
title: "Developers",
links: [
{ title: "Get Started", url: "/get-started/" },
{ title: "Core Concepts", url: "/concepts/1_the_basics/" },
{ title: "Learn", url: "/learn/1_the_basics/" },
{ title: "Resources", url: "/resources/" },
]
},
Expand Down
2 changes: 1 addition & 1 deletion src/pages/_data/navigation/headerNav.json5
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
links: [
{ title: "Get Started", url: "/get-started/", class:"" },
{ title: "Core Concepts", url: "/concepts/1_the_basics/", class:"" },
{ title: "Learn", url: "/learn/1_the_basics/", class:"" },
{ title: "Resources", url: "/resources/", class:"" },
{ title: "Get Involved", url: "/get-involved/", class:"" },
]
Expand Down
22 changes: 11 additions & 11 deletions src/pages/_data/navigation/mainNav.json5
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@
{ title: "Setup For a Local Event", url: "/get-started/at-an-event/" },
]
},
{ title: "Core Concepts", url: "/concepts/1_the_basics/", children: [
{ title: "Application Architecture", url: "/concepts/2_application_architecture/" },
{ title: "Source Chain", url: "/concepts/3_source_chain/" },
{ title: "DHT", url: "/concepts/4_dht/" },
{ title: "Links and Anchors", url: "/concepts/5_links_anchors/" },
{ title: "CRUD Actions", url: "/concepts/6_crud_actions/" },
{ title: "Validation", url: "/concepts/7_validation/" },
{ title: "Calls and Capabilities", url: "/concepts/8_calls_capabilities/" },
{ title: "Signals", url: "/concepts/9_signals/" },
{ title: "Countersigning", url: "/concepts/10_countersigning/" },
{ title: "Lifecycle Events", url: "/concepts/11_lifecycle_events/" },
{ title: "Learn", url: "/learn/1_the_basics/", children: [
{ title: "Application Architecture", url: "/learn/2_application_architecture/" },
{ title: "Source Chain", url: "/learn/3_source_chain/" },
{ title: "DHT", url: "/learn/4_dht/" },
{ title: "Links and Anchors", url: "/learn/5_links_anchors/" },
{ title: "CRUD Actions", url: "/learn/6_crud_actions/" },
{ title: "Validation", url: "/learn/7_validation/" },
{ title: "Calls and Capabilities", url: "/learn/8_calls_capabilities/" },
{ title: "Signals", url: "/learn/9_signals/" },
{ title: "Countersigning", url: "/learn/10_countersigning/" },
{ title: "Lifecycle Events", url: "/learn/11_lifecycle_events/" },
]
},
{ title: "Resources", url: "/resources/", children: [
Expand Down
4 changes: 2 additions & 2 deletions src/pages/_includes/widgets/home-tiles.njk
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
</div>
{% endlinkTile %}

{% linkTile "/concepts/1_the_basics/", "home-tile" %}
{% linkTile "/learn/1_the_basics/", "home-tile" %}
{{ craneIcon() }}
<div class="text-wrapper">
<h2>Core Concepts</h2>
<h2>Learn</h2>
<p>Introducing Holochain basics</p>
</div>
{% endlinkTile %}
Expand Down
12 changes: 6 additions & 6 deletions src/pages/ds/containers.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,18 +79,18 @@ Can wrap around code fences to prevent Copy buttons form being added to the code
## Site content specific containers
All the below just apply a specific class to a surrounding div. These were implemented for very specific site style needs. More such can be created if need be.

- ### coreconcepts-intro
::: coreconcepts-intro
- ### learn-intro
::: learn-intro
Sit amet tellus cras adipiscing enim eu turpis egestas. Pretium aenean pharetra magna ac placerat vestibulum lectus mauris ultrices eros in cursus turpis massa tincidunt dui ut ornare lectus sit.
:::

- ### coreconcepts-orientation
::: coreconcepts-orientation
- ### learn-orientation
::: learn-orientation
Sit amet tellus cras adipiscing enim eu turpis egestas. Pretium aenean pharetra magna ac placerat vestibulum lectus mauris ultrices eros in cursus turpis massa tincidunt dui ut ornare lectus sit.
:::

- ### coreconcepts-storysequence
::: coreconcepts-storysequence
- ### learn-storysequence
::: learn-storysequence
Sit amet tellus cras adipiscing enim eu turpis egestas. Pretium aenean pharetra magna ac placerat vestibulum lectus mauris ultrices eros in cursus turpis massa tincidunt dui ut ornare lectus sit.
:::

2 changes: 1 addition & 1 deletion src/pages/get-involved.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Regardless of your experience level as a developer, we encourage you to get invo

### Jump in and get your feet wet

* Read through our [Core Concepts](/concepts/1_the_basics/)
* Read through our [Learn guide](/learn/1_the_basics/)
* Track development progress with the biweekly [Holochain Dev Pulse](https://blog.holochain.org/tag/dev-pulse/){target=_blank}

### Connect and contribute
Expand Down
Loading