Coder Social home page Coder Social logo

stephensmitchell-forks / blog Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lalluviamola/web-blog

0.0 1.0 0.0 56.71 MB

Static site generator for my blog

Home Page: http://blog.kowalczyk.info

Go 6.40% C++ 3.01% C 0.83% Makefile 0.33% Python 9.41% HTML 65.38% JavaScript 8.45% CSS 6.10% Ruby 0.01% Shell 0.05% Batchfile 0.03%

blog's Introduction

Build Status

This is a Go program that generates my website/blog https://blog.kowalczyk.info.

I use Notion to write most of the content.

This custom Go program downloads pages from Notion, caches it in notion_cache directory, converts to static HTML files and deploys to Netlify.

To extract my content from Notion I reverse engineered their API and wrote a Go library.

I wrote an article about how I got to this point.

Build and run

Note that this blog is specific to my needs. Most of the content comes from notion.so but there are some .html pages and markdown converted to HTML.

If you want to adopt it for your purposes, here are some things you might want to change:

  • analyticsCode in main.go
  • notionBlogsStartPage in articles.go. this is a page that has a list of blog articles, which are treated specially (they form the blog part)
  • notionWebsiteStartPage in articles.go this is a page for the root of the website's content
  • notionGoCookbookStartPage in articles.go - well, this and all code related to it should be removed. This is a page for the root of my "Go Cookbook" mini-book
  • make those pages public (but disable search text indexing) (via Share button in Notion, at the top right).

Then you can see s\preview.ps1 script to see what the build process is, which currently is:

  1. go build
  2. run ./blog or ./blog -preview to also start a local web server for previewing files
  3. Now you can start a local webserver in the netlify_static directory (e.g. npx live-server netlify_static)

HTML files are generated in netlify_static directory because I deploy to Netlify but since it's mostly a static website, you can deploy it pretty much anywhere.

blog's People

Contributors

alfonsib avatar azpidatziak avatar gubikmic avatar justdeath avatar kjk avatar mov avatar nardog avatar quelbs avatar shobra avatar smarquespt avatar streger avatar

Watchers

 avatar

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.