GithubHelp home page GithubHelp logo

hikerpig / foam-template-gatsby-kb Goto Github PK

View Code? Open in Web Editor NEW
60.0 5.0 12.0 26.3 MB

A Foam/Obsidian template using gatsby-theme-kb for publishing your knowledge base

Home Page: https://foam-template-gatsby-kb.hikerpig.vercel.app

JavaScript 88.77% CSS 11.23%
gatsby documentation obsidian-publish knowledge-graph

foam-template-gatsby-kb's Issues

Documents other than notes displaying on the table of contents?

Hi!

I wonder if there would be any way to display documents linked (like pdfs) on the left hand side table of contents and not just the md files.

Knowledge_Base___My_Brain

I don't know if this is doable, but it would be great! ๐Ÿ˜„

(mmm... I now realise mongodb-cheatsheet is not displaying there either... ๐Ÿค” . Need to check that)

Issues with links with alternative title when deploying to GitHub pages

Hello!

I'm using this theme to render some notes, and I noticed a weird behaviour when I deployed the page using GitHub pages.

When using wikilinks with an alternative name, like this:

text that references [[pagetitle|a name]]

The page link is correctly handled in Visual Studio, but there are some issues on the deployed website:

  1. the alternative name is ignored, and the link text is the whole wikilink text;
  2. the linked page always refers the root folder, even if the link refers to a subfolder;
  3. the graph does not show the correct references.

If I don't use the alternative name, everything works well.

Here's a real example:

Under the /azure folder I have several documents. In particular, I have azure-storage-redundancy-types.md, azure-virtual-machines.md, and azure-availability-zones.md.

Wrong link generation

The first page references the other two like this:

ZRS replicates your Azure Storage data **synchronously** across **three [[azure-availability-zones|availability zones]] in the primary region**.

and

When creating a storage account, you must select the primary region. The paired secondary region is assigned automatically, based on [[azure-region-pairs]], and cannot be changed.

The VSCode extension generates the following links:

[//begin]: # "Autogenerated link references for markdown compatibility"
[azure-availability-zones|availability zones]: azure-availability-zones "Azure Availability Zones"
[azure-region-pairs]: azure-region-pairs "Azure Region Pairs"
[//end]: # "Autogenerated link references"

Notice that the title of the "Availability zone" link is wrong: it should be "availability zones", not "Azure Availability Zones".

The markdown preview on VSCode is correct:

image

while the link on the deployed site uses the wrong title:

image

Wrong link destination

Clicking on the link, you get redirected to a page on the root folder (that does not exist) instead of the correct one under /azure.

Graph

By looking at the graph generated on VSCode, we can see 1 inbound link and 2 outbound links:

image

While on the deployed site, we have only 1 outbound link:

image

Code blocks and syntax highlight

I'm not sure this happens only with your template, but the first line of code blocks gets a ยฝ character indentation, so for this snippet, for example:

```sql
ALTER ROLE <username> SET client_encoding TO 'utf8';
ALTER ROLE <username> SET default_transaction_isolation TO 'read committed';
ALTER ROLE <username> SET timezone TO 'UTC';
``` (need to write this so the code doesn't render in the issue and shows what I use in the md file, please disregard)

I get this result:

Screenshot 2021-02-20 at 18 08 32

You can see that the first line gets a ยฝ character indentation. Strange!

Also, I don't get any syntax coloring for my code snippets, regardless of the language I pick.

Include mermaid diagrams

Add mermaid rendering.

When a user adds a mermaid block like

sequenceDiagram
    Alice->>John: Hello John, how are you?
    John-->>Alice: Great!
    Alice-)John: See you later!

The diagram should be rendered automatically.

Links reload page since changes from 02/21

I don't know what changed in the latest version from February 13th but now all the wikilinks result in a reload.

Additionally, all backlinks are broken and they show multiple times.

I updated package.json and gatsby-config to the latest version, by the way.

I'm not sure how to sort this.

fails to render relative wikilinks

I have a directory structure that looks something like this

  • dir1
    • sub_dir1
      • notes.md
    • intro.md
  • dir2
    ... and so on

intro.md has a wiki link to notes.md. Foam creates a relative backlink on the markdown page

[//begin]: # "Autogenerated link references for markdown compatibility"
[notes]: <sub_dir1/notes.md> "Notes"
[//end]: # "Autogenerated link references"

This works fine in vscode but the generated pages fails to understand the relative backlinks.

Where to put CNAME in Gastby structure?

Quick answer: point 4 below

Thanks for this theme, it works lovely even for people like myself who don't know Gatsby at all.

I had issues that my custom domain was deleted upon every commit. I had to search and play around a little, but here's the solution in case anybody runs into the same issue (which is probably perfectly logical to people who know Gatsby):

  1. When you create your custom domain, Github actually saves that as a textfile called "CNAME" in the root of your page, which in our case is the root of the "gh-pages" branch of your repository.
  2. This file is deleted every time the page is rebuilt, so upon every commit.
  3. You can place such static components in a folder called "static" in any Gatsby project. In our case, though, the folder structure is a little different.
  4. The correct location is to place your textfile CNAME in your master branch where the markdown files are, in the folder _layouts/static/CNAME (you'll have to create "static" and the CNAME file, containing ONLY your domain name, e.g. in my case marc.chehab.ch)

Just in case this helps anybody else. (Quite verbose description to make sure even people who don't know / care about Gatsby follow.)

Thanks again for this wonderful theme and kind regards from Zurich!

Marc

Package.json update needed

Hi, first thank you for making this awesome template!

I've been trying to setup the blog, but I've been getting build error.

error /vercel/path0/_layouts/node_modules/lmdb-store: Command failed.

image

The first thing I've tried was removing the yarn.lock file, and it seemed to work.

But my site started breaking down.

  1. Dark mode isn't working

image

  1. It seems like db has some sort of issue. Cannot see the category.
    image

My solution was specifying the node version in package.json like this. It seems like the project is only compatible with node version 16.12.0.

{
  "name": "foam-template-gatsby-kb",
  "version": "1.0.0",
  "description": "A foam template using gatsby-theme-kb for publishing you knowledge base",
  "engines": {
    "node": "<=16.12.0"
  },

It would be nice to have update in the README file or update in package.json file.

Show tags for every page

We can assign tags for every bubble.

It would be useful to see those tags on the GitHub rendered page.

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.