zupzup / blog-generator Goto Github PK
View Code? Open in Web Editor NEWstatic blog generator for my blog at https://zupzup.org/
License: Apache License 2.0
static blog generator for my blog at https://zupzup.org/
License: Apache License 2.0
Hi, I visited your blog article (https://zupzup.org/epoll-with-rust/) which I found so much interesting but I noticed that canonical URL is wrong.
/
(but should be https://zupzup.org/epoll-with-rust/
)/
(but should be https://zupzup.org/about/
)https://www.zupzup.org/rust/index.html
(which is 404, but should be https://www.zupzup.org/tags/rust/
)Setting canonical of all the blog articles to the top page is confusing for crawlers.
When building paths for files to write, the path/filepath
package should be used for multi-platform compatibility.
I'm enjoying the generator but just noticed index.xml is very large. I'm making a backup of some my club's newsletters and storing them into one html/md file per blog post. They vary from 1 or 2 MB to 20MB per file. The images are base64 encoded within the file. When I look at the built www folder, my index.xml file is about the same size as all my posts, which is basically doubling the www folder size. Is this normal??
Hi @zupzup ,
thanks for the amazing code, I'm really looking forward to test it and use it :D
I was perform the step
go get github.com/zupzup/blog-generator
And I receive the message
../go/src/github.com/zupzup/blog-generator/generator/generator.go:243:40: not enough arguments in call to "github.com/alecthomas/chroma/formatters/html".WithClasses
have ()
want (bool)
../go/src/github.com/zupzup/blog-generator/generator/post.go:168:41: not enough arguments in call to "github.com/alecthomas/chroma/formatters/html".WithClasses
have ()
want (bool)
โฏ go version
go version go1.12.13 linux/amd64
If you could guide me or give me some advice I will appreciated.
All the best
Just trying this out. Looks very nice. I'm on windows7. Executed the "go get" to get my exe. Copied the "static" folder over to same folder as the blog-generator.exe. Used the same bloggen.yml file as yours except used my forked repo for the content. Then ran the exe and got this error-
Fetching complete.
Generating Site...
Generating Post: Syntax-Highlighting from a Markdown source in Go using Chroma...
Generating Post: Scrolling Endpoint with Kotlin and Spring Boot...
Generating Post: Elasticsearch to Prometheus Exporter in Go...
Generating Post: Basic AST Traversal in Go...
Generating Post: Basic AST Manipulation in Go...
Generating Post: Ethereum Prepaid Transactions with Go...
Generating Post: Interactions between Smart Contracts with Solidity...
Generating Post: The Benefits of Uninterrupted, Focused Work...
Generating Post: Ethereum Light-Client with React Native...
Generating Post: HTTP File Upload and Download with Go...
2018/10/10 21:08:53 error executing template www\kotlin-scrolling-endpoint\index.html: template: tem
plate.html:212:14: executing "template.html" at <.HighlightCSS>: can't evaluate field HighlightCSS i
n type generator.IndexData
When I look at www\kotlin-scrolling-endpoint\index.html I see no .HighlightCSS in the file. The file actually ends with some styling commands. I forked your content site just to see how it works. Can you see what I'm doing wrong?
I'm also not sure how this generator works. When I enter the blog url into the config file, how is that related to the content, meaning how does the content get uploaded to that blog url? Automatically or manually?
Update - well delete all the above. I had an older exe from months ago, so I updated it and now the site builds fine. So I just upload to anywhere I want then, yes?
Also, just tried setting the blog url to "http://localhost/zupzup/www" and it doesn't work. All links seem to be based on localhost root, like this - "http://localhost/go-markdown-syntax-highlight-chroma/". Is this working correctly?
For posts, the short description of a post should be used in place of the
<meta name="description" content="..."/>
meta description.
It should be possible to configure the tool via bloggen.yml
file, which holds all the settings which are currently implemented as constants in generator/generator.go
The Source repository, tmp-folder and output folder should also be configurable using this config.
Hi,
I checked my sitemap and rss and their links are missing the first letter of each post.
maybe it has something to do with the update of chroma?
here an example:
<rss version="2.0">
<channel>
<title>AdminSecurity Blog by Alejandro Betancor</title>
<link>https://adminsecurity.guru</link>
<language>en-us</language>
<description>
A blog about Go, JavaScript, Open Source and Programming in General
</description>
<lastBuildDate>20 Dec 2019 17:32 +0100</lastBuildDate>
<atom:link href="https://adminsecurity.guru/index.xml" rel="self" type="application/rss+xml"/>
<item>
<title>Migrating Traefik from v1.7.x to v2.1</title>
<link>
https://adminsecurity.guru/raefik-migrating-v1-to-v2/
</link>
<guid>
https://adminsecurity.guru/raefik-migrating-v1-to-v2/
</guid>
<pubDate>20 Dec 2019 00:00 +0000</pubDate>
<description>
<p>My expirience migrating from one version to another</p>
</description>
</item>
<item>
<title>Hello Go!</title>
<link>https://adminsecurity.guru/ello-go/</link>
<guid>https://adminsecurity.guru/ello-go/</guid>
<pubDate>20 Dec 2019 00:00 +0000</pubDate>
<description><p>My first post</p> </description>
</item>
</channel>
</rss>
thanks
Just came back to this generator and it is very nice. Is it possible to use the current folder that the build exe is in for the source markdown files or even a subfolder which I can name anything I want ? I want to store my source md files locally is the reason.
Is there a simple change I could make so that the meta data is in the top of the post instead of a separate file?
I'm trying to use my own template with the same tags as the original one in the repo, but I'm getting errors like this -
Generating Site...
Generating Post: Syntax-Highlighting from a Markdown source in Go using Chroma...
Generating Post: Log Deletion on ELK stack using Go...
Generating Post: Scrolling Endpoint with Kotlin and Spring Boot...
Generating Post: Creating an iCal feed with Go...
Generating Post: Ethereum Light-Client with React Native...
Generating Post: Basic AST Manipulation in Go...
Generating Post: Ethereum Prepaid Transactions with Go...
2020/02/02 17:35:11 error executing template www\go-markdown-syntax-highlight-chroma\index.html: html/template:template.html: "<" in unquoted attr: "<br"
Do you know why this may be occurring? I do have a few <br>
in my template but that's proper html.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.