NISHIO Hirokazu[English][日本語]

Static generation in Quartz from Markdown and serve in Github Pages

from [/villagepump/Markdown to generate static in Quartz and serve in Github Pages](https://scrapbox.io/villagepump/Markdown to generate static in Quartz and serve in Github Pages) 2023-11-30

gpt.iconThe following is a summary

Generate a static site from Markdown and host it on GitHub Pages

. Conversion and Generation

Issues and Responses: 1.

  • Correction of original data and Markdown structure.
  • Wikilinks support and plugin adjustments.
  • Eliminated shortcomings of Quartz's Explorer plugin (bloated page link issue).

Deploy: 1.

  • Deploy using GitHub Pages.
  • Solves the problems of file size limitation (1GB) and build time limitation.
  • Reduce build time by removing unnecessary links.

Final success and static site hosting complete: https://nishio.github.io/quartz/

--- raw

2023-11-30 margin for pasting together (e.g. two pieces of paper)nishio.icon

from nishio/from_scrapbox

  • Generate Static Site from Markdown and serve in Github Pages
  • blu3mo.iconObsidian Vault at Quartz] at
    • reading...
    • Is Hugo being used? Is the language Golang?
    • Is a light conversion of the frontmatter grant needed to go from Obsidian format to Quartz format?
      • https://quartz.jzhao.xyz/authoring-content
        • There are aliases, tags
        • I'm not sure if it's just the minimum TITLE.
        • Currently there is no title information in Markdown created by ScrapboxToObidian.
          • It's in the file name.
          • Are you okay? Is there any information lost?
          • page["title"].replace(/\//gi, "-")
          • Hmmm, if you don't want Obsidian format output, I think it's better to branch out here. if you don't want Obsidian format output.
    • https://quartz.jzhao.xyz/features/wikilinks
      • So Obsidian supports Wikilinks and Quartz does as well.
  • shoya140.iconThe well diary of the well diary was generated from Next.js
    • This one looks more flexible.
    • I don't know much about Quartz, but it would be nice to be able to customize it as easily as this.
  • study
    • Can we use the Github Wiki as a comment form?
      • At least the Wiki has an option to allow anyone to write on it.
    • Do you want to ask a question or point out an error in an article on Github Issues?
  • set in motion
    • Node was said to be out of date and re-installed.
    • image
    • image
    • hmm
    • image
    • This is garbage original data 2020-01-16.
    • fixed
  • image
    • No matter how I look at it, it's a stupid mistake, not enough space between div and style, but I don't know where to fix it.
    • image
      • Ah, the original data.
  • image
    • It took me 20 minutes to get it to work, it looks like I've managed it, though I'm getting warnings.
    • image
    • There's no index.md, so it's a 404.
  • image
    • It looks like it's displayed properly, at least.
    • Both Explorer on the left and Backlink on the right seem to be in ABC order.
      • I wish I had a better order.
      • Well, that's an improvement, not a 0 to 1, so we'll get to that later.

Explore Deploy

  • Ha, what a complication!
    • Hosting
    • There's a tricky detail cover-up going on.
  • I don't know what to do. This is a pain in the ass.
  • I haven't walked at all today and I don't get enough exercise, so I'll think about it while I walk anyway.
  • Sleepy, close to the limit of today's activity (maybe already past).
  • I'm wondering if following the instructions won't work as described? I'm thinking, but I'll just do it the way it's described anyway.
  • furthermore bash
% git status
On branch v4
Your branch is up to date with 'origin/v4'.

Changes not staged for commit:
  (use "git add/rm <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        deleted:    content/.gitkeep
        modified:   package-lock.json

Untracked files:
  (use "git add <file>..." to include in what will be committed)
        content

no changes added to commit (use "git add" and/or "git commit -a")
  • procedure
    • Head to “Settings” tab of your forked repository and in the sidebar, click “Pages”. Under “Source”, select “GitHub Actions”.

    • You said "forked" as a matter of fact.
    • $ git remote rename origin upstream
    • $ git remote add origin https://github.com/nishio/quartz.git
    • I don't know if this is the right thing to do.
  • Configure Github Pages with forked quartz repositories.
    • image
  • Now we can deploy (we are doing it from the build again on Github Action).
  • And that's not what I want to do!
    • Well, but if the repositories are separated, it's okay anyway.
  • You can't Deploy!
    • System.IO.IOException: No space left on device : '/home/runner/runners/2.311.0/_diag/Worker_20231129-132926-utc.log'

    • What's so big about it?
    • image
    • What, you can't help it?
    • Published GitHub Pages sites may be no larger than 1 GB. About GitHub Pages - GitHub Docs

    • Cloudfrare Pages, you say?
    • Even pages with almost no content have 2.4 MB per page.
      • Component.DesktopOnly(Component.Explorer())
      • Let's turn this off.
      • I turned it off and a build that used to take 20+ minutes now takes 2 minutes.
      • Conclusion, that the implementation of this plugin is not able to assume a user with 10,000 pages.
        • Embedding links to all pages on all pages, so the file size swells by the order of squares.
    • Done! https://nishio.github.io/quartz/読者向けLinks

This page is auto-translated from [/nishio/MarkdownからQuartzで静的生成してGithub Pagesでserveする](https://scrapbox.io/nishio/MarkdownからQuartzで静的生成してGithub Pagesでserveする) using DeepL. If you looks something interesting but the auto-translated English is not good enough to understand it, feel free to let me know at @nishio_en. I'm very happy to spread my thought to non-Japanese readers.


(C)NISHIO Hirokazu / Converted from Markdown (en)
Source: [GitHub] / [Scrapbox]