Skip to content

Release 2.6.0 #1921

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

Merged
merged 52 commits into from
Jun 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
3a45af2
chore: Add baseURL configuration option to S3 modules
WakuwakuP Jul 10, 2024
9060402
fix: default scheme settings to https
fukumoto-ts Feb 20, 2025
f0c68ad
chore: update GitHub Actions to use checkout@v4
Yukaii Mar 19, 2025
9448c91
Merge pull request #1895 from hackmdio/bugfix/bump-workflow-packages
Yukaii Mar 19, 2025
d56c774
fix: update package-lock.json to mark extraneous dependencies as dev …
Yukaii Mar 19, 2025
5362c12
chore: update mermaid dependency to version 11.5.0
Yukaii Mar 19, 2025
55e9de3
feat: add PDF URL validation and content type check
Yukaii Mar 19, 2025
c7b615d
feat: configure MiniCssExtractPlugin for production environment in we…
Yukaii Mar 20, 2025
72df04d
refactor: move custom reveal plugin to public/js
Yukaii Mar 20, 2025
ad24c09
fix: update plugin paths for spotlight and elapsed-time-bar in slide.js
Yukaii Mar 20, 2025
9f0e3a7
fix: add eslint-disable comments to elapsed-time-bar and spotlight pl…
Yukaii Mar 20, 2025
9ce14e4
feat: increase contrast of default theme
stanley2058 Mar 21, 2025
c8cb4b1
fix: increase contrast of ui elements in dark mode
stanley2058 Mar 21, 2025
048ec83
fix: update ESLint configuration to include ES6 support and parser op…
Yukaii Mar 21, 2025
6a861a8
Merge pull request #1900 from hackmdio/chore/dev-1888-upgrade-linter
Yukaii Mar 21, 2025
39cefec
feat: add preference to disable table editor shortcuts
Yukaii Mar 21, 2025
bda5adc
feat: migrate preferences from cookies to localStorage
Yukaii Mar 21, 2025
282ba60
fix: linting
Yukaii Mar 21, 2025
e0fb494
feat: add state parameter to OAuth strategies for enhanced security
Yukaii Mar 24, 2025
941c2a1
chore: bump codemirror version to 5.65.8
stanley2058 Apr 14, 2025
1ab3a5a
fix: update node version matrix to only include 16.x
Yukaii Apr 18, 2025
10aee3d
abc notation requirement update
Matt-V50 Feb 4, 2025
e72fcd0
Update foot.ejs
Matt-V50 Apr 19, 2025
d4ccba9
fix: login email should be case insensitive
DubMythlit Apr 24, 2025
b9a777d
VSCode: update image to allow development on MBP ARM chips
Nowaker May 11, 2025
5f4bf49
chore: upgrade mermaid to 11.5.0 (#1894)
Yukaii May 15, 2025
2989453
chore: Add baseURL configuration option to S3 modules (#1876)
Yukaii May 15, 2025
46fecbf
fix: lost schema of S3 URL (#1893)
Yukaii May 15, 2025
ae80b92
feat: add PDF URL validation and content type check (#1896)
Yukaii May 15, 2025
56fd0c1
feat: configure MiniCssExtractPlugin for production environment in we…
Yukaii May 15, 2025
5c436bd
refactor: fix plugin paths and move custom reveal plugin out of build…
Yukaii May 15, 2025
cf53ce1
feat: improve contrast on certain elements (#1899)
Yukaii May 15, 2025
6dd3d92
feat: add state parameter to OAuth strategies for enhanced security (…
Yukaii May 15, 2025
5468be4
chore: bump codemirror version to 5.65.8 (#1908)
Yukaii May 15, 2025
81611f2
refactor: remove cookie preference check for table shortcuts
Yukaii May 12, 2025
4769c1e
fix: login email should be case insensitive (#1911)
Yukaii May 15, 2025
1e20bc1
feat: add preference to disable table editor shortcuts and migrate pr…
Yukaii May 15, 2025
43035fb
chore: bump abcjs to 6.2.3 (#1891)
Yukaii May 15, 2025
e5623cb
chore: update abcjs to version 6.4.4 in pretty.ejs and slide.ejs
Yukaii May 15, 2025
1b35bb5
chore: update cdn mermaid.js to version 11.5.0 in foot.ejs, pretty.ej…
Yukaii May 15, 2025
7c96e83
Apply suggestions from code review
jackycute May 15, 2025
1a8ff4a
Merge pull request #1914 from hackmdio/chore/sync-deps-update-and-cdn
Yukaii May 29, 2025
3c86c65
Merge pull request #1913 from Nowaker/mbp-arm-chip
Yukaii May 29, 2025
077d522
chore: update docker-compose.yml with build instructions for codimd s…
Yukaii Jun 4, 2025
97b3ad8
chore: integrate mermaid.js into the build process and update initial…
Yukaii Jun 5, 2025
3043f56
fix: update mermaid diagram rendering in extra.js to use new API
Yukaii Jun 5, 2025
0051081
Merge pull request #1917 from hackmdio/chore/improve-docker-compose-b…
Yukaii Jun 5, 2025
470e228
Merge pull request #1919 from hackmdio/bugfix/dev-2044-mermaid-bundli…
Yukaii Jun 5, 2025
8bb7502
Create FUNDING.json
jackycute Jun 6, 2025
d0e9ea0
Merge pull request #1920 from hackmdio/master
Yukaii Jun 10, 2025
b742a67
docs: update release note for version 2.6.0
Yukaii Jun 10, 2025
3d74608
chore: bump version to 2.6.0
Yukaii Jun 10, 2025
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
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# [Choice] Node.js version: 16, 14
ARG VARIANT=14-buster
ARG VARIANT=14-bullseye
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-${VARIANT}

# [Optional] Uncomment this section to install additional OS packages.
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ services:
context: ..
dockerfile: .devcontainer/Dockerfile
args:
VARIANT: 14-buster
VARIANT: 14-bullseye
environment:
- CMD_DB_URL=postgres://codimd:codimd@localhost/codimd
- CMD_USECDN=false
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,25 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x, 16.x]
node-version: [16.x]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

# from https://stackoverflow.com/a/69649733
- name: Reconfigure git to use HTTP authentication
run: >
git config --global url."https://github.com/".insteadOf
ssh://git@github.com/

- uses: actions/cache@v2
- uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-

- uses: actions/setup-node@v2
- uses: actions/setup-node@v4
name: Use Node.js ${{ matrix.node-version }}
with:
node-version: ${{ matrix.node-version }}
Expand All @@ -43,8 +43,8 @@ jobs:
if: github.ref == 'refs/heads/master' || github.event.pull_request

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
name: Use Node.js 14
with:
node-version: 14
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down
7 changes: 7 additions & 0 deletions FUNDING.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"drips": {
"ethereum": {
"ownedBy": "0xEd37B84FD84A834886aC07693aF6A9cd35040002"
}
}
}
5 changes: 5 additions & 0 deletions deployments/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,14 @@ services:
codimd:
# you can use image or custom build below,
image: nabo.codimd.dev/hackmdio/hackmd:2.5.3
# Using the following command to trigger the build
# docker-compose -f deployments/docker-compose.yml up --build
# build:
# context: ..
# dockerfile: ./deployments/Dockerfile
# args:
# RUNTIME: hackmdio/runtime:16.20.2-35fe7e39
# BUILDPACK: hackmdio/buildpack:16.20.2-35fe7e39
environment:
- CMD_DB_URL=postgres://codimd:change_password@database/codimd
- CMD_USECDN=false
Expand Down
3 changes: 2 additions & 1 deletion lib/auth/bitbucket/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ const bitbucketAuth = module.exports = Router()
passport.use(new BitbucketStrategy({
clientID: config.bitbucket.clientID,
clientSecret: config.bitbucket.clientSecret,
callbackURL: config.serverURL + '/auth/bitbucket/callback'
callbackURL: config.serverURL + '/auth/bitbucket/callback',
state: true
}, passportGeneralCallback))

bitbucketAuth.get('/auth/bitbucket', function (req, res, next) {
Expand Down
3 changes: 2 additions & 1 deletion lib/auth/dropbox/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ passport.use(new DropboxStrategy({
apiVersion: '2',
clientID: config.dropbox.clientID,
clientSecret: config.dropbox.clientSecret,
callbackURL: config.serverURL + '/auth/dropbox/callback'
callbackURL: config.serverURL + '/auth/dropbox/callback',
state: true
}, passportGeneralCallback))

dropboxAuth.get('/auth/dropbox', function (req, res, next) {
Expand Down
6 changes: 5 additions & 1 deletion lib/auth/email/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

const Router = require('express').Router
const passport = require('passport')
const sequelize = require('sequelize')
const validator = require('validator')
const LocalStrategy = require('passport-local').Strategy
const config = require('../../config')
Expand All @@ -21,7 +22,10 @@ passport.use(new LocalStrategy({
try {
const user = await models.User.findOne({
where: {
email: email
email: sequelize.where(
sequelize.fn('LOWER', sequelize.col('email')),
email.toLowerCase()
)
}
})

Expand Down
3 changes: 2 additions & 1 deletion lib/auth/facebook/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ const facebookAuth = module.exports = Router()
passport.use(new FacebookStrategy({
clientID: config.facebook.clientID,
clientSecret: config.facebook.clientSecret,
callbackURL: config.serverURL + '/auth/facebook/callback'
callbackURL: config.serverURL + '/auth/facebook/callback',
state: true
}, passportGeneralCallback))

facebookAuth.get('/auth/facebook', function (req, res, next) {
Expand Down
3 changes: 2 additions & 1 deletion lib/auth/github/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ passport.use(new GithubStrategy({
callbackURL: config.serverURL + '/auth/github/callback',
authorizationURL: githubUrl('login/oauth/authorize'),
tokenURL: githubUrl('login/oauth/access_token'),
userProfileURL: githubUrl('api/v3/user')
userProfileURL: githubUrl('api/v3/user'),
state: true
}, async (accessToken, refreshToken, profile, done) => {
if (!config.github.organizations) {
return passportGeneralCallback(accessToken, refreshToken, profile, done)
Expand Down
3 changes: 2 additions & 1 deletion lib/auth/gitlab/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ const gitlabAuthStrategy = new GitlabStrategy({
clientID: config.gitlab.clientID,
clientSecret: config.gitlab.clientSecret,
scope: config.gitlab.scope,
callbackURL: config.serverURL + '/auth/gitlab/callback'
callbackURL: config.serverURL + '/auth/gitlab/callback',
state: true
}, passportGeneralCallback)

if (process.env.https_proxy) {
Expand Down
3 changes: 2 additions & 1 deletion lib/auth/google/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ passport.use(new GoogleStrategy({
clientID: config.google.clientID,
clientSecret: config.google.clientSecret,
callbackURL: config.serverURL + '/auth/google/callback',
userProfileURL: 'https://www.googleapis.com/oauth2/v3/userinfo'
userProfileURL: 'https://www.googleapis.com/oauth2/v3/userinfo',
state: true
}, passportGeneralCallback))

googleAuth.get('/auth/google', function (req, res, next) {
Expand Down
3 changes: 2 additions & 1 deletion lib/auth/twitter/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ const twitterAuth = module.exports = Router()
passport.use(new TwitterStrategy({
consumerKey: config.twitter.consumerKey,
consumerSecret: config.twitter.consumerSecret,
callbackURL: config.serverURL + '/auth/twitter/callback'
callbackURL: config.serverURL + '/auth/twitter/callback',
state: true
}, passportGeneralCallback))

twitterAuth.get('/auth/twitter', function (req, res, next) {
Expand Down
3 changes: 2 additions & 1 deletion lib/config/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ module.exports = {
accessKeyId: undefined,
secretAccessKey: undefined,
region: undefined,
endpoint: undefined
endpoint: undefined,
baseURL: undefined
},
minio: {
accessKey: undefined,
Expand Down
3 changes: 2 additions & 1 deletion lib/config/environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ module.exports = {
accessKeyId: process.env.CMD_S3_ACCESS_KEY_ID,
secretAccessKey: process.env.CMD_S3_SECRET_ACCESS_KEY,
region: process.env.CMD_S3_REGION,
endpoint: process.env.CMD_S3_ENDPOINT
endpoint: process.env.CMD_S3_ENDPOINT,
baseURL: process.env.CMD_S3_BASEURL
},
minio: {
accessKey: process.env.CMD_MINIO_ACCESS_KEY,
Expand Down
8 changes: 6 additions & 2 deletions lib/imageRouter/s3.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,17 @@ exports.uploadImage = function (imagePath, callback) {
// default scheme settings to https
let s3Endpoint = 'https://s3.amazonaws.com'
if (config.s3.region && config.s3.region !== 'us-east-1') {
s3Endpoint = `s3-${config.s3.region}.amazonaws.com`
s3Endpoint = `https://s3-${config.s3.region}.amazonaws.com`
}
// rewrite endpoint from config
if (config.s3.endpoint) {
s3Endpoint = config.s3.endpoint
}
callback(null, `${s3Endpoint}/${config.s3bucket}/${params.Key}`)
if (config.s3.baseURL) {
callback(null, `${config.s3.baseURL}/${params.Key}`)
} else {
callback(null, `${s3Endpoint}/${config.s3bucket}/${params.Key}`)
}
}).catch(err => {
if (err) {
callback(new Error(err), null)
Expand Down
Loading