Commit Graph

566 Commits

Author SHA1 Message Date
Akshay Bhinge
1e9d2f0036
docs: Removal of flags for language choice drop-down (#2468) 2024-07-20 09:28:31 +08:00
John Hildenbiddle
77d93fae78
feat: v5 style overhaul (#2469)
Style updates:

- New "core" theme serves as base for all other themes (official and third-party)
- New CSS custom properties for simplified customization of "core" theme
  **Note:** List of available properties will be made available in documentation by embedding soruce CSS in docs after merge. Merge is required because embedded CSS needs to be in `main` branch. For now, see `_vars.css` and `_vars-advanced.css` for details.
- New theme "add-ons" modify core theme properties and/or add custom declarations as needed.
- New Prism.js theme support
- New configurable sidebar toggle design
- New typography defaults to system sans-serif and monospace fonts instead of relying on external web font.
- New "Core Dark" theme addon provide dark theme styles. Can optionally be applied based on operating system's light/dark setting using `@media` attribute on `<link>` element.
- New "Vue" theme addon. Closely replicated popular v4 theme while allowing for v5 enhancements.
- New CSS class names available for adding loading indicators, adding sidebar expand/collapse icons, adding sidebar group styles, clamping sidebar links to a single line with ellipses, and changing the sidebar toggle icon.
- New auto-generated gradient background for cover page (ensure gradient hue is > 50 degree apart, use OKLCH color if supported, randomize grandient angle, reduce brightness in dark mode)
- New button styles (basic, primary, secondary)
- New form element styles (text input, radio, checkbox, )
- New "callouts" (previously "important" and "tip" helpers)
- New default syntax highlighting theme (from [docsify-themeable](https://jhildenbiddle.github.io/docsify-themeable/))
- New auto-generated theme color shade and tint colors
- New auto-generated monochromatic color palette
- New form element styles (fields, legend, text input, text area, checkbox, radio, toggles, and select)
- New "headerless" tables
- New `kbd` styles
- New task list style
- New merged navbar styles (consistent with sidebar nav styles)
- New search plugin styles and keyboard shortcut indicators
- Add ability restore previously focused content element after hiding sidebar
- Add "focus trap" when sidebar is visible on mobile (accessibility)
- Add ability for sidebar links to wrap by default (previous single-line w/ ellipsis display available as CSS class on `<body>` option)
- Add sidebar `page-link`, `group`, and `group-title` CSS classes to sidebar markup.
- Add reduced motion media query to set all animation/transition timings to zero
- Update Google Font imports (use new variable vs older fixed width fonts)
- Update primary/secondary button order on coverpage (primary should be first)
- Fix missing merged navbar when loading at desktop resolution then resizing to mobile
- Fix inverted open/close sidebar visibility state at desktop/mobile resolutions
- Fix overflow setting to prevent clipping of element focus ring
- Fix safe area inset margins on mobile in landscape orientation
- Fix inverted "tip" and "warn" class names
- Fix scroll padding to prevent headers from touching top edge of viewport when scrolled to
- Remove Stylus dependency (now using only PostCSS)
- Remove legacy themes "Buble", "Dark", "Dolphin", and "Pure".

Documentation updates:

- New "UI Kit" page showcasing all elements styled by Docsify
- Update "Quick Start" page template
- Update "Adding pages" page with information on how to properly create sidebar group titles and navbar drop-down menus
- Update "Themes" page with theme and class toggles
- Update "Configuration" page with deprecation warnings for `themeColor` and `topMargin`
- Move "Edit Page" link to footer
- Remove [docsify-themeable](https://jhildenbiddle.github.io/docsify-themeable/) endorsement (currently not compatible with v5 and future is unknown)

Miscellaneous updates:

- New search plugin options: `insertBefore` and `insertAfter`
- Add PostCSS config file
- Update BrowserSync config (disable "ghost" mode)
- Update tests
- Fix Jest + Prettier 3 conflict
- Fix `getAndRemoveDocisfyIgnoreConfig` name type (now `Docisfy` => `Docsify`)
- Fix execution of sidebar-generating code when `hiddenSidebar` is `true`
- Remove `inBrowser` constant (SSR deprecated, so no longer needed)
2024-07-19 15:34:51 +00:00
John Hildenbiddle
f5412dc7b0
chore: Update lint configuration (ESLint 9, Prettier 3) (#2438)
* Update linting configuration (eslint, prettier)

* Fix lint issues following eslint prettier update

* Change ESLint config to allow boolean coercion

* Switch to default import name per docs

* Fix suppression of error details

* Update JSDoc comments

* Update waiForFunctin to provide error details

---------

Co-authored-by: Koy Zhuang <koy@ko8e24.top>
2024-05-28 15:27:29 -05:00
John Hildenbiddle
4ae87bb18b
build: v5 updates and refactors (#2428)
* Update JS build

- Change rollup build from API to config file
- Change output dir from lib to dist
- Update lib to dist path in related files
- Update dependencies
- Add banner comment to bundles
- Add unminified plugin bundles

* Update docs with v5 version lock and dist path

* Update docs to reference minified themes

* Clean up docs

* Update CSS build

- Change CSS build from API to CLI
- Change output dir from lib to dist
- Update lib to dist path in related files
- Update dependencies
- Add sourcemaps

* Update dependencies

* Clean up package.json and add keywords

* Fix rimraf globs on Windows

* Fix PostCSS CLI glob on Windows

* Update test-related dependencies

* Update emoji

* Add engines prop to package.json
2024-05-21 15:19:21 -05:00
John Hildenbiddle
8ef9a3cd03
Fix: Vue text interpolation in code blocks. (#2430)
* Update Vue 3 depenency and docs. Remove Vue 2.

* Fix minor lint issue

* Remove Vue 2 reference

* Swap button positions

* Update Vue2 links

* Send HTML with _blank to avoid quirks mode

* Support Vue text interpolation in code blocks

Fix #1812
2024-05-19 11:49:33 -05:00
timothyjohn2015
0070e26da5
docs: Fix spelling mistake (#2426) 2024-05-13 09:43:33 +08:00
Can Eldem
11015feecc
docs: add stormkit as deployment platform (#2413) 2024-05-07 08:11:41 +08:00
Luffy
87fd55d712
fix: carbon broken (#2387) 2024-03-26 08:19:31 +08:00
Bingzhi.Li
9e681c6419
chore: fix front matter broken (#2390)
Co-authored-by: Luffy <52o@qq52o.cn>
2024-03-22 09:37:28 +08:00
Luiz Carlos
806d37bdf0
docs: Update logo doc (#2347)
Co-authored-by: Lu Fei <52o@qq52o.cn>
2023-12-21 10:50:43 +08:00
John Hildenbiddle
1c5a7013f1
Chore: Clean up server implementation and update test docs (#2316)
- Replace live-server with existing Browsersync dependency as web server
- Remove duplicate `index.html` file
- Add `build:html` script to generate `/docs/preview.html`
2023-12-11 15:00:33 -06:00
John Hildenbiddle
cf61192f9a
feat: Keyboard bindings (#2279)
Co-authored-by: Lu Fei <52o@qq52o.cn>
2023-12-05 08:09:52 +08:00
John Hildenbiddle
50b84f74b2
feat: Add "Skip to main content" link and update nav behavior (#2253)
Co-authored-by: Joe Pea <trusktr@gmail.com>
Co-authored-by: Koy Zhuang <koy@ko8e24.top>
2023-11-30 13:11:21 +08:00
John Hildenbiddle
dac8e59bb7
Feat: Improved error handling and response status availability (#2303)
* Add response data to route object
* Display error status and description on content fetch error
* Fix issue where initial site render was incomplete on content fetch error
* Fix issue where empty markdown pages/routes were handled as 404 errors
* Fix incorrect `notFoundPage` default value
2023-11-17 07:27:09 -06:00
Joe Pea
7bbf13d9bd
Ensure code format (#2138)
* chore: add missing Vue support for Vercel builds

* refactor: move some functions and module-level state into classes as private methods and properties to start to encapsulate Docsify

Also some small tweaks:

- move initGlobalAPI out of Docsify.js to start to encapsulate Docsify
- move ajax to utils folder
- fix some type definitions and improve content in some JSDoc comments
- use concise class field syntax
- consolidate duplicate docsify-ignore comment removal code

This handles a task in [Simplify and modernize Docsify](https://github.com/docsifyjs/docsify/issues/2104), as well as works towards [Encapsulating Docsify](https://github.com/docsifyjs/docsify/issues/2135).

* chore: add prettier code format check to our lint script, and add a prettier script for manually formatting the whole code base

* chore: update issue/pr templates

* chore: apply our format to the whole code base


---------

Co-authored-by: Koy <koy@ko8e24.top>
Co-authored-by: i544693 <369491420@qq.com>
2023-08-09 17:53:30 +08:00
Lu Fei
6464cf533d
docs: fix missing references (#2163) 2023-08-08 00:20:23 +08:00
Koy
4c2e6304cb
update(doc): fix themeColor in configuration. (#2160) 2023-08-03 20:39:49 +08:00
Joe Pea
b18865d53b
Merge branch 'develop' into modernize-source-code 2023-07-16 10:30:01 -07:00
Joe Pea
dab6e1c1be
Merge branch 'develop' into update-routerMode-docs 2023-07-16 10:18:21 -07:00
Joe Pea
b621e0e4e7 chore: update miscellaneous parts of the source to reasonably modern language alternatives, remove polyfills, improve some JSDoc comments, remove traces of IE
BREAKING: In a minority of cases syntax updates may break apps running in very old browsers (such as Internet Explorer), or apps that build Docsify in a custom way with old build tools. To upgrade, build Docsify for older browsers in a custom way, or update existing build tools to handle newer syntax.

DEPRECATED: `$docsify.themeColor` is deprecated and will be eventually removed, use a `--theme-color` CSS variable in your style sheet.
2023-07-03 01:50:00 -07:00
Joe Pea
103dde845f Merge branch 'develop' into delete-ssr
* develop:
  feat: add google analytics gtag.js plugin (#1702)
  chore: bump conventional-changelog-cli from 2.2.2 to 3.0.0 (#2085)
2023-06-29 19:55:12 -07:00
Eko Zhan
29f3c82faa
feat: add google analytics gtag.js plugin (#1702)
Co-authored-by: Joe Pea <joe@trusktr.io>
Co-authored-by: 沈唁 <52o@qq52o.cn>
Co-authored-by: John Hildenbiddle <jhildenbiddle@users.noreply.github.com>
Co-authored-by: zhanzhao <zhanzhao@megvii.com>
2023-06-27 10:54:16 +08:00
Joe Pea
8d5d20480a refactor: delete the experimental and incomplete SSR feature
BREAKING: SSR removed

Anyone depending on SSR will need to stay on an old Docsify version for
now, move forward without SSR, or maintain SSR against a fork of updated
Docsify. We have ideas on a better way to implement SSR, but these ideas
have not been implemented yet.
2023-06-25 12:03:44 -07:00
James Henry
4b9b464cbf
chore: migrate from lerna bootstrap to npm workspaces (#2094)
* chore: migrate from lerna bootstrap to npm workspaces

---------

Co-authored-by: 沈唁 <52o@qq52o.cn>
Co-authored-by: Joe Pea <joe@trusktr.io>
2023-06-24 14:35:13 -07:00
Koy ['kɔɪ]
61c9e4baec
Merge branch 'develop' into update-routerMode-docs 2023-04-08 17:55:43 +08:00
Koy Zhuang
898e6eea7a
chore(docs): docsify-ignore config polish. (#1994) 2023-02-23 16:01:11 +08:00
Joe Pea
e07060ad14 add a note about making an alias for _sidebar.md when using routerMode: 'history' 2023-01-22 19:51:33 -08:00
Joe Pea
3feebc0be6 add notes on "hash" vs "history" routing in the config docs 2023-01-22 19:32:44 -08:00
Joe Pea
ef6905b53a
fix: fix cross-origin links in history router mode (#1967) 2023-01-23 01:54:30 +08:00
沈唁
509781036d
docs: Fix missing dolphin theme (#1960) 2023-01-10 16:02:02 +08:00
Andrew Blakey
f4cae7ff82
Describe ordering requirement for prism script tag (#1935)
I couldn't get a prism typescript language grammar to work until I realised that script order mattered.   

This might not be the best language or format for this, but I think it probably belongs in the documentation in some manner.

Thank you!
2022-12-12 15:07:41 +08:00
i544693
a6701d6d23 [build] 4.13.0 2022-10-26 21:45:48 +08:00
i544693
8fcd92baa3 [build] 4.12.4 2022-10-26 17:53:55 +08:00
i544693
7db2434a1a [build]: 4.12.3 2022-10-26 17:21:50 +08:00
Mike Mwanje
c98fda7ad6
docs: Update GitHub default branch from to 'main' (#1883) 2022-09-17 22:50:31 +08:00
John Hildenbiddle
19e40c2075
Docs: Fix plugin insertion order in docs (#1850) 2022-08-02 12:27:23 -05:00
Xavi Lee
fa14210e8e
docs: update the name for "Simplified Chinese" (#1811)
* update the name for "Simplified Chinese"

* update the name for "Simplified Chinese"

* update the name for "Simplified Chinese"
2022-06-03 13:29:52 +08:00
Roy Sommer
8cbc7c8073
Virtual Routes Support (#1799)
* add first test

* new VirtualRoutes mixin that handles routes. fetch tries to use VirtualRoutes. default config updated

* cover all basic use cases

* regex matching in routes

* covered all virtual routes tests

* added hack to fix config test on firefox

* removed formatting regex matches into string routes

* added support for "next" function

* added docs

* navigate now supports both hash and history routerModes

* waiting for networkidle in navigateToRoute helper

* promiseless implementation

* remove firefox workaround from catchPluginErrors test, since we no longer use promises

* updated docs

* updated docs for "alias" as well

* minor rephrasing

* removed non-legacy code from exact-match; updated navigateToRoute helper to infer router mode from page

* moved endsWith from router utils to general utils; added startsWith util; refactored makeExactMatcher to use both

* updated docs per feedback

* moved navigateToRoute helper into the virtual-routes test file

* moved navigateToRoute to top of file

* updated docs per pr comments
2022-05-23 14:03:33 -07:00
沈唁
2d13255acb
chore: update vercel logo (#1776)
* chore: update vercel logo

* chore: update vercel logo

* chore: remove vercel link form github pages

* chore: update style

* chore: update readme

* chore: update readme

* chore: update readme
2022-03-24 00:46:36 +08:00
沈唁
093d4a0081
chore: update vercel link (#1775)
* chore: update vercel link
2022-03-19 23:58:07 +08:00
John Hildenbiddle
9e6a3e677a
docs: Minor fixes to plugin docs (#1774) 2022-03-19 11:36:25 +08:00
John Hildenbiddle
6f4f09bd7e
docs: Update configuration options (#1773) 2022-03-18 10:52:29 -05:00
John Hildenbiddle
63b2535a45
feat: Plugin error handling (#1742) 2022-03-15 00:18:50 -05:00
John Hildenbiddle
ba5ee26f00
feat: Emoji build (#1766)
* Fix incorrect file name

* Improve build

- Display emoji API URL
- Display number of emoji entries retrieved from API
- Distinguish between creating and updating files
- Catch and display errors (gracefully fail for offline work)
- Add “DO NOT EDIT” comment to generated output

* Add emoji to automated build

* Remove emoji plugin from dev index.html
2022-03-08 16:22:10 +08:00
John Hildenbiddle
35002c92b7
feat: Native emoji w/ image-based fallbacks and improved parsing (#1746)
* Render native emoji with image fallback

Fix #779

* Deprecate emoji plugin

* Add emoji tests

* Remove console.log statement

* Fix emoji image alt attribute

* Set nativeEmoji to false by default (non-breaking)

* Fix parsing emoji in HTML comments and script tags

* Add nativeEmoji and update noEmoji details

* Add Emoji plugin deprecation notice

* Fix ESLint issues

* Create build:emoji task

- Auto-generate emoji data from GitHub API
- Auto-generate emoji markdown for website
- Add emoji page to navigation

* Fix rendering of GitHub emoji without unicode

* Adjust and match size of native and image emoji

* Update emoji test snapshot

* Update docs test snapshot

* Fix ci/codesandbox error

* Update native emoji font-stack

* Fix rendering of native multi-character emoji

* Kick GitHub Workflow

* Replace rollup’s uglify plugin with terser

* Switch “npm ci” instead of “npm i” for stability

* Change emoji data from default to named export

* Revert "Replace rollup’s uglify plugin with terser"

This reverts commit 7ba85136361c72839516900d91cca806fac94fee.

* Revert "Switch “npm ci” instead of “npm i” for stability"

This reverts commit d52b476a387250740d934e8fd7df7ba274dd17a0.

* Revert "Change emoji data from default to named export"

This reverts commit 3f2dd467cf9c7a74d8c53c2ee52cc63837b00a3c.

* Specify codesandbox template and node version

* Update codesandbox config

* Revert "Revert "Replace rollup’s uglify plugin with terser""

This reverts commit e06fed49f0383c485e01f1758228849ad0085bc8.

* Revert "Revert "Revert "Replace rollup’s uglify plugin with terser"""

This reverts commit 27d49521f61976dedcbbf210e1811839853e0e47.

* Update codesandbox config

* Revert "Update codesandbox config"

This reverts commit 5120dd23d45fbd4b2c893db33acbf7014e57c023.

* Fix codesandbox uglify error

* Emoji docs tweaks

* Restore and update emoji plugin code

* Restore and update emoji plugin docs

* Prettier updates

* Match lowercase shortcodes only

Co-authored-by: Koy Zhuang <369491420@qq.com>
2022-03-05 22:25:09 -06:00
John Hildenbiddle
fa6df6d584
fix: Legacy bugs (styles, site plugin error, and dev server error) (#1743)
* Add try/catch w/ error message to plugin calls

* Update lifecycle.js

* Update lifecycle.js

* Fix docsify-plugin-carbon error

* Fix ESLint errors

* Simplify conditional JS loading

* Fix styles in legacy browser w/o CSS var support

* Fix gitignore paths

* Fix BrowserSync IE error

* Fix search field presentation in IE11

- Removed fixed height and allow element to size naturally via font-size and padding
- Remove default "x" rendered on IE input fields

* Revert "Update lifecycle.js"

This reverts commit 2a58be69eb75a87b74d0408765e1d222282ac95b.

* Revert "Update lifecycle.js"

This reverts commit 67c5410b049237887811350f38e3f9bc8a2c78dc.

* Revert "Add try/catch w/ error message to plugin calls"

This reverts commit 631e9248786f87a5b2f7892fc73a53543744d288.

* Fix docsify-plugin-carbon error & ESLint errors

Co-authored-by: 沈唁 <52o@qq52o.cn>
2022-02-05 03:21:50 -06:00
沈唁
18cd18ce04
docs: update readme (#1740) 2022-02-02 17:50:20 +08:00
Joe Pea
47cb36e74d mention that SSR is experimental and incomplete, prevent people from using it thinking it is ready for prime time 2022-01-23 19:43:46 -08:00
i544693
e405120e08 [build] 4.12.2 2022-01-06 16:55:22 +08:00
Joe Pea
760e0c7983
docs: update noCompileLinks documentation (#1666)
Co-authored-by: 沈唁 <52o@qq52o.cn>
2021-11-19 17:19:45 +08:00