diff --git a/README.md b/README.md index a4103bc..193e04c 100644 --- a/README.md +++ b/README.md @@ -1,122 +1,35 @@ ![bearclaw](https://user-images.githubusercontent.com/96031819/218302524-121cd81a-b552-45e5-b46e-5689bbf08390.png) -# bearclaw -a tiny static site generator, written in Go - ![donuts-are-good's followers](https://img.shields.io/github/followers/donuts-are-good?&color=555&style=for-the-badge&label=followers) ![donuts-are-good's stars](https://img.shields.io/github/stars/donuts-are-good?affiliations=OWNER%2CCOLLABORATOR&color=555&style=for-the-badge) ![donuts-are-good's visitors](https://komarev.com/ghpvc/?username=donuts-are-good&color=555555&style=for-the-badge&label=visitors) +## bearclaw - fast and easy website generator -## Thanks to the supporters of this repo -Below are the people who've starred this repo. Without them it'd still get done, but with a bit less clapping ;) - -(supporter grid generated with [donuts-are-good/starchart](https://github.com/donuts-are-good/starchart) ) - -donuts-are-good's avatarinsolitum's avatarmpldr's avatarramenbased's avatarqbit's avatarhorvski's avatarZinRicky's avatarralgozino's avatarMattDemers's avatarjgbrwn's avatarTakenMC's avatarluigibarbato's avatarzamicol's avatarTheShuckduck's avatartkersey's avataritwars's avatariamcais's avatarf1729's avatarfrankalicious's avatarroberthodapp's avatarsimulationguest's avatarRodrigoHahn's avatarApreche's avatarzubayrrr's avatarmrjk05's avatarvorons's avatarroycifer's avataraveekbhat's avatarbetatron's avatarteeheehee's avataroznogon's avatarcheetahzone's avatarmusicjunkieg's avatarreorx's avatarfreespace's avatarOwain-S's avatarzarquin's avatarjarrodoxical's avatarjonanderson10's avatarsriramsamynathan's avatarsirinath's avatarjpoz's avatarartlesshao's avatarGreyDev's avatarnotjedi's avataradityasanka's avatartriptych's avatarvopi181's avatarigufi's avatarGlenDC's avatardaveschumaker's avataroudommeas's avatariddan's avatarAquariusDue's avatartockards's avatarasiermartinez's avatarmsubhash's avatarromainpaoli's avatarBedrovelsen's avatarjlapaix's avatar5183nischal's avatarlukegg's avatardostie's avatarsamcottle's avatarHarrisonJackson's avatarvladyio's avatarchristoph00's avatarhwartig's avatarad-laurentius's avatar0x5f3's avataryenbekbay's avatarmtron's avatargoranmoomin's avatarjulianxhokaxhiu's avatarcosmic-flood's avatarkaishin's avatarfediaFedia's avatarvillacreses's avatardev-oskar's avatarcrendl's avatarmickume's avatart-var-s's avatardevnullity's avatarvietphan-ioof's avatarnicoloval's avatar0q2's avatarzsellera's avatarlixoo81's avatar3Samourai's avatarkorbiniak's avatarllgdd's avataraimen08's avataramadeuspagel's avatardingyi's avatarDonnie's avatarjacekschefler's avatarnorflin321's avatarazappella's avatarnik-s's avatardjakaitis's avatarhollisticated-horse's avatarvoidptrptr's avatarantiops's avatartakuan-osho's avatarboxreb14's avatarAmorymeltzer's avatarchriswmartin's avatargridhawk's avatardanielrangelmoreira's avatarquaintdev's avatarvinayrkumar's avatarwhoibrar's avatarklaaay's avatarbulbfreeman's avatarohmygaugh-crypto's avatarmixedup4x4's avatarjamesauburn's avataryasledesma's avataribrahimBeladi's avatarhtwyford's avatarJohnBeyene's avatarsamuelbutler's avatarSalGnt's avatardcchambers's avatarHazzamanic's avatarhrshshrma's avatarorguetta's avatarPome-ro's avatarmikelittman's avatarjlucansky's avatarjdoss's avatardedisuryadi's avatarandygeorge's avatarvonmoltke's avatara2800276's avatartheodesp's avataralexander-daniel's avatarnoopsy's avatarflatherz's avatarlitong-2017's avatarnyavorski's avatartristanisham's avatarandryyy's avatarttgmichael's avatarusysrc's avatarelpibegeek's avatarJanJastrow's avatarsophiabrandt's avatarpinpox's avatarEdenEast's avatardoubleplusc's avatarusmanakram232's avatargrigio's avatarbriantkelley's avataralgustionesa's avatarfvckgrimm's avatarcarterbourette's avatarktkization's avatarwilliycole's avatarclsource's avatarSantoshSrinivas79's avatar3raxton's avatarvmc-7645's avatarDaeraxa's avatartsujp's avatarmzfr's avatardaviduzondu's avatardai's avatarmonopoly-db's avataratre14's avatarbocke's avatargpaes's avatarklebertertulino's avatardmje's avatarellisonleao's avatarSkyth3r's avatarmichaelsmanley's avatarapproximate's avatar2-1-1-2's avataraaronkebede's avatarnazgu1's avatardavidhaley's avataryasmeen's avatarrwcrooks's avataroffsounder's avatarvaygr's avatarterretta's avatararrow2nd's avatarpuzzeljp's avatarkhira9504's avatarStanleyLW's avatarfirestack's avatarbanderson443's avatarGooseus's avatarymkz's avatar - - - -## what's a static site generator -a static site is a site with no fancy clicky things, signups, comments, just plain html. writing a raw html page for your blog makes it load very fast, but there's a lot of typing involved when designing it. markdown is a simpler and faster way to write pages, and bearclaw converts those markdown files to html for you, with your style template. - -no node-modules, no react, no fancy stuff or cool emojis. it just works. - -## how do we use it? -bearclaw can be run on-demand, or it can rebuild automatically when it sees changes. there are 3 folders in the basic install: `markdown`, `output`, and `templates`. there is an optional 4th folder after v1.2.0 for `plugins`. - -- **markdown** - all your new posts go here -- **output** - bearclaw puts your html and rss here -- **templates** - header.html and footer.html -- ***plugins*** *(optional)* - extra features for your page - -### How to init a bearclaw -*As of bearclaw 1.2.0alpha* - -#### Linux -First, download the [bearclaw executable](https://github.com/donuts-are-good/bearclaw/releases) - -then create a folder: -``` -cd your_bearclaw_folder -``` - -either have the bearclaw executable in that folder, or set it up in your $PATH, to be able to call `./bearclaw ` from any folder. -Either way, run the command once to generate the folder structure: : - -``` -./bearclaw -``` -and you get: -``` -your_bearclaw_folder -├── markdown -├── output -│ ├── about.html -│ └── posts.html -├── plugins -└── templates -``` - -that's it! point your webserver at `output` or handle it however is best for your case. - -**tip:** you can run `./bearclaw` and it will run once, or you can use `./bearclaw --watch` to watch the folders for changes. - -## plugins -bearclaw supports plugins. -plugins should be added to the `plugins` folder. - -To call a plugin in your markdown or html pages, use an html comment like this: -``` - -``` -bearclaw will swap the comment for the contents of the plugin file at the specified path. - -### Example - -**MyBlogPost.md** -```markdown - -# My title - -Some text ... - - - -``` - -with **plugins/draft.html** - -```html -
-

Draft in Progress -
-``` -enables for example to add an html element that can be targeted specifically with CSS for special styling. -You could also inject javascript, all sorts of content that bearclaw does not support natively. - -## issues - -if you run in to issues, there's a short bug report form you can fill out, or you can contribute with a pull-request. - -## screenshot - -![image](https://user-images.githubusercontent.com/96031819/218305635-75bdf421-e412-4b90-9f4a-26947219bf51.png) - -## greetz - -the Dozens, code-cartel, offtopic-gophers, the garrison, and the monster beverage company. - -## license + -this code uses the MIT license, not that anybody cares. If you don't know, then don't sweat it. -made with ☕ by 🍩 😋 donuts-are-good +## why do I want this? +**bearclaw makes converting markdown into websites easy.** +you don't need to learn any templating languages, you just drop in your markdown content and run. bearclaw will convert your markdown into html that is ready to go on Github Pages or even your own server. -## donate +no frameworks, no node-modules, no react, no fancy stuff or cool emojis. it just works. -If you would like to be an official energy drink sponsor of this project, you can contribute however you like. +## how do I use it? +step by step [instructions are here](https://github.com/donuts-are-good/bearclaw/blob/master/markdown/getting-started.md) -**Bitcoin**: `bc1qg72tguntckez8qy2xy4rqvksfn3qwt2an8df2n` +## the bearclaw guide -**Monero**: `42eCCGcwz5veoys3Hx4kEDQB2BXBWimo9fk3djZWnQHSSfnyY2uSf5iL9BBJR5EnM7PeHRMFJD5BD6TRYqaTpGp2QnsQNgC` +this readme is just a taste. for a deeper dive into more topics, click a link below, or look in your `bearclaw/markdown` folder! -😆👏 Thanks +- [bearclaw origins](https://github.com/donuts-are-good/bearclaw/blob/master/markdown/bearclaw-origins.md) +- [bearclaw philosophy](https://github.com/donuts-are-good/bearclaw/blob/master/markdown/bearclaw-philosophy.md) +- [system requirements](https://github.com/donuts-are-good/bearclaw/blob/master/markdown/system-requirements.md) +- [building from source](https://github.com/donuts-are-good/bearclaw/blob/master/markdown/building-from-source.md) +- [join bearclaw](https://github.com/donuts-are-good/bearclaw/blob/master/markdown/join-bearclaw.md) +- [code styleguide](https://github.com/donuts-are-good/bearclaw/blob/master/markdown/code-styleguide.md) +- [brand guide](https://github.com/donuts-are-good/bearclaw/blob/master/markdown/brand-guide.md) +- [getting started](https://github.com/donuts-are-good/bearclaw/blob/master/markdown/getting-started.md) +- [advanced options](https://github.com/donuts-are-good/bearclaw/blob/master/markdown/advanced-options.md) +- [using site.config](https://github.com/donuts-are-good/bearclaw/blob/master/markdown/using-site-config.md) +- [plugin basics](https://github.com/donuts-are-good/bearclaw/blob/master/markdown/plugin-basics.md) +- [writing plugins](https://github.com/donuts-are-good/bearclaw/blob/master/markdown/writing-plugins.md) +- [thanks](https://github.com/donuts-are-good/bearclaw/blob/master/markdown/thanks.md) +- [donate](https://github.com/donuts-are-good/bearclaw/blob/master/markdown/donate.md) \ No newline at end of file diff --git a/markdown/README.md b/markdown/README.md index 8b7e6bf..193e04c 100644 --- a/markdown/README.md +++ b/markdown/README.md @@ -1,14 +1,8 @@ ![bearclaw](https://user-images.githubusercontent.com/96031819/218302524-121cd81a-b552-45e5-b46e-5689bbf08390.png) ![donuts-are-good's followers](https://img.shields.io/github/followers/donuts-are-good?&color=555&style=for-the-badge&label=followers) ![donuts-are-good's stars](https://img.shields.io/github/stars/donuts-are-good?affiliations=OWNER%2CCOLLABORATOR&color=555&style=for-the-badge) ![donuts-are-good's visitors](https://komarev.com/ghpvc/?username=donuts-are-good&color=555555&style=for-the-badge&label=visitors) ## bearclaw - fast and easy website generator -*Click a thumbnail to view as a full size image* -index.html, about.html, credits.html - -

-

- -
-

+ + ## why do I want this? diff --git a/plugins.go b/plugins.go index 2edcd2b..9b6783d 100644 --- a/plugins.go +++ b/plugins.go @@ -4,7 +4,6 @@ import ( "archive/zip" "bytes" "io" - "log" "os" "path/filepath" "regexp" @@ -81,7 +80,6 @@ func FindZips(folderPath string) error { } func ScanForPluginCalls(html []byte) ([]byte, error) { - log.Println("Processing:\t plugin calls") // regexp to find the plugin call re := regexp.MustCompile(``) matches := re.FindAllSubmatch(html, -1) diff --git a/templates/header.html b/templates/header.html index 6ccc638..fef5587 100644 --- a/templates/header.html +++ b/templates/header.html @@ -45,7 +45,6 @@
bearclaw blog

-