My second post
This is my second post
David Acevedo
Oct 11, 2025
June 15, 2025
En este archivo escribiré todos los pendientes de la web
Definir si:
H2O
X2
Por ahora veo mas optimo hacerlo por base de datos y simplemente modificar los componentes con CSS manteniendo los estilos de la pagina principal
- Es mas sencillo archivos md que mdx
Definir si será en este mismo proyecto u otro
Revisar proyecto que esta realizando MiduDev para tener en cuenta de que manera hace el login del proyecto de Ibai
My current configuration for this markup content is:
import { unified } from "unified";
import remarkParse from "remark-parse";
import remarkGfm from "remark-gfm";
import remarkDeflist from "remark-deflist";
import remarkBreaks from "remark-breaks";
import remarkCallout from "@r4ai/remark-callout";
import remarkSmartypants from "remark-smartypants";
import { remarkMark } from "remark-mark-highlight";
import remarkSupersub from "remark-supersub";
import remarkEmoji from "remark-emoji";
import remarkHeadingId from "remark-heading-id";
import remarkRehype from "remark-rehype";
import rehypeRaw from "rehype-raw";
import rehypeAutolinkHeadings from "rehype-autolink-headings";
import rehypePrettyCode from "rehype-pretty-code";
import rehypeSanitize, { defaultSchema } from "rehype-sanitize";
import rehypeStringify from "rehype-stringify";
type MdOptions = {
headingLinkClass?: string;
shikiTheme?: string;
};
export async function markdownToHtml(markdown: string, opts: MdOptions = {}) {
const processor = unified()
.use(remarkParse)
.use(remarkGfm, { singleTilde: false })
.use(remarkDeflist)
.use(remarkBreaks)
.use(remarkCallout)
.use(remarkSmartypants)
.use(remarkMark)
.use(remarkSupersub)
.use(remarkEmoji, { emoticon: false })
.use(remarkHeadingId)
.use(remarkRehype, { allowDangerousHtml: true, clobberPrefix: "" })
.use(rehypeRaw)
.use(rehypeAutolinkHeadings, {
behavior: "append",
properties: {
class: opts.headingLinkClass ?? "heading-anchor",
ariaHidden: "true",
tabIndex: -1
},
content: { type: "text", value: " #" }
})
.use(rehypePrettyCode as any, {
theme: opts.shikiTheme ?? "github-dark",
keepBackground: false,
})
.use(rehypeSanitize, {
...defaultSchema,
clobberPrefix: "",
tagNames: [
...(defaultSchema.tagNames || []),
"mark", "details", "summary", "br"
],
attributes: {
...defaultSchema.attributes,
"*": [
...(defaultSchema.attributes?.["*"] || []),
"className", "data*", "style"
],
code: [...(defaultSchema.attributes?.code || []), ["className"], ["data-line-numbers"]],
pre: [...(defaultSchema.attributes?.pre || []), ["className"], ["data-theme"]],
span: [...(defaultSchema.attributes?.span || []), ["className"], ["style"]],
a: [...(defaultSchema.attributes?.a || []), ["className"], ["rel"], ["target"]],
mark: [...(defaultSchema.attributes?.mark || []), ["className"]],
sup: [...(defaultSchema.attributes?.sup || [])],
sub: [...(defaultSchema.attributes?.sub || [])],
dl: [...(defaultSchema.attributes?.dl || [])],
dt: [...(defaultSchema.attributes?.dt || [])],
dd: [...(defaultSchema.attributes?.dd || [])],
div: [
...(defaultSchema.attributes?.div || []),
["className"], ["role"],
["data-callout"], ["data-callout-type"], ["data-callout-title"], ["data-callout-body"]
],
},
})
.use(rehypeStringify);
const file = await processor.process(markdown ?? "");
return String(file);
}
| Syntax | Description | Test Text |
|---|---|---|
| Header | Title | Here’s this |
| Paragraph | Text | And more |
X2
This is the first sentence of my indented paragraph.
This text is red!
⚠️ Warning: Do not push the big red button.
📝 Note: Sunrises are beautiful.
💡 Tip: Remember to appreciate the little things in life.
Viendo como funciona el texto marcado Marked text agregandole mas texto a los lados. A una sola linea todo funciona bien, miremos como funciona a dos lineas
No presiones el botón rojo.
Se guardó correctamente.
Se guardó correctamente.
Este es un callout plegable.
Puedes abrirlo o cerrarlo haciendo clic en el título.
Este es un callout plegable.
Puedes abrirlo o cerrarlo haciendo clic en el título.
Se guardó correctamente.
Se guardó correctamente.
Se guardó correctamente.
Se guardó correctamente.
Se guardó correctamente.
Se guardó correctamente.
Se guardó correctamente.
Explore this latest article: a concise, practical read where I share ideas, techniques, and lessons about web development and design, with real examples and actionable tips to help improve your projects.