Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
88c09eb
Update tests
nbriannl Feb 26, 2020
74a5b0f
Merge pull request #1055 from nbriannl/Update-test-2.11
Feb 26, 2020
3591bc5
Add pageNav to Using Plugins Page (#1062)
Tejas2805 Feb 28, 2020
2eb7b7d
Refactor preprocess and url processing functions (#1026)
ang-zeyu Mar 3, 2020
f215eee
Migrate to bootstrap-vue popovers (#1033)
openorclose Mar 3, 2020
962ddd1
Documentation for Implement no-* attributes for <box> (#1042)
nbriannl Mar 3, 2020
a0ae237
Render plugins on dynamic resources (#1051)
openorclose Mar 3, 2020
b8413c6
Add copy code-block plugin (#1043)
yash-chowdhary Mar 4, 2020
f4036cc
Fixed navbar no longer covers modals (#1070)
le0tan Mar 4, 2020
bf21a10
Add dividers and fix bug in siteNav (#1063)
Mar 5, 2020
3a41773
Add heading and line highlighting to code blocks (#1034)
nbriannl Mar 7, 2020
fb9b00e
Enable AppVeyor CI (#1040)
yash-chowdhary Mar 7, 2020
c2b68e8
Implement an api to ignore content in certain tags (#1047)
ang-zeyu Mar 7, 2020
0bf33ae
Fix reload inconsistency when updating frontmatter (#1068)
Parcly-Taxel Mar 7, 2020
4ea52c2
Custom timezone for built-in timestamp (#1073)
yash-chowdhary Mar 7, 2020
e521f97
Allow changing parameter properties (#1075)
openorclose Mar 7, 2020
ba79813
Add warnings for conflicting/deprecated component attribs (#1057)
nbriannl Mar 8, 2020
1451bd5
Implement lazy page building for markbind serve (#1038)
ang-zeyu Mar 8, 2020
940127a
Fix refactor to processDynamicResources (#1092)
ang-zeyu Mar 8, 2020
beb2a21
Update vue-strap version to v2.0.1-markbind.37
yamgent Mar 8, 2020
125ac54
Update outdated test files
yamgent Mar 8, 2020
e09f588
2.12.0
yamgent Mar 8, 2020
d409741
Add example for using multiple features in code-blocks (#1102)
Tejas2805 Mar 11, 2020
bdd1f60
Convert code in boxes to code block (#1086)
Tejas2805 Mar 16, 2020
2ee765b
Update documentation on icon slot for boxes (#1123)
le0tan Mar 21, 2020
7ba15e9
Escape Nunjucks for special tags (#1049)
crphang Mar 21, 2020
d920fda
Fix flex shrink not applying in content wrapper (#1135)
ang-zeyu Mar 21, 2020
2a15731
Remove dynamic include feature (#1037)
yash-chowdhary Mar 22, 2020
690bb6f
Unify markdown-it parser variants (#1056)
ang-zeyu Mar 22, 2020
450d948
Bump acorn from 7.1.0 to 7.1.1 in /src/lib/markbind (#1120)
dependabot[bot] Mar 22, 2020
ce4f4f6
Bump acorn from 5.7.3 to 5.7.4 (#1121)
dependabot[bot] Mar 22, 2020
c437f3f
Remove redundant file writing (#1090)
openorclose Mar 23, 2020
e88900f
Simplify baseUrl resolving process (#1087)
ang-zeyu Mar 23, 2020
7850366
Allow special tags to be self-closing (#1101)
ang-zeyu Mar 23, 2020
409e90c
Add start from line number functionality to code blocks (#1115)
openorclose Mar 23, 2020
407158b
Remove OK button from modals (#1134)
openorclose Mar 23, 2020
2bbe32b
Update test files (#1138)
ang-zeyu Mar 23, 2020
d5a4473
Fix pageNav in tweaking the page structure (#1127)
Tejas2805 Mar 24, 2020
029d314
Avoid duplicated IDs and spans for anchor div.
le0tan Mar 25, 2020
fd32853
Changes remaining references from filterTags to tags (#1149)
Mar 26, 2020
d3a07aa
Fix lazy reload for urls without index (#1110)
ang-zeyu Mar 26, 2020
e1b292b
Code blocks: Implement inline markdown support for heading (#1137)
nbriannl Mar 28, 2020
f7351af
Allow an array for specifying page src or glob (#1118)
ang-zeyu Mar 28, 2020
7617c71
Support variables to be defined as by JSON (#1117)
crphang Mar 28, 2020
4bc3edb
Show pointer and use underline dashed for click trigger (#1111)
openorclose Mar 28, 2020
2af2791
Docs: Add contributing.md (#1139)
nbriannl Mar 28, 2020
82cfb9f
Update tests
le0tan Mar 28, 2020
4606143
Upgrade to bootstrap-vue 2.5.0 (#1085)
openorclose Mar 29, 2020
13dc7b7
Fix baseUrl not working in include src attribute (#1088)
ang-zeyu Mar 29, 2020
de21751
Fix octicon sizing (#1132)
dvrylc Mar 29, 2020
70cd3bc
Update to remove security vulnerabilities (#1112)
Parcly-Taxel Mar 29, 2020
7c78b77
Update navbar doc (#1146)
le0tan Mar 29, 2020
12673b0
Update devGuide.md
le0tan Mar 29, 2020
9b9f1c4
Update tests
le0tan Mar 29, 2020
35f1852
Update vue-strap version to v2.0.1-markbind.38
yamgent Mar 30, 2020
2ad453b
Update test files
yamgent Mar 30, 2020
c1adfa3
2.13.0
yamgent Mar 30, 2020
a9c4d55
Fix fontawsome icons don't show underlines to indicate modal/tooltip …
hcwong Mar 30, 2020
55e70ba
Update vue-strap version to v2.0.1-markbind.39
Mar 30, 2020
12ca81e
2.13.1
Mar 30, 2020
cfe3a2e
Update tests for 2.13.1 (#1169)
nbriannl Apr 1, 2020
69ad5b1
Fix hrefs for headings with angular brackets (#1089)
yash-chowdhary Apr 1, 2020
eeddb9e
Merge pull request #1158 from MarkBind/le0tan-patch-1
le0tan Apr 1, 2020
ab059ec
Add inline puml support (#1100)
crphang Apr 1, 2020
12e62f7
Fix bug in Search for UG and DG (#1147)
Tejas2805 Apr 2, 2020
7ec7bc4
Remove fixed bugs from test\functional\test_site\bugs\index.md` (#1148)
Tejas2805 Apr 2, 2020
0e91dc2
Update tests (#1178)
nbriannl Apr 3, 2020
fc51d0f
Normalize inline puml line ending before hashing (#1174)
ang-zeyu Apr 3, 2020
d6bf210
Upgrade js-beautify and provide option to turn it off (#1116)
yash-chowdhary Apr 4, 2020
bff70c1
Adopt ::before approach
le0tan Apr 5, 2020
1519ad1
Expand test extensions and fix whitespace checks (#1156)
ang-zeyu Apr 5, 2020
ec9e149
Merge remote-tracking branch 'upstream/master' into issue-1104
le0tan Apr 6, 2020
93e0f23
Revert changes to expected diagrams
le0tan Apr 6, 2020
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 .eslintignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
*.min.*
src/lib/markbind/src/lib/markdown-it/*
src/lib/markbind/src/lib/vue-attribute-renderer/*
src/lib/markbind/src/lib/markdown-it-shared/*

!.eslintrc.js
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ module.exports = {
"lodash/prefer-lodash-method": [0],
"lodash/prefer-noop": [0],
"max-len": ["error", { "code": 110 }],
"no-param-reassign": ["error", { "props": false }],
"operator-linebreak": ["error", "before"],
// override airbnb-base dev dependencies, latest version does not white list __mocks__
"import/no-extraneous-dependencies": [
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
language: node_js
node_js:
- '8'
- '10'
deploy:
# deploy on release, to markbind.org
- provider: script
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@

The website for the latest master branch (not yet released to the public) is at https://markbind-master.netlify.com.

The Developer Guide can be found at https://markbind.org/devdocs/devGuide/index.html
The Developer Guide can be found at https://markbind.org/devdocs/devGuide/index.html

If you're interested in contributing to MarkBind, we'd love to have you onboard! Check out our [Contribution Guide](https://markbind.org/devdocs/devGuide/contributing) for ideas on contributing and setup steps for getting our repositories up and running on your local machine.
17 changes: 17 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
environment:
nodejs_version: "10"

# Install scripts
install:
# Install nodejs version
- ps: Install-Product node $env:nodejs_version
# Install modules
- npm ci

# Post-install test scripts
test_script:
- node --version
- npm --version
- npm run testwin

build: off
5 changes: 4 additions & 1 deletion asset/css/bootstrap-vue.min.css

Large diffs are not rendered by default.

120 changes: 118 additions & 2 deletions asset/css/markbind.css
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,40 @@ pre > code.hljs {
counter-reset: line;
}

pre > code.hljs[heading] {
border-top-right-radius: 0;
}

.code-block {
position: relative;
}

.code-block-heading {
background-color: #f2f2ff;
border-radius: 6px 6px 0 0;
color: #8787a5;
float: right;
font-size: 85%;
line-height: 1;
max-width: 85%;
overflow-wrap: break-word;
padding: 0.25em 0.4em;
text-align: right;
}

.inline-markdown-heading {
line-height: 1.5;
}

.code-block-content {
clear: both;
display: block;
}

code > span.highlighted {
background: lavender;
}

kbd {
background-color: #fafbfc;
border: 1px solid #c6cbd1;
Expand Down Expand Up @@ -94,7 +128,7 @@ code.hljs:hover {
header.header-fixed {
position: fixed;
width: 100%;
z-index: 9999;
z-index: 1000;
}

/* #app is treated as the main container */
Expand All @@ -112,10 +146,10 @@ header.header-fixed {
#content-wrapper {
flex: 1;
margin: 0 auto;
min-width: 0;
max-width: 1000px;
padding: 0 20px;
transition: 0.4s;
width: 100%;
-webkit-transition: 0.4s;
}

Expand Down Expand Up @@ -340,3 +374,85 @@ li.footnote-item:target {
top: 0;
width: 3em;
}

/* hide popover, modal, tooltip content */
[data-mb-html-for] {
display: none;
}

/* styles for triggers */
.trigger {
border-bottom: 1px dashed currentColor;
}

.trigger-click {
cursor: pointer;
border-bottom: 1px dashed currentColor;
}

.modal.mb-zoom {
-webkit-transform: scale(0.1);
-moz-transform: scale(0.1);
-ms-transform: scale(0.1);
transform: scale(0.1);
opacity: 0;
-webkit-transition: all 0.3s;
-moz-transition: all 0.3s;
transition: all 0.3s;
}

.modal.mb-zoom.show {
-webkit-transform: scale(1);
-moz-transform: scale(1);
-ms-transform: scale(1);
transform: scale(1);
opacity: 1;
}

/* "Copy" code block button */
pre {
position: relative;
}

.copy-btn {
background-color: #b4b4b9;
border-radius: 0.25rem;
color: #f8f8ff;
display: inline-block;
font-size: 75%;
line-height: 1;
padding: 0.25em 0.4em;
position: absolute;
right: 0.5em;
text-align: center;
top: 0.4em;
white-space: nowrap;
}

.copy-btn:hover {
color: #555;
}

.copy-btn-body {
align-items: center;
display: flex;
}

.copy-btn svg {
fill: currentColor;
margin-right: 0.4em;
}

.copy-btn-label {
font-size: 11px;
}

.copy-btn:focus {
outline: none;
}

/* Octicon sizing */
.octicon {
height: 1em;
width: 1em;
}
12 changes: 11 additions & 1 deletion asset/js/bootstrap-vue.min.js

Large diffs are not rendered by default.

66 changes: 50 additions & 16 deletions asset/js/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,30 +33,31 @@ function setupAnchors() {
if (isFixed) {
jQuery('.nav-inner').css('padding-top', `calc(${headerHeight}px)`);
jQuery('#content-wrapper').css('padding-top', `calc(${headerHeight}px)`);
const headingTags = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'];
for (let i = 0; i < headingTags.length; i += 1) {
const headingTag = headingTags[i];
insertCss(
`${headingTag}::before {
display: block;
content: '';
margin-top: calc(-${headerHeight}px - ${bufferHeight}rem);
height: calc(${headerHeight}px + ${bufferHeight}rem);
}`);
}
insertCss(
`span.anchor {
display: block;
position: relative;
top: calc(-${headerHeight}px - ${bufferHeight}rem)
}`,
);
`span.card-container::before {
display: block;
content: '';
margin-top: calc(-${headerHeight}px - ${bufferHeight}rem);
height: calc(${headerHeight}px + ${bufferHeight}rem);
}`);
}
jQuery('h1, h2, h3, h4, h5, h6, .header-wrapper').each((index, heading) => {
if (heading.id) {
jQuery(heading).on('mouseenter',
() => jQuery(heading).find('.fa.fa-anchor').css('visibility', 'visible'));
jQuery(heading).on('mouseleave',
() => jQuery(heading).find('.fa.fa-anchor').css('visibility', 'hidden'));
if (isFixed) {
/**
* Fixing the top navbar would break anchor navigation,
* by creating empty spans above the <h> tag we can prevent
* the headings from being covered by the navbar.
*/
const spanId = heading.id;
heading.insertAdjacentHTML('beforebegin', `<span id="${spanId}" class="anchor"></span>`);
jQuery(heading).removeAttr('id'); // to avoid duplicated id problem
}
}
});
jQuery('.fa-anchor').each((index, anchor) => {
Expand Down Expand Up @@ -171,6 +172,39 @@ function setupWithSearch() {
setupSiteNav();
}

function makeInnerGetterFor(attribute) {
return (element) => {
const innerElement = element.querySelector(`[data-mb-html-for="${attribute}"]`);
return innerElement === null ? '' : innerElement.innerHTML;
};
}

function makeHtmlGetterFor(componentType, attribute) {
return (element) => {
const contentWrapper = document.getElementById(element.attributes.for.value);
return contentWrapper.dataset.mbComponentType === componentType
? makeInnerGetterFor(attribute)(contentWrapper) : '';
};
}

/* eslint-disable no-unused-vars */
/*
These getters are used by triggers to get their popover/tooltip content.
We need to create a completely new popover/tooltip for each trigger due to bootstrap-vue's implementation,
so this is how we retrieve our contents.
*/
const popoverContentGetter = makeHtmlGetterFor('popover', 'content');
const popoverHeaderGetter = makeHtmlGetterFor('popover', 'header');
const popoverInnerContentGetter = makeInnerGetterFor('content');
const popoverInnerHeaderGetter = makeInnerGetterFor('header');

const popoverGenerator = { title: popoverHeaderGetter, content: popoverContentGetter };
const popoverInnerGenerator = { title: popoverInnerHeaderGetter, content: popoverInnerContentGetter };

const tooltipContentGetter = makeHtmlGetterFor('tooltip', '_content');
const tooltipInnerContentGetter = makeInnerGetterFor('_content');
/* eslint-enable no-unused-vars */

if (enableSearch) {
setupWithSearch();
} else {
Expand Down
6 changes: 3 additions & 3 deletions asset/js/vue-strap.min.js

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions docs/_markbind/layouts/devGuide/navigation.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@

* [Developer Guide]({{baseUrl}}/devGuide/devGuide.html)
* [Maintainer Guide]({{baseUrl}}/devGuide/maintainerGuide.html)
* [Contributing]({{baseUrl}}/devGuide/contributing.html)

</navigation>
4 changes: 2 additions & 2 deletions docs/_markbind/variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
<variable name="icon_check_blue"><span style="color: {{ markbind_blue }}">:fas-check-circle:</span></variable>
<variable name="icon_bulb_blue"><span style="color: {{ markbind_blue }}">:fas-lightbulb:</span></variable>
<variable name="icon_dislike">:fas-thumbs-down:</variable>
<variable name="icon_example"><big><span class='badge badge-pill badge-light' style="background-color: #d9d9d9; color: #737373; position:relative; left:-10px">Example:</span></big></variable>
<variable name="icon_examples"><big><span class='badge badge-pill badge-light' style="background-color: #d9d9d9; color: #737373; position:relative; left:-10px">Examples:</span></big></variable>
<variable name="icon_example"><big><span class='badge badge-pill badge-secondary' style="padding-bottom: 4px; margin-right: 5px;">Example</span></big></variable>
<variable name="icon_examples"><big><span class='badge badge-pill badge-secondary' style="padding-bottom: 4px;">Examples</span></big></variable>
<variable name="icon_info">:fas-info-circle:</variable>
<variable name="icon_ticked">:far-check-square:</variable>

Expand Down
73 changes: 73 additions & 0 deletions docs/devGuide/contributing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
<frontmatter>
title: "Contributing"
layout: devGuide
pageNav: default
</frontmatter>

# Contributing to MarkBind

Thank you for your interest in contributing! We're glad you want to help. Read the sections below to learn about our code of conduct and how to get started contributing.

## Code of conduct

This project and everyone participating in it are governed by our [Code of Conduct]({{baseUrl}}/devGuide/contributing/code-of-conduct.html). By participating, you are expected to uphold this code. Please report unacceptable behavior to [email protected].

## Things to do before getting started

Make sure you have the project set up and ready. We have guides detailing what we [expect our contributors to know]({{baseurl}}/devguide/devguide#requirement), our required [environment]({{baseurl}}/devGuide.html#environment) and our [development process]({{baseurl}}/devGuide.html#development-process).

## How to contribute

All contributions are welcome. You can contribute to MarkBind by:
- Reporting bugs
- Requesting features
- Making changes (with a corresponding Pull Request), by:
- Updating documentation
- Fixing bugs
- Implementing features

### How to report a bug

Report bugs in our [issue tracker](https://github.com/MarkBind/markbind/issues), following the guideslines below. This helps us in undestanding your report.

- Before reporting a bug, please search if someone else has has already reported it in the [existing issues](https://github.com/MarkBind/markbind/issues).
- Is your bug from the current version or an older version of MarkBind? What OS are you on? Tell us about your environment, for example, the MarkBind version you are on.
- What did you do? What did you expect to happen? What actually happened?
- Include things such the actual MarkBind code causing the issue, the steps for reproduction, the raw output, and what you expect instead can help us in diagnosing the issue quicker
- You are also encouraged to submit a PR that reproduces this in `test/functional/test_site/bugs/`.

Please do not submit personal support requests (eg: "How do I use X?") as bugs. Instead, feel free to [submit a blank issue](https://github.com/MarkBind/markbind/issues/new) to our issue tracker with a label of <a href="https://github.com/MarkBind/markbind/issues?q=is%3Aopen+is%3Aissue+label%3Aquestion" class="badge" style="color:white; background-color: #A41BD6;">question</a>.

### How to request a feature

We welcome suggestions to improve MarkBind as well. To do so, you can request for new features or enhancements to existing features in our [issue tracker](https://github.com/MarkBind/markbind/issues), following the guidelines below. This helps us in undestanding your request.

- Before requesting a new feature, please search if someone else has has already requested for it in the [existing issues](https://github.com/MarkBind/markbind/issues).
- Is your request related to a problem? Provide a clear and concise description of what the problem is.
Eg: I have an issue when [...]
- Describe the solution you'd like. Provide a clear and concise description of what you want to happen.
- Describe alternatives you've considered. Let us know about other solutions you've tried or researched.
- You can also share some additional context, anything else that you can add about the proposal.

### First issues for contributors

Unsure where to begin contributing to MarkBind?

We recommend that you start off by visiting the [Getting Started](https://markbind.org/userGuide/gettingStarted.html) section in the User Guide and try out MarkBind as a user. Exploring and understanding the various features it provides.

If you have not done so yet, we also recommend visiting the [Developer Guide]({{baseurl}}/devGuide/index.html) to learn about the [structure of the project]({{baseurl}}/devGuide/index.html#project-structure), how to set up the [developer environment]({{baseurl}}/devGuide/index.html#development-process), and how to run [tests]({{baseurl}}/devGuide/devGuide.html#testing).

When you're ready, you can start by looking through these issues marked <a href="https://github.com/MarkBind/markbind/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22+sort%3Acomments-desc" class="badge" style="color:white; background-color: #7057FF;">good first issue</a>.

If you have any questions, be it regarding MarkBind or our workflow, feel free to [submit a blank issue](https://github.com/MarkBind/markbind/issues/new) to our issue tracker with a label of <a href="https://github.com/MarkBind/markbind/issues?q=is%3Aopen+is%3Aissue+label%3Aquestion" class="badge" style="color:white; background-color: #A41BD6;">question</a>.

### How to make Pull Requests to submit changes?

Please follow the steps to have your contribution considered by the maintainers:

1. Follow all the instructions in the pull request [template](https://github.com/MarkBind/markbind/blob/master/.github/PULL_REQUEST_TEMPLATE), the same template is also given to you when you submit a new Pull Request.
2. After you submit your pull request, verify that all [status checks](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/about-status-checks) are passing
3. You can then [request for a review](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/requesting-a-pull-request-review)
- Not sure who to ask a review from? A good rule of thumb is to check recently [merged](https://github.com/MarkBind/markbind/pulls?q=is%3Apr+is%3Aclosed) or [approved](https://github.com/MarkBind/markbind/pulls?q=is%3Aopen+is%3Apr+review%3Aapproved) pull requests, and see who the reviewers are. It's likely that they are currently active and willing to review your pull request as well!

Reviewer(s) may request additional changes from you in terms of implementation, design, tests, style, or other changes before your pull request is finally approved.
Loading