Skip to content

v5.0.0

Compare
Choose a tag to compare
@tlylt tlylt released this 16 Jul 11:22
· 130 commits to master since this release

markbind-cli

User Facing Changes

Breaking Changes

1. Change scroll top button to component by @yucheng11122017 in #2170

Scroll to Top button is changed to a component to allow for more flexibility in its usage. This includes allowing users to

  • Not use it if they want
  • Change the icon
  • Change the icon size and color
  • Change the position

It is no longer automatically added to pages on the website. To add the Scroll to Top Button to a website, add the component to the layout page

In layout page

...
<scroll-top-button />
...

This button is still added to the default layout when users initialise a MarkBind project.

Example insertion:

<div id="flex-body">
  <div id="content-wrapper">
    {{ content }}
  </div>
  <scroll-top-button></scroll-top-button>
</div>

2. Update deploy command to build site before deployment by @lhw-1 in #2218

The markbind deploy command now builds and generates the site by default, and this automatic build step can be skipped using the newly introduced --no-build flag. This change is to accommodate the common use case consisting of the following steps:

markbind build
markbind deploy

The markbind build step can now be omitted.

It should be noted that if you have been generating your site with specified values for baseUrl or path to siteConfig.json, you should add the --no-build flag to the markbind deploy command to avoid re-building the site with default values.

If this was being done previously:

markbind build --site-config ./otherSiteConfig.json --baseUrl myDir
markbind deploy

It should now be changed to:

markbind build --site-config ./otherSiteConfig.json --baseUrl myDir
markbind deploy --no-build

3. Deprecate slots, attributes and syntax by @itsyme in #2208

Currently, there are quite a few attributes/slots/syntaxes that are deprecated. They may or may not be listed in the docs, implemented in the codebase, or log a warning when used. We now completely remove them.

Overview:

Component Deprecated In docs In code CLI warning?
Modals modal-footer -> footer yes yes yes
Modals modal-header -> header no yes yes
Question has-input -> type="text" yes yes no
Question invalid question types[1] no yes no
Icons {{ prefix_name }} -> :prefix_name: yes no no

[1] This seems a bit more complex compared to the others - it looks like there is some backwards compatibility intentionally preserved (#1274, #1293)

To migrate:
Modal:

  • modal-header -> header
    • modal-header attribute has been fully deprecated
    • To migrate, replace the modal-header attribute with just header with the text in the attribute unchanged
    • e.g. <modal modal-header="HEADER TEXT"> to <modal header="HEADER TEXT">
  • modal-footer -> footer
    • modal-footer attribute has been fully deprecated
    • To migrate, replace the modal-footer attribute with just footer with the text in the attribute unchanged
    • e.g. <modal modal-footer="FOOTER TEXT"> to <modal footer="FOOTER TEXT">

Question:

  • has-input -> type="text"
    • has-input attribute has been fully deprecated
    • To migrate, replace the has-input attribute with type="text"
    • e.g. <question has-input> to <question type="text">
  • Invalid question types (invalid type attribute) now not supported
    • To migrate, give the question a valid type: mcq, checkbox, blanks, text

Icons:

  • {{ }} -> : :
    • To migrate, replace all {{ and }} to :
    • e.g. {{emoji-name}} to :emoji-name:

4. Deprecate theme attribute in site config JSON by @itsyme in #2235

Fully deprecates theme attribute in site config JSON.

theme attribute in site config JSON has been fully deprecated.

To migrate:
Use "style": {"bootstrapTheme": "..."} instead of "theme": "...".

For example,
Original (in site.json):

{
"theme": "bootswatch-cerulean"
}

Updated (in site.json):

{
  "style": {
    "bootstrapTheme": "bootswatch-cerulean"
  }
}

5. Upgrade to use node 16 by @yucheng11122017 in #2233

Node.js version 14 is no longer supported by Markbind as it is due to reach it's end of life in 30 April 2023. The minimum required version of Node.js is now 16. Users are to upgrade to at least version 16 of Node.js.

6. Upgrade PlantUML version to 1.2023.10 by @lesterong in #2311

The PlantUML plugin has been updated from 1.2020.7 to 1.2023.10.

Changes
(For detailed changes, please view them on plantuml website)

  1. The default theme has been updated in this version of PlantUML. To use the old theme, use the skin rose directive.
theme change
  1. There is a slight shift in the layout with the new default theme, and the position of annotations on PlantUML diagrams may have to be updated.
  2. PlantUML now separates namespaces by default. This behavior can be disabled using the set separator none command.
separators change
  1. PlantUML no longer allows for two elements with the same name. A possible workaround is to provide an alias to one of the elements, so their names do not conflict.
'alias as c provided
rectangle checkout as c {
  (checkout) .> (payment) : include
}
element with same name alias
  1. PlantUML does not render underlines in class diagrams using the Creole syntax. A possible workaround is to use the HTML syntax to define underlines. For example, <u>Class Name</u> will render an underline, but not __Class Name__.
Creole Syntax vs HTML Syntax underline
  1. The font used in Gantt Charts has been updated. As a result, some of the text may appear outside of the bars.
Gantt charts change

7. Clean up docs & tests for variables by @tlylt in #2301

A newly generated site (e.g. via markbind init) will no longer contain the following erroneous line in _markbind/variables.md:

<variable from="variables.json" />

This way of importing variables from an external file within the global variables.md is not supported.

For existing sites migrating to the latest version, please check that you do not have the above line in your _markbind/variables.md file as it will not work as expected and will log a warning. Please remove such a line if found.

8. Replace jQuery with vanilla JS by @yucheng11122017 in #2130

jQuery is no longer supported in Markbind. This is because jQuery is no longer as relevant since it can be replaced with modern DOM APIs.

If jQuery is used in your website, either

  • import jQuery
  • refactor jQuery usage in favour for modern DOM APIs. This website is useful when refactoring jQuery usages.

9. Generate .gitignore on init command by @lhw-1 in #2248

A .gitignore file is now added by the markbind init command by default.

Default rules for the .gitignore file:

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
_markbind/logs/

# Dependency directories
node_modules/

# Production
_site/

# Env
.env
.env.local

# IDE configs
.vscode/
.idea/*
*.iml

This file is only generated when initializing a new MarkBind site from scratch, and not when converting a set of pre-existing documents into a MarkBind site using markbind init --convert. As such, this does not require any additional actions from the user.

10.Upgrade fontawesome version to latest (v6) from v5 Resolves #2242 by @SPWwj in #2326

We upgraded from fontawesome-free@5.15.4 to fontawesome-free@6.4.0.
The current icons will be preserved (i.e. you don't have to make any changes if you don't want to) due to Font Awesome's backward compatibility.
With Version 6

  • new icons are available
  • some icons have been renamed
  • syntax/usage has changed slightly

For details please refer to Font Awesome's changelog

Features

Enhancements

Fixes

Documentation

Developer Facing Changes

Code Quality

DevOps Changes

  • Update release note format to align with GitHub generated list by @tlylt in #2254
  • Add CI check for warnings & errors when building docs by @tlylt in #2287

Dependencies

Miscellaneous

(We reverted the implementation below due to further discussion required)

Full Changelog: v4.1.0...v5.0.0