June 15, 2025

Cosas pendientes

En este archivo escribiré todos los pendientes de la web

CSS Definition
Post cover image Post cover image backdrop

Pendientes para la pagina

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);
}
SyntaxDescriptionTest Text
HeaderTitleHere’s this
ParagraphTextAnd more

Another title #

First Term
This is the definition of the first term.
Second Term
This is one definition of the second term.
This is another definition of the second term.
First Term
This is the definition of the first term.
Second Term
This is one definition of the second term.
This is another definition of the second term.

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.

  1. First item
  2. Second item
  3. Third item
    1. Indented item
    2. Indented item
  4. Fourth item

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

Warning!

No presiones el botón rojo.

Success!

Se guardó correctamente.

Info!

Se guardó correctamente.

This is desplegable note

Este es un callout plegable.
Puedes abrirlo o cerrarlo haciendo clic en el título.

This is a Note

Este es un callout plegable.
Puedes abrirlo o cerrarlo haciendo clic en el título.

Tip!

Se guardó correctamente.

Danger!

Se guardó correctamente.

Error!

Se guardó correctamente.

Quote!

Se guardó correctamente.

Example!

Se guardó correctamente.

Bug!

Se guardó correctamente.

Todo!

Se guardó correctamente.

Subscribe to our newsletter

Join the newsletter and receive advanced tutorials, best practices, and the tools every developer should know. Straight to your inbox, zero spam.

Blog post

Latest article

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.

Post image cover

My second post

This is my second post

Post image cover

My first post

This is the first post of my blog

Post image cover

My third post

This is my third post to test the blog main page with many posts