Lemmydocs 7:4 – Thou shall create a blog

Features

  • Linked to a user using Lemmy’s API, no authentication
  • Host content on any instance
  • Category filters: Set one or more community as the categories
  • Easy to adapt to your profile
  • One page constraint
  • Anchor navigation and permalinks
  • Responsive
  • Dark / Light mode
  • No cookies or tracking
  • Interactive “about me”
  • No backend: serving a single lightweight page that can be hosted anywhere, including GitHub
  • HTML, CSS and ES6 JavaScript. That’s it.

TODO

  • Possible compatibility issues with older iOS devices. Let me know if you encounter an issue! I’ll be cleaning up the code in the meantime.
  • The only class not written by me is the markdown-html translation layer for which I’m using snarkdown. It does so using regex queries. As to not completely re-invent the wheel I’ve forked it for this purpose, but I’d like to write one myself.

GitHub | ./Martijn.sh > Blog

  • @onlinepersona@programming.dev
    link
    fedilink
    English
    0
    edit-2
    11 days ago

    A blog entry on how it works and what it does at a high level could be nice. I’m not sure what I’m looking at, but there must be some API call to Lemmy and it’s probably happening on the server due to CORS; not sure how this would work just in the browser if the Lemmy instance has CORS setup…

    Edit: OK the instance 0d.gs does in fact not have CORS 😮 That’s a little concerning…

    Hold up, neither does programming.dev? Uh… @recursive_recursion@programming.dev and @Ategon@programming.dev is that safe? I’m not a security expert but doesn’t this allow for cross site attacks?

    Anti Commercial-AI license

    • @kernelle@0d.gsOP
      link
      fedilink
      English
      011 days ago

      I’ve noticed that a more detailed writeup is warranted! So I’ll be working on that.

      CORS is enabled on lemmy, you have to send the ‘Origin’ header in order to get the Access-Control headers. Which allows cross-origin for simple requests. No added headers, cookies or other data. So all API calls are made in JS by your browser.