Coder Social home page Coder Social logo

alifeee / blog Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 114.35 MB

HTML blog

Home Page: https://blog.alifeee.co.uk/

Jupyter Notebook 95.07% HTML 2.96% CSS 0.21% Python 0.50% JavaScript 1.14% XSLT 0.10% Shell 0.02%
alpinejs giscus zero-md anchorjs blog google-fonts

blog's Introduction

alifeee's blog

This repo contains blog stuff that I write, as well as any code used to generate it. It can be found on blog.alifeee.co.uk

Markdown

Markdown parsing is done client side using zero-md. This is to avoid using a build step.

<head>
    ...
  <script
    type="module"
    src="../zero-md.js"
  ></script>
  ...
</head>
<body>
  ...
  <zero-md src="/example.md"></zero-md>
  ...
</body>

RSS Feed

An RSS feed is generated using Python via workflow. You can find (and subscribe to it) here: https://blog.alifeee.co.uk/feed.xml.

Similar posts

After every blog post there are a few "similar posts". The HTML for this section is automatically generated by the similar_posts.yml workflow using the embeddings.py Python script. The way this is done is inspired by Tom Hazledine's post: TomBot2000: automatically generating related posts using LLMs. It uses OpenAI to generate a text embedding for each post and ranks them by similarity. The recommendations should update as new blog posts are posted.

Screenshot of website section, "similar posts", showing a couple of example posts.

blog's People

Contributors

alifeee avatar

Watchers

 avatar

blog's Issues

redo footer

it is outdated

image

however, I should probably wait for #30 to be complete as it will be easier then than changing all 10 html files

add length preview

On some blogging sites, there is a preview, something like

248 words, 8 minutes

see, e.g., Medium

image

It would be neat to have something like this on here

remove data-loading="lazy" from giscus

I did this in ccce06c but it may not be done for new blogs. Maybe come up with a way of ensuring this script is the same in all pages that include it

...(uh oh, this is starting to look like it would be improved with templates...)

make external links target="blank"

if a link does not go to my site (blog.alifeee.co.uk), it should have target="_blank". I think this is the standard.

This would involve adding a rule to the Markdown parser to add target="_blank" if the base URL did not match my blog.

Probably should wait until #30 is done to be easier

add AnchorJS

Currently, this must be done by adding the no-shadow tag to the <zero-md> elements. This is a bit sad, I like shadow DOM.

However, there doesn't seem to currently be a better way.

However however, disabling the shadow dom at the moment would anchor links (as per zerodevx/zero-md#82). So once that is closed, I can implement this using light-dom.

comments don't load sometimes

don't know why. seems random. quite hard to replicate

On Firefox, keep refreshing. Opening in private tab might help.

Sometimes they load

image

Sometimes they do not

image

add RSS feed

add manual RSS feed

maybe make a Python script to generate it (which runs on push to main?)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.