Skip to content

Commit

Permalink
remove markdown component
Browse files Browse the repository at this point in the history
  • Loading branch information
Jutanium committed Nov 15, 2021
1 parent c40cef6 commit 3dc2f19
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 128 deletions.
5 changes: 0 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,7 @@
"@solid-primitives/throttle": "^1.0.3",
"@solid.js/docs": "^1.0.3",
"fuse.js": "^6.4.6",
"markdown-it-prism": "^2.1.7",
"monaco-editor": "^0.25.2",
"prism-themes": "^1.9.0",
"prismjs": "^1.25.0",
"scroll-behavior-polyfill": "^2.0.13",
"solid-app-router": "^0.1.11",
"solid-dismiss": "^1.0.22",
Expand All @@ -54,8 +51,6 @@
"got": "^11.8.2",
"htmlnano": "^1.1.1",
"jiti": "^1.12.9",
"markdown-it": "^12.2.0",
"markdown-it-anchor": "^8.3.1",
"npm-run-all": "^4.1.5",
"patch-package": "^6.4.7",
"postcss": "^8.3.6",
Expand Down
3 changes: 3 additions & 0 deletions public/articles/welcome-to-the-solid-blog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
Hello and welcome to our new blog platform!


# Test Header
## Test Second Level Header
SolidJS is a community built on strong communication and teamwork. It's only right that we have a blog for our growing community that helps with sharing announcements, publish recent ideas and even bring valuable insights and learnings from the broader community.

Ryan and other members will continue publishing articles you've come to love about SolidJS and broader research via dev.to, Medium and other outlets. We'll frequently link to them here and make you aware of the latest so you can keep coming to this blog for the absolute latest.
Expand Down
58 changes: 0 additions & 58 deletions src/components/Markdown.tsx

This file was deleted.

12 changes: 7 additions & 5 deletions src/pages/Tutorial.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ import { useData, NavLink } from 'solid-app-router';
import { Icon } from '@amoutonbrady/solid-heroicons';
import { arrowLeft, arrowRight, chevronDown } from '@amoutonbrady/solid-heroicons/solid';

import Markdown from '../components/Markdown';
import { compiler, formatter } from '../components/setupRepl';
import type { TutorialDirectory, TutorialDirectoryItem, TutorialRouteData } from './Tutorial.data';
import { useI18n } from '@solid-primitives/i18n';
import Dismiss from 'solid-dismiss';
import { useRouteReadyState } from '../utils/routeReadyState';
import SolidMarkdown from 'solid-markdown';

const alphabet = 'abcdefghijklmnopqrstuvwxyz'.split('');

Expand Down Expand Up @@ -166,7 +166,7 @@ const Tutorial: Component = () => {
useRouteReadyState();

createEffect(() => {
markDownRef.scrollTop = 0;
// markDownRef.scrollTop = 0;
replEditor && replEditor.setScrollPosition({ scrollTop: 0 });
const fileset = data.solved ? data.solvedJs : data.js;
const files = fileset?.files;
Expand Down Expand Up @@ -194,9 +194,11 @@ const Tutorial: Component = () => {
<div class="flex flex-col bg-gray-50 h-full overflow-hidden border-r-2 border-grey mb-10 md:mb-0">
<DirectoryMenu current={data.tutorialDirectoryEntry} directory={data.tutorialDirectory} />

<Markdown ref={markDownRef} class="p-10 flex-1 max-w-full overflow-auto">
{data.markdown || ''}
</Markdown>
<div ref={markDownRef} class="p-10 prose flex-1 max-w-full overflow-auto">
<SolidMarkdown>
{data.markdown || ''}
</SolidMarkdown>
</div>

<div class="py-4 px-10 flex items-center justify-between border-t-2">
<Show
Expand Down
4 changes: 0 additions & 4 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ export default defineConfig({
assetsInclude: ['**/*.md'],
optimizeDeps: {
include: [
'prismjs/components/prism-typescript',
'prismjs/components/prism-jsx',
'prismjs/components/prism-json',
'prismjs/components/prism-bash',
],
exclude: ['@solid.js/docs'],
},
Expand Down
57 changes: 1 addition & 56 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1315,11 +1315,6 @@ argparse@^1.0.7:
dependencies:
sprintf-js "~1.0.2"

argparse@^2.0.1:
version "2.0.1"
resolved "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz"
integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==

array-equal@^1.0.0:
version "1.0.0"
resolved "https://registry.npmjs.org/array-equal/-/array-equal-1.0.0.tgz"
Expand Down Expand Up @@ -2102,11 +2097,6 @@ entities@^3.0.1:
resolved "https://registry.npmjs.org/entities/-/entities-3.0.1.tgz"
integrity sha512-WiyBqoomrwMdFG1e0kqvASYfnlb0lp8M5o5Fw2OFq1hNZxxcNk8Ik0Xm7LxzBhuidnZB/UtBqVCgUz3kBOP51Q==

entities@~2.1.0:
version "2.1.0"
resolved "https://registry.npmjs.org/entities/-/entities-2.1.0.tgz"
integrity sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w==

error-ex@^1.3.1:
version "1.3.2"
resolved "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz"
Expand Down Expand Up @@ -3203,13 +3193,6 @@ lines-and-columns@^1.1.6:
resolved "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz"
integrity sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=

linkify-it@^3.0.1:
version "3.0.3"
resolved "https://registry.npmjs.org/linkify-it/-/linkify-it-3.0.3.tgz"
integrity sha512-ynTsyrFSdE5oZ/O9GEf00kPngmOfVwazR5GKDq6EYfhlpFug3J2zybX56a2PRRpc9P+FuSoGNAwjlbDs9jJBPQ==
dependencies:
uc.micro "^1.0.1"

load-json-file@^4.0.0:
version "4.0.0"
resolved "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz"
Expand Down Expand Up @@ -3289,29 +3272,6 @@ magic-string@^0.25.0, magic-string@^0.25.7:
dependencies:
sourcemap-codec "^1.4.4"

markdown-it-anchor@^8.3.1:
version "8.4.1"
resolved "https://registry.npmjs.org/markdown-it-anchor/-/markdown-it-anchor-8.4.1.tgz"
integrity sha512-sLODeRetZ/61KkKLJElaU3NuU2z7MhXf12Ml1WJMSdwpngeofneCRF+JBbat8HiSqhniOMuTemXMrsI7hA6XyA==

markdown-it-prism@^2.1.7:
version "2.2.1"
resolved "https://registry.npmjs.org/markdown-it-prism/-/markdown-it-prism-2.2.1.tgz"
integrity sha512-Lo7nQxI+x+MXQkeEXVNIer7fWCGasuEEMxYU63HJCxZNF8bfzWrXDHGsxv0a/qD3mL4sYHj0jUFT0h4fG8WQVw==
dependencies:
prismjs "1.25.0"

markdown-it@^12.2.0:
version "12.2.0"
resolved "https://registry.npmjs.org/markdown-it/-/markdown-it-12.2.0.tgz"
integrity sha512-Wjws+uCrVQRqOoJvze4HCqkKl1AsSh95iFAeQDwnyfxM09divCBSXlDR1uTvyUP3Grzpn4Ru8GeCxYPM8vkCQg==
dependencies:
argparse "^2.0.1"
entities "~2.1.0"
linkify-it "^3.0.1"
mdurl "^1.0.1"
uc.micro "^1.0.5"

markdown-table@^3.0.0:
version "3.0.1"
resolved "https://registry.yarnpkg.com/markdown-table/-/markdown-table-3.0.1.tgz#88c48957aaf2a8014ccb2ba026776a1d736fe3dc"
Expand Down Expand Up @@ -3447,7 +3407,7 @@ mdn-data@2.0.14:
resolved "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.14.tgz"
integrity sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==

mdurl@^1.0.0, mdurl@^1.0.1:
mdurl@^1.0.0:
version "1.0.1"
resolved "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz"
integrity sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4=
Expand Down Expand Up @@ -4497,16 +4457,6 @@ pretty-hrtime@^1.0.3:
resolved "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz"
integrity sha1-t+PqQkNaTJsnWdmeDyAesZWALuE=

prism-themes@^1.9.0:
version "1.9.0"
resolved "https://registry.yarnpkg.com/prism-themes/-/prism-themes-1.9.0.tgz#19c034f3205f1e28d75d89728e54ccd745f7e3dd"
integrity sha512-tX2AYsehKDw1EORwBps+WhBFKc2kxfoFpQAjxBndbZKr4fRmMkv47XN0BghC/K1qwodB1otbe4oF23vUTFDokw==

prismjs@1.25.0, prismjs@^1.25.0:
version "1.25.0"
resolved "https://registry.npmjs.org/prismjs/-/prismjs-1.25.0.tgz"
integrity sha512-WCjJHl1KEWbnkQom1+SzftbtXMKQoezOCYs5rECqMN+jP+apI7ftoflyqigqzopSO3hMhTEb0mFClA8lkolgEg==

property-information@^6.0.1:
version "6.0.1"
resolved "https://registry.yarnpkg.com/property-information/-/property-information-6.0.1.tgz#7c668d9f2b9cb63bc3e105d8b8dfee7221a17800"
Expand Down Expand Up @@ -5430,11 +5380,6 @@ typescript@^4.4.4:
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.4.4.tgz#2cd01a1a1f160704d3101fd5a58ff0f9fcb8030c"
integrity sha512-DqGhF5IKoBl8WNf8C1gu8q0xZSInh9j1kJJMqT3a94w1JzVaBU4EXOSMrz9yDqMT0xt3selp83fuFMQ0uzv6qA==

uc.micro@^1.0.1, uc.micro@^1.0.5:
version "1.0.6"
resolved "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz"
integrity sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==

unbox-primitive@^1.0.1:
version "1.0.1"
resolved "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz"
Expand Down

0 comments on commit 3dc2f19

Please # to comment.