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

Remove .mbdf and .mbd #1762

Merged
merged 46 commits into from
Feb 16, 2022
Merged
Show file tree
Hide file tree
Changes from 44 commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
55572b9
Pulled from Master
ong6 Aug 29, 2021
49d8fe2
Merge branch 'master' of https:/MarkBind/markbind
ong6 Jan 13, 2022
32b5475
Merge branch 'master' of https:/MarkBind/markbind
ong6 Jan 16, 2022
ddfa24a
Merge branch 'MarkBind:master' into master
ong6 Jan 28, 2022
2537a1f
Merge branch 'master' of https:/MarkBind/markbind
ong6 Jan 30, 2022
243df4a
Merge branch 'master' of https:/MarkBind/markbind
ong6 Jan 30, 2022
9dbdeef
Merge branch 'master' of https:/MarkBind/markbind
ong6 Jan 31, 2022
7d37a43
Merge branch 'master' of https:/MarkBind/markbind
ong6 Feb 1, 2022
6423544
Merge branch 'master' of https:/MarkBind/markbind
ong6 Feb 10, 2022
de29400
Merge branch 'master' of https:/MarkBind/markbind
ong6 Feb 11, 2022
1651eb4
remove .mbd and .mbdf from core
ong6 Feb 12, 2022
ac46f34
remove .mbd and .mbdf helper files
ong6 Feb 12, 2022
3f9dd74
remove .mbd and .mbdf
ong6 Feb 12, 2022
8602029
Merge branch 'remove-mbd/mbdf' of https:/ong6/markbind in…
ong6 Feb 12, 2022
3a857fe
remove .mbd and .mbdf
ong6 Feb 12, 2022
1545bfe
Merge branch 'remove-mbd/mbdf' of https:/ong6/markbind in…
ong6 Feb 12, 2022
74dfc1c
removed .mbd and .mbdf from site.json files
ong6 Feb 12, 2022
b34f371
fixed docs and renamed files
ong6 Feb 12, 2022
48e74f6
renamed files and updated docs
ong6 Feb 12, 2022
4d6abca
Fixed cli test cases
ong6 Feb 12, 2022
fff09c9
Merge branch 'master' of https:/MarkBind/markbind into re…
ong6 Feb 13, 2022
2d9395a
remove traces of mbd from docs
ong6 Feb 13, 2022
41219d8
added sample fragment exclude test
ong6 Feb 13, 2022
68876e4
added documentation for new fragment
ong6 Feb 13, 2022
f8c3c94
update grammer
ong6 Feb 13, 2022
ab57538
Update docs/userGuide/reusingContents.md
ong6 Feb 14, 2022
c5a69e1
Update docs/userGuide/siteJsonFile.md
ong6 Feb 14, 2022
8f19ac2
Update docs/userGuide/reusingContents.md
ong6 Feb 14, 2022
65b0c37
Update docs/userGuide/reusingContents.md
ong6 Feb 14, 2022
a91e2bd
Merge branch 'master' of https:/MarkBind/markbind into re…
ong6 Feb 14, 2022
88274fb
removed .mbd from app factory
ong6 Feb 14, 2022
0cb82d2
Update packages/cli/index.js
ong6 Feb 15, 2022
1301b51
removed brackets for regex checks
ong6 Feb 15, 2022
b560f06
removed brakets for all regex
ong6 Feb 15, 2022
8874928
Merge branch 'remove-mbd/mbdf' of https:/ong6/markbind in…
ong6 Feb 15, 2022
67ff4b1
update globs
ong6 Feb 15, 2022
3ab170f
update markdownfile extensions
ong6 Feb 15, 2022
5574571
Revert "removed brackets for regex checks"
ong6 Feb 15, 2022
8649004
Fixed minor bug with test
ong6 Feb 15, 2022
7f9306d
Update packages/cli/test/functional/test_site/sub_site/nested_sub_sit…
ong6 Feb 16, 2022
1c2cc43
Merge branch 'master' of https:/MarkBind/markbind into re…
ong6 Feb 16, 2022
9523f4e
Merge branch 'remove-mbd/mbdf' of https:/ong6/markbind in…
ong6 Feb 16, 2022
2a8c7ce
Fixed test case
ong6 Feb 16, 2022
371e5ed
update isMarkdownFiles
ong6 Feb 16, 2022
97a3549
Update packages/cli/index.js
ong6 Feb 16, 2022
ece9eec
Improved resuingContent docs
ong6 Feb 16, 2022
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
4 changes: 2 additions & 2 deletions docs/_markbind/layouts/default.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<include src="headers/header.mbdf" />
<include src="headers/header.md" />

<div id="flex-body">
<div id="content-wrapper" class="fixed-header-padding">
{{ content }}
</div>
</div>

<include src="footers/footer.mbdf" />
<include src="footers/footer.md" />
4 changes: 2 additions & 2 deletions docs/_markbind/layouts/devGuide.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<include src="headers/header.mbdf" />
<include src="headers/header.md" />

<div id="flex-body">
<nav id="site-nav" class="fixed-header-padding">
Expand Down Expand Up @@ -31,4 +31,4 @@
</nav>
</div>

<include src="footers/footer.mbdf" />
<include src="footers/footer.md" />
4 changes: 2 additions & 2 deletions docs/_markbind/layouts/userGuide.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<include src="headers/header.mbdf" />
<include src="headers/header.md" />

<div id="flex-body">
<nav id="site-nav" class="fixed-header-padding">
Expand Down Expand Up @@ -52,4 +52,4 @@
</nav>
</div>

<include src="footers/footer.mbdf" />
<include src="footers/footer.md" />
2 changes: 1 addition & 1 deletion docs/devGuide/design/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ This page provides an overview of the MarkBind's architecture.

![MarkBind Architecture Diagram](<{{baseUrl}}/images/dev diagrams/architecture.png>)

The above diagram shows the key classes and <popover content="The content processing flow acts on a **single** source file (`.md` / `.mbd` / `.html`), generating output files or intermediate processing results depending on the content type.">content processing flow</popover> in MarkBind. You may note the following from these:
The above diagram shows the key classes and <popover content="The content processing flow acts on a **single** source file (`.md` / `.html`), generating output files or intermediate processing results depending on the content type.">content processing flow</popover> in MarkBind. You may note the following from these:

### Key classes

Expand Down
4 changes: 1 addition & 3 deletions docs/dg-site.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
"pages": [
{
"glob": ["**/*.mbd", "*.md", "devGuide/*.md", "devGuide/*/*.md"]
"glob": ["*.md", "devGuide/*.md", "devGuide/*/*.md"]
},
{
"src": "index.md",
Expand All @@ -20,8 +20,6 @@
"lib/*",
"*.json",
"*.md",
"*.mbd",
"*.mbdf",
"*.njk",
".git/*",
"*.pptx",
Expand Down
4 changes: 1 addition & 3 deletions docs/site.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
},
"pages": [
{
"glob": ["**/*.mbd", "*.md", "userGuide/*.md", "userGuide/components/*.md", "devGuide/*.md", "devGuide/*/*.md"]
"glob": ["*.md", "userGuide/*.md", "userGuide/components/*.md", "devGuide/*.md", "devGuide/*/*.md"]
},
{
"src": [
Expand All @@ -34,8 +34,6 @@
"lib/*",
"*.json",
"*.md",
"*.mbd",
"*.mbdf",
"*.njk",
".git/*",
"*.pptx",
Expand Down
4 changes: 1 addition & 3 deletions docs/ug-site.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
"pages": [
{
"glob": ["**/*.mbd", "*.md", "userGuide/*.md", "userGuide/components/*.md"]
"glob": ["*.md", "userGuide/*.md", "userGuide/components/*.md"]
},
{
"src": [
Expand All @@ -33,8 +33,6 @@
"lib/*",
"*.json",
"*.md",
"*.mbd",
"*.mbdf",
"*.njk",
".git/*",
"*.pptx"
Expand Down
8 changes: 4 additions & 4 deletions docs/userGuide/addingPages.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

%%You can specify which files to be omitted from the site by using the `ignore` field in the `site.config` file as explained [here](siteJsonFile.html#ignore).%%

**More importantly, `.md` and `.mbd` files can be transformed into html pages with matching names.**
**More importantly, `.md` files can be transformed into html pages with matching names.**

<div class="indented">

Expand All @@ -37,9 +37,9 @@
</div>

Here are the steps to add a new page to your site:
1. Add a `.md` (or `.mbd`) file anywhere inside the root directory.
1. Update the [`pages` attribute of the `site.json`](siteJsonFile.html#pages) to cover the new file, if necessary.
1. Use the <trigger trigger="click" for="modal:addingPages-livePreview">live preview</trigger> to view the generated web page for the new file.
1. Add a `.md` file anywhere inside the root directory.
2. Update the [`pages` attribute of the `site.json`](siteJsonFile.html#pages) to cover the new file, if necessary.
3. Use the <trigger trigger="click" for="modal:addingPages-livePreview">live preview</trigger> to view the generated web page for the new file.

<modal large header="Live Preview" id="modal:addingPages-livePreview">
<include src="glossary.md#live-preview" inline/>
Expand Down
2 changes: 1 addition & 1 deletion docs/userGuide/cliCommands.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ Usage: markbind <command>
**Options** :fas-cogs:

* `-o <file>`, `--one-page <file>`<br>
Serves only a single page from your website **initially**. If `<file>` is not specified, it defaults to `index.md/mbd`.<br>
Serves only a single page from your website **initially**. If `<file>` is not specified, it defaults to `index.md`.<br>
* Thereafter, when changes to source files have been made, the opened pages will be rebuilt if it was affected.<br>
* Navigating to a new page will build the new page, if it has not been built before, or there were some changes to source files that affected it before navigating to it.<br>
* {{ icon_example }} `--one-page guide/index.md`
Expand Down
2 changes: 1 addition & 1 deletion docs/userGuide/components/imagesAndDiagrams.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Diagrams, in the form of **inline PlantUML components** are also supported.
{% from "userGuide/fullSyntaxReference.md" import syntax_topics as topics %}

{% macro show_topic(filename) %}
<include src="../syntax/{{ filename }}.mbdf" />
<include src="../syntax/{{ filename }}.md" />
<hr>
{% endmacro %}

Expand Down
2 changes: 1 addition & 1 deletion docs/userGuide/components/navigation.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ The components in this page are used for scaffolding **site and page navigation*
{% from "userGuide/fullSyntaxReference.md" import syntax_topics as topics %}

{% macro show_topic(filename) %}
<include src="../syntax/{{ filename }}.mbdf" />
<include src="../syntax/{{ filename }}.md" />
<hr>
{% endmacro %}

Expand Down
2 changes: 1 addition & 1 deletion docs/userGuide/components/others.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ This page lists some other components that may be useful in creating education w
{% from "userGuide/fullSyntaxReference.md" import syntax_topics as topics %}

{% macro show_topic(filename) %}
<include src="../syntax/{{ filename }}.mbdf" />
<include src="../syntax/{{ filename }}.md" />
<hr>
{% endmacro %}

Expand Down
2 changes: 1 addition & 1 deletion docs/userGuide/components/popups.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ The components in this page can be used to easily create **various forms of pop-
{% from "userGuide/fullSyntaxReference.md" import syntax_topics as topics %}

{% macro show_topic(filename) %}
<include src="../syntax/{{ filename }}.mbdf" />
<include src="../syntax/{{ filename }}.md" />
<hr>
{% endmacro %}

Expand Down
2 changes: 1 addition & 1 deletion docs/userGuide/components/presentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ The components in this page are the core **presentational** components you may w
{% from "userGuide/fullSyntaxReference.md" import syntax_topics as topics %}

{% macro show_topic(filename) %}
<include src="../syntax/{{ filename }}.mbdf" />
<include src="../syntax/{{ filename }}.md" />
<hr>
{% endmacro %}

Expand Down
2 changes: 1 addition & 1 deletion docs/userGuide/formattingContents.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
{% from "userGuide/fullSyntaxReference.md" import syntax_topics as topics %}

{% macro show_topic(filename) %}
<include src="./syntax/{{ filename }}.mbdf" />
<include src="./syntax/{{ filename }}.md" />
<hr>
{% endmacro %}

Expand Down
2 changes: 1 addition & 1 deletion docs/userGuide/fullSyntaxReference.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,6 @@

{% for topic in syntax_topics | dictsort %}
<panel type="seamless" header="###### **{{ topic[1][0] }}**">
<include src="syntax/{{ topic[0] }}.mbdf" />
<include src="syntax/{{ topic[0] }}.md" />
</panel>
{% endfor %}
13 changes: 1 addition & 12 deletions docs/userGuide/glossary.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<span id="live-preview">

**_Live preview_** is:
- Regeneration of affected content upon any change to <tooltip content="`.md`, `.mbd`, `.mbdf`, `.njk` files ... anything your content depends on!">source files</tooltip>, then reloading the updated site in the Browser.
- Regeneration of affected content upon any change to <tooltip content="`.md`, `.njk` files ... anything your content depends on!">source files</tooltip>, then reloading the updated site in the Browser.

- Regeneration will also occur upon any modification to attributes in `site.json` with the exception of [`baseUrl`](siteJsonFile.md#baseurl).

Expand All @@ -17,14 +17,3 @@
Use [the `serve` command](cliCommands.html#serve-command) to launch a live preview.

</span>

<br>

#### `.mbd` extension

<span id="mbd-extension">
<md>**`.mbd` extension indicates a MarkBind source file**.</md>

MarkBind is able to take Markdown files (`.md`) and HTML files (`.html`) as source files too.
</span>

8 changes: 4 additions & 4 deletions docs/userGuide/makingTheSiteSearchable.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,16 @@ If you do not wish to use MarkBind's searchbar (e.g. you have an external servic

You can add a search bar component to your website to allow users to search the site.

{{ embed("Using components → **Search bars**", "syntax/searchBars.mbdf#body") }}
{{ embed("Using components → **Search bars**", "syntax/searchBars.md#body") }}
<p/>
<include src="syntax/keywords.mbdf" />
<include src="syntax/indexing.mbdf" />
<include src="syntax/keywords.md" />
<include src="syntax/indexing.md" />

## Using External Search Services

MarkBind sites can use Algolia Doc Search services easily via the Algolia plugin. Unlike the built-in search, Algolia provides full-text search. See the panel below for more info.

{{ embed("Using plugins → **Algolia**", "plugins/algolia.mbdf") }}
{{ embed("Using plugins → **Algolia**", "plugins/algolia.md") }}

{% from "njk/common.njk" import previous_next %}
{{ previous_next('usingPlugins', 'themes') }}
20 changes: 10 additions & 10 deletions docs/userGuide/markBindSyntaxOverview.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ Given below is an overview of the syntax schemes supported by MarkBind.
MarkBind supports all basic Markdown syntax.

<panel type="seamless" header="Some examples ...">
<include src="syntax/headings.mbdf#main-example" />
<include src="syntax/textStyles.mbdf#main-example-markdown" />
<include src="syntax/links.mbdf#main-example" />
<include src="syntax/headings.md#main-example" />
<include src="syntax/textStyles.md#main-example-markdown" />
<include src="syntax/links.md#main-example" />
</panel>

<!-- ======================================================================================================= -->
Expand All @@ -43,9 +43,9 @@ MarkBind supports all basic Markdown syntax.
MarkBind supports additional Markdown features provided by Github-Flavored Markdown (GFMD).

<panel type="seamless" header="Some examples ...">
<include src="syntax/code.mbdf#main-example" />
<include src="syntax/lists.mbdf#main-example-gfmd" />
<include src="syntax/emoji.mbdf#main-example" />
<include src="syntax/code.md#main-example" />
<include src="syntax/lists.md#main-example-gfmd" />
<include src="syntax/emoji.md#main-example" />
</panel>


Expand All @@ -56,9 +56,9 @@ MarkBind supports additional Markdown features provided by Github-Flavored Markd
MarkBind adds several Markdown-like features on top of GFMD.

<panel type="seamless" header="Some examples ...">
<include src="syntax/textStyles.mbdf#main-example-markbind" />
<include src="syntax/lists.mbdf#main-example-markbind" />
<include src="syntax/footnotes.mbdf#main-example-markbind" />
<include src="syntax/textStyles.md#main-example-markbind" />
<include src="syntax/lists.md#main-example-markbind" />
<include src="syntax/footnotes.md#main-example-markbind" />
</panel>

<!-- ======================================================================================================= -->
Expand All @@ -78,7 +78,7 @@ More info: <include src="{{ filename }}#link" inline trim/>
<br>
{% endmacro %}

{% for filename in ['syntax/variables.mbdf', 'syntax/includes.mbdf', 'usingComponents.md'] %}
{% for filename in ['syntax/variables.md', 'syntax/includes.md', 'usingComponents.md'] %}
{{ quote_topic(filename) }}
{% endfor %}

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions docs/userGuide/readerFacingFeatures.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@

##### {{ heading }}
<box>
<include src="syntax/{{ filename }}.mbdf#examples" />
<include src="syntax/{{ filename }}.md#examples" />

<panel type="seamless" header="%%details...%%" >

<include src="syntax/{{ filename }}.mbdf" />
<include src="syntax/{{ filename }}.md" />
</panel>
</box>

Expand Down
51 changes: 47 additions & 4 deletions docs/userGuide/reusingContents.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@
</span>


<include src="syntax/variables.mbdf" />
<include src="syntax/variables.md" />

<hr><!-- ======================================================================================================= -->

<include src="syntax/includes.mbdf" />
<include src="syntax/includes.md" />

<hr><!-- ======================================================================================================= -->

## Reusing Contents Across Sites

**MarkBind supports reusing across sites.** It allows you to include the pages you want from a _sub-site_ in another _main-site_ without having to change anything in the source files of the _sub-site_ as long as the sub-site source files are inside the directory of the _main site_.
**MarkBind supports reusing across sites.** It allows you to include the pages you want from a _sub-site_ in another _main-site_ without having to change anything in the source files of the _sub-site_ as long as the _sub-site_ source files are inside the directory of the _main-site_.

<div class="indented">

Expand All @@ -46,7 +46,7 @@ C:/course/
└── site.json
```

`reading.md` (note how it reuses content from the sub-site `textbook`):
In `reading.md` (note how it reuses content from the sub-site `textbook`):
```markdown
# Week 1 Reading:
<include src="textbook/overview.md" />
Expand All @@ -60,6 +60,49 @@ If you are using Git for version control, you can set up the sub-site repository
</include>


<hr><!-- ======================================================================================================= -->

## Creating Custom Fragments

**MarkBind supports creating custom fragments**. A fragment is a piece of content that can be reused across multiple pages. This allows you to create reusable content similar to [reusing content](#reusing-contents-across-sites), but rather than reusing content from a _sub-site_, content is reused from fragments which can be excluded from page generation.

<div class="indented">

{{ icon_example }} Suppose you have a fragment file `content-fragment.md` and you want to include it in some pages of the site `course` without rendering `content-fragment.md` as a page.

```
C:/course/
├── content-fragment.md
├── index.md
├── reading.md
└── site.json
```

In `reading.md` (note how it reuses content from the `content-fragment.md`):
```markdown
# Week 1 Reading:
<include src="content-fragment.md" />
```

In `site.json` we then exclude the fragment from the page generation:

```json
...
"pagesExclude": [
"**/*-fragment.md"
],
...
```
</div>

</div>

<include src="tip.md" boilerplate >
<span id="tip_body">
You may use any custom name you wish for your fragments but be sure to update the `pagesExclude` list with the appropriate glob pattern.
</span>
</include>

<hr><!-- ======================================================================================================= -->

## Creating Content Variations
Expand Down
3 changes: 1 addition & 2 deletions docs/userGuide/siteJsonFile.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ Here is a typical `site.json` file:
"_site/*",
"*.json",
"*.md",
"*.mbd",
".git/*"
],
"plugins" : [
Expand Down Expand Up @@ -124,7 +123,7 @@ _(Optional)_ **The styling options to be applied to the site.** This includes:
* `src` can be used to specify a single file, or an array of files.<br>
{{ icon_examples }} `docs/index.md` or `[ 'docs/index.md', 'docs/userGuide.md' ]` { .my-1 }
* `glob` can be used alternatively to define a file pattern in the [_glob syntax_](https://en.wikipedia.org/wiki/Glob_(programming)), or an array of such file patterns.<br>
{{ icon_examples }} `**/*.md` or `[ '**/*.md', '**/*.mbdf' ]` { .my-2 }
{{ icon_examples }} `**/*.md` or `[ '**/*.md', '**/index.md' ]` { .my-2 }
* **`globExclude`**: An array of file patterns to be excluded from rendering when using `glob`, also defined in the glob syntax.
* **`title`**: The page `<title>` for the generated web page. Titles specified here take priority over titles specified in the [front matter](addingPages.html#front-matter) of individual pages.
* **`layout`**: The [layout](tweakingThePageStructure.html#page-layouts) to be used by the page. Default: `default`.
Expand Down
Loading