Skip to content

Commit

Permalink
Merge branch 'master' into isolate-init-convert
Browse files Browse the repository at this point in the history
  • Loading branch information
WillCWX committed Aug 23, 2023
2 parents e8bf464 + 9c5db5f commit 997ee6b
Show file tree
Hide file tree
Showing 19 changed files with 1,166 additions and 66 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ jobs:
distribution: 'temurin'
- run: npm run setup
- run: npm run test
- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
check-docs:
runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 2 additions & 0 deletions .stylelintignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
**/_site/**/*.css
packages/cli/test/functional/**/expected/**/*.css
packages/vue-components/**/*.css
packages/cli/coverage/**/*.css
packages/core/coverage/**/*.css
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
[![CI](https://github.com/MarkBind/markbind/actions/workflows/ci.yml/badge.svg)](https://github.com/MarkBind/markbind/actions/workflows/ci.yml)
[![npm](https://img.shields.io/npm/v/markbind-cli)](https://www.npmjs.com/package/markbind-cli)
[![Netlify Status](https://api.netlify.com/api/v1/badges/9a8095bf-b582-4dce-9631-98c5754ba199/deploy-status)](https://app.netlify.com/sites/markbind-master/deploys)
[![codecov](https://codecov.io/gh/MarkBind/markbind/branch/master/graph/badge.svg?token=AfVbuV77yg)](https://codecov.io/gh/MarkBind/markbind)

**A tool for generating static websites from Markdown-like syntax**. Optimized for content-heavy instructional websites, e.g. course websites, tutorials, project/product documentation, textbooks.

Expand Down
Binary file added docs/images/detailed-d.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/overview-d.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
105 changes: 102 additions & 3 deletions docs/userGuide/syntax/lists.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,115 @@
</variable>
</include>

****Customizing the Unordered list appearance:****

**To customize unordered lists' icons, add the configuration `{icon="icon-name"}` after a specific list item.**

<include src="codeAndOutput.md" boilerplate >
<variable name="highlightStyle">markdown</variable>
<variable name="code">
* Item 1 { icon="glyphicon-education" }
* Item 2
* Item 2.1 { icon="fas-file-code" }
* Item 2.2
* Item 3 { icon="fas-code-branch" }
* Item 3.1
* Item 4 { icon="octicon-git-pull-request" }
* Item 4.1 { icon="mif-perm-media" }
* Item 5 { icon="glyphicon-education" }
* Item 5.1 { icon="notebook_with_decorative_cover" }
</variable>
</include>

You can use any of the [icons](../formattingContents.html#icons) supported by MarkBind. If an item has a specified icon, that icon will be used for it and for subsequent items at that level.

<box type=warning seamless>
If you customize any item on a certain level, you must also customize the first item on that level. If not, the list will revert to its uncustomized form.
</box>

**You can adjust the icon's size by using the `i-size` attribute.**

<include src="codeAndOutput.md" boilerplate >
<variable name="highlightStyle">markdown</variable>
<variable name="code">

* Item 1 { icon="fas-file-code" i-size="35px" }
* Item 2 { icon="fas-file-code" i-size="4rem" }
* Item 3 { icon="fas-file-code" i-size="5em" }

</variable>
</include>

You can utilize any [CSS size unit](https://www.w3schools.com/cssref/css_units.php).

**You can also use images as icons.**

<include src="codeAndOutput.md" boilerplate >
<variable name="highlightStyle">markdown</variable>
<variable name="code">

* Item 1 { icon="/images/deer.jpg" i-width="30px" }
* Item 2 { i-width="60px" i-height="44px" }
* Item 3 { i-width="90px" i-height="61px" }

</variable>
</include>

If either the `i-width` or the `i-height` of an image is not specified, the unspecified dimension will adjust to maintain the image's original aspect ratio. For example, for an image of size 800x600 (4:3), if `i-width` is set to 400px, its height will be 300px.

**The icon's appearance can be further customized by adding a `i-class` attribute.**

<div id="main-example-markbind">

<include src="codeAndOutput.md" boilerplate >
<variable name="highlightStyle">markdown</variable>
<variable name="code">
* Item 1 { icon="/images/deer.jpg" i-width="60px" height="17px" i-class="rounded" }
* Item 2
* Item 2.1 { icon="fas-question-circle" i-class="badge rounded-pill my-1 bg-success text-white" }
* Item 2.2
* Item 2.3 { i-class="badge rounded-pill my-1 bg-primary text-white"}
* Item 3
* Item 3.1
* Item 3.2 { icon="fas-question-circle" i-class="badge rounded my-1 bg-danger text-white" }
* Item 3.3
</variable>
</include>

<box type=tip seamless>

Similar to the `icon` attribute, other icon attributes such as `i-class`, `i-width`, `i-height` apply for subsequent list items at the same level, until they are overridden by the same attribute. For example, Item 2.3's `i-class` overrides Item 2.1's and applies up to Item 3.1.
</box>

</div>

**You can apply Markdown's heading and paragraph syntax within the list.**

<include src="codeAndOutput.md" boilerplate >
<variable name="highlightStyle">markdown</variable>
<variable name="code">

* #### Heading 1: Overview {icon="/images/overview-d.png" i-width="65px" i-class="rounded" }
Content 1: This section provides a summary of the document or topic.
It sets the context and purpose of the content to follow.
* #### Heading 2: Detailed Description { icon="/images/detailed-d.png" i-width="65px" i-class="rounded" }
Content 2: This section delves deeper into the topic, offering comprehensive information and detailed explanations.
It might also include evidence, examples, or justifications.
</variable>
</include>

Icon specifications should be attached only to the first element of a list item (for the example above, the icon specification should be attached to the heading, not the content below the heading).

****Ordered lists:****

<include src="codeAndOutput.md" boilerplate >
<variable name="highlightStyle">markdown</variable>
<variable name="code">
1. Item 1
1. Sub item 1.1
1. Sub item 1.2
1. Item 2
1. Item 3
2. Sub item 1.2
2. Item 2
3. Item 3
</variable>
</include>

Expand Down
1 change: 1 addition & 0 deletions packages/cli/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
module.exports = {
collectCoverage: true,
testPathIgnorePatterns: ['test/functional/'],
};
6 changes: 6 additions & 0 deletions packages/cli/test/functional/test_site/expected/siteData.json
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,12 @@
"i-am-a-header": "🚀 I am a header"
},
"headingKeywords": {}
},
{
"src": "testList.md",
"title": "web 3 forms",
"headings": {},
"headingKeywords": {}
}
]
}
Loading

0 comments on commit 997ee6b

Please sign in to comment.