texme
blog.johnnyreilly.com
Our great sponsors
texme | blog.johnnyreilly.com | |
---|---|---|
13 | 22 | |
2,254 | 34 | |
- | - | |
0.0 | 9.5 | |
9 months ago | 3 days ago | |
JavaScript | TypeScript | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
texme
-
What software do you use to make documents without resorting to Microsoft word?
It probably won't cover needs of "make documents at our office" but I'd like to mention https://github.com/susam/texme. Basically you prepend your markdown file with a line of HTML/Javascript, rename it to HTML and it'll render pretty in a webbrowser.
-
Reasons you aren't updating your personal site (2020)
This is nice. We are website-mates. My website is also 2001-2022. I like the simple and serif font on your website.
I had thrown in your https://github.com/susam/texme few times to quickly send Markdown files for reading. :-)
-
Is it ever possible to have LaTex Equations capabilities in Markdown?
By default vs code has latex on md. Also https://github.com/susam/texme
-
Favorite self-rendering Markdown tool in JavaScript
So the Markdown to HTML rendering happens as page load time.
This would hopefully allow me to forego the static .md -> .html step I use for building my sites.
I found one called 'texme' here: https://github.com/susam/texme
Do you use or have written a similar tool?
- Convert latex notation to ready to be embedded Markdown
- Show HN: Notes.cx – A simple, anonymous online notepad \w Markdown support
-
Show HN: TeXMe Demo: Self-Rendering Markdown (GFM) + LaTeX (MathJax) Document
Does the Self-Hosting heading not answer that objection?
https://github.com/susam/texme#self-hosting-texme
- TeXMe 1.0.0 Released. Now supports tables, task lists, strikethrough, autolinks, etc. via GFM
-
Why I’m Losing Trust in Open Source
> Open source maintainers abandoning projects due to lack of time and interest.
And the occasional demanding users who would rather have us working on their problems instead of our own.
Only about a couple of hours ago, I received an issue[1] on one of my projects suggesting I fix an issue which from my perspective appeared to be a lack of understanding of the documentation I have provided with the project. Unclear issue details and demanding behaviour can take a toll on a maintainer's morale.
[1] https://github.com/susam/texme/issues/21
- "I am not making any decision for you. This is a free and open source project."
blog.johnnyreilly.com
-
Migrating Azure Functions from JSDoc JavaScript to TypeScript
All of these affordances are available to me with TypeScript, and I want to keep them. Let's begin migrating. Incidentally, the code for this migration lies in this PR.
-
Playwright, GitHub Actions and Azure Static Web Apps staging environments
I'm going to write about this in the context of my blog. My blog is open source and you can find the code here. I'm going to present a simplified solution in this post, but you can find the full solution on GitHub.
-
Migrating from ts-node to Bun
These scripts are implemented as a simple ts-node console app. For historical reasons it's called trim-xml (it originally just truncated the sitemap.xml file). It's not a particularly good name but I'm not going to change it now. As the blog is open source, you can see the [code of trim-xml here](https://github.com/johnnyreilly/blog.johnnyreilly.com/tree/main/trim-xml].
-
Docusaurus blogs: adding breadcrumb Structured Data
I'm somewhat on the fence as to whether it's useful to have a breadcrumb for each tag. In fact, originally I didn't have it when I first added support. But I've added it in as it's not a lot of work and it's not a lot of code. I'm not sure if it's useful or not. I've added it now; I'm going to leave it in in place for a bit and see how it goes.
-
Serving Docusaurus images with Cloudinary
You will also need to disable the url-loader in your Docusaurus build which transforms images into base64 strings, as this will conflict with the plugin. There isn't a first class way to do this in Docusaurus at present. However by setting the environment variable WEBPACK_URL_LOADER_LIMIT to 0 you can disable it. You can see an implementation example in this pull request. It amounts to adding the cross-env package and then adding the following to your package.json:
//@ts-check const visit = require('unist-util-visit'); /** * Create a remark plugin that will replace image URLs with Cloudinary URLs * @param {*} options cloudName your Cloudinary’s cloud name eg demo, baseUrl the base URL of your website eg https://blog.johnnyreilly.com - should not include a trailing slash, will likely be the same as the config.url in your docusaurus.config.js * @returns remark plugin that will replace image URLs with Cloudinary URLs */ function imageCloudinaryRemarkPluginFactory( /** @type {{ cloudName: string; baseUrl: string }} */ options ) { const { cloudName, baseUrl } = options; const srcRegex = / src={(.*)}/; /** @type {import('unified').Plugin<[], import('hast').Root>} */ return function imageCloudinaryRemarkPlugin() { return (tree) => { visit(tree, ['element', 'jsx'], (node) => { if (node.type === 'element' && node['tagName'] === 'img') { // handles nodes like this: // { // type: 'element', // tagName: 'img', // properties: { // src: 'https://some.website.com/cat.gif', // alt: null // }, // ... // } const url = node['properties'].src; node[ 'properties' ].src = `https://res.cloudinary.com/${cloudName}/image/fetch/${url}`; } else if (node.type === 'jsx' && node['value']?.includes('')) { // handles nodes like this: // { // type: 'jsx', // value: '' // } const match = node['value'].match(srcRegex); if (match) { const urlOrRequire = match[1]; node['value'] = node['value'].replace( srcRegex, ` src={${`\`https://res.cloudinary.com/${cloudName}/image/fetch/${baseUrl}\$\{${urlOrRequire}\}\``}}` ); } } }); }; }; } module.exports = imageCloudinaryRemarkPluginFactory;
-
How I Ruined My SEO
yeah I'm hoping that my redirect story is now quite good - see dynamic redirect code here:
https://github.com/johnnyreilly/blog.johnnyreilly.com/blob/m...
as to the duplicate content, Docusaurus generates /tags/ and /pages/ content by default that I strip from from my sitemap manually.
-
How I ruined my SEO
I started using fontaine on my blog. If you haven't tried it out, you can find it here. It helps reduce Cumulative Layout Shift. The flash of unstyled content jank that you can see when you first land on a site, before fonts have loaded. I can't see why that would be an issue. It should improve my blogs Core Web Vitals and help stuff rank better, not worse. I think this is a red herring.
client side redirects boom * https://github.com/johnnyreilly/blog.johnnyreilly.com/commit/e641431314c4b6a19d375f1c7bc14f5bd6456ec9 november feedback loop
-
Using Application Insights with Bicep to monitor Azure Static Web Apps and Azure Functions
param location string param branch string param staticWebAppName string param tags object @secure() param repositoryToken string param rootCustomDomainName string param blogCustomDomainName string param appInsightsId string param appInsightsInstrumentationKey string param appInsightsConnectionString string var tagsWithHiddenLinks = union({ 'hidden-link: /app-insights-resource-id': appInsightsId 'hidden-link: /app-insights-instrumentation-key': appInsightsInstrumentationKey 'hidden-link: /app-insights-conn-string': appInsightsConnectionString }, tags) resource staticWebApp 'Microsoft.Web/staticSites@2022-03-01' = { name: staticWebAppName location: location tags: tagsWithHiddenLinks sku: { name: 'Free' tier: 'Free' } properties: { repositoryUrl: 'https://github.com/johnnyreilly/blog.johnnyreilly.com' repositoryToken: repositoryToken branch: branch provider: 'GitHub' stagingEnvironmentPolicy: 'Enabled' allowConfigFileUpdates: true buildProperties:{ skipGithubActionWorkflowGeneration: true } } } resource staticWebAppAppSettings 'Microsoft.Web/staticSites/config@2022-03-01' = { name: 'appsettings' kind: 'string' parent: staticWebApp properties: { APPINSIGHTS_INSTRUMENTATIONKEY: appInsightsInstrumentationKey APPLICATIONINSIGHTS_CONNECTION_STRING: appInsightsConnectionString } } resource staticWebAppFunctionAppSettings 'Microsoft.Web/staticSites/config@2022-03-01' = { name: 'functionappsettings' kind: 'string' parent: staticWebApp properties: { APPINSIGHTS_INSTRUMENTATIONKEY: appInsightsInstrumentationKey APPLICATIONINSIGHTS_CONNECTION_STRING: appInsightsConnectionString } } resource rootCustomDomain 'Microsoft.Web/staticSites/customDomains@2022-03-01' = { parent: staticWebApp name: rootCustomDomainName properties: {} } resource blogCustomDomain 'Microsoft.Web/staticSites/customDomains@2022-03-01' = { parent: staticWebApp name: blogCustomDomainName properties: {} } output staticWebAppDefaultHostName string = staticWebApp.properties.defaultHostname output staticWebAppId string = staticWebApp.id output staticWebAppName string = staticWebApp.name
What are some alternatives?
react-mathjax - React component to display math formulas
Docusaurus - Easy to maintain open source documentation websites.
grip - Preview GitHub README.md files locally before committing them.
Oryx - Build your repo automatically.
zero-md - Ridiculously simple zero-config markdown displayer
notes - Collection of my byte sized notes on programming and other random topics.
github-markdown-css - The minimal amount of CSS to replicate the GitHub Markdown style
fontaine - Automatic font fallback based on font metrics [Moved to: https://github.com/danielroe/fontaine]
sicp - XML sources of SICP and SICP JS, and support for generating Interactive SICP JS, PDF, e-book and comparison editions
susam.net - Source code of https://susam.net/
MathJax - Beautiful and accessible math in all browsers
fontaine - Automatic font fallback based on font metrics [Moved to: https://github.com/unjs/fontaine]