Giter Site home page Giter Site logo

kristapsdz / sblg Goto Github PK

View Code? Open in Web Editor NEW
91.0 91.0 13.0 2.03 MB

static blog utility

Home Page: https://kristaps.bsd.lv/sblg

License: ISC License

Makefile 2.96% C 71.88% CSS 2.00% Roff 8.85% XSLT 8.34% HTML 5.96%
blog makefile static-blog static-site

sblg's People

Contributors

kristapsdz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sblg's Issues

Markdown

Can you tell me how to use it with markdown ? i can't get it working.
I have online markdown interpreter but when i fill html code inside article.xml installwww do not work. Thank you.

timestamps are interpreted as UTC but printed in the local timezone

If I create an article with a %F-style datetime, sblg interprets the date as midnight UTC, and will convert that time to the local timezone before printing timestamps. For people west of UTC this will produce "incorrect" dates.

% cat test.html
<!DOCTYPE html>
<html>
<body>
<article data-sblg-article="1">
<time datetime="2018-06-07"></time>
<p>test</p>
</article>
</body>
</html>

% sblg -o- test.html
<!DOCTYPE html>
<html>
<body>
<nav data-sblg-nav="1">
<ul>
<li>2018-06-06: <a href="test.html">Untitled article</a></li>
</ul></nav>
</body>
</html>

After the weirdness of #8 I tested if this was a musl thing, and at least on Linux it's not libc-dependent.

Possiblity of supporting markdown?

I talked to @michaeldexter about sblg recently and he said you might be open to markdown as a format for articles. I have an existing site using octopress but it is too complex and I want something simpler. It looks like sblg is exactly what I am looking for but I prefer markdown and have hundreds of posts that are currently in markdown. I am happy to change things around but still enjoy writing in markdown if possible. Is that something you would consider?

‘SBLTAG_NONE’ undeclared

Compilation (make) failed on my system (Debian Linux i386), throwing the error below. I could not find a definition of SBLTAG in the codebase.

util.c: In function ‘sblg_destroy’:
util.c:1034:18: error: ‘SBLTAG_NONE’ undeclared (first use in this function)
  for (i = 0; i < SBLTAG_NONE; i++) {
                  ^

Prevent variable expansion (e.g. shell code)

Hey,

I'm enjoying sblg but facing a simple issue regarding code that need to embed some ${VARIABLE}, they are interpreted by sblg itself and I could not find how to escape them so that sblg does not mangle them.

Example of input:

<article data-sblg-article="1">
Check my variable expansion ${PATH%.xml}.
</article>

The generated content will have a placeholder instead:

$ sblg -t template.xml -c test.xml && grep Check test.html 
Check my variable expansion .

Is there a way to escape those strings?

article-name/index.html rather than article.html

As far as I can tell, there is no current way to generate articles with the URL style of:

http://www.example.com/blog/article-name/index.html

Currently, sblg generates:

http://www.example.com/blog/article-name.html

I have an existing blog that I am planning to convert to sblg but all of the articles are in the article-name/index.html format. I would rather keep it that way even though it is possible to redirect to article-name.html. Have you considered adding support for this way of generating articles?

Amalgamating html articles includes html code that comes after </article> tag

Trying to create html article pages, then amalgamating them into a main blog page. If the article html files are used in the blog amalgamation page, data after the tag gets inlined.

$ cat article-test.html 
<html>
<head>
    <title>My Blog</title>
</head>
<body bgcolor="#ffffff">
  <article data-sblg-article="1" data-sblg-tags="test short"> 
  <header> 
    <h1>Article Name</h1> 
    <address>Author Name</address> 
    <time datetime="2013-06-29">29 June, 2013</time> 
  </header> 
  <aside> 
    This is used as the feed <b>content</b>. 
  </aside> 
  <p>Some article text.</p> 
</article>
<div data-sblg-permlink="1"><a href="article-test.xml">permanent link</a></div>

  Extra stuff
</body>
</html>


$ cat index.html 
<html>
<head>
    <title>My Blog</title>
</head>
<body bgcolor="#ffffff">
  <article data-sblg-article="1" data-sblg-tags="test short"> 
  <header> 
    <h1>Article Name</h1>
    <address>Author Name</address> 
    <time datetime="2013-06-29">29 June, 2013</time> 
  </header> 
  <aside> 
    This is used as the feed <b>content</b>. 
  </aside> 
  <p>Some article text.</p> 
</article>
permanent link</a></div>

  Extra stuff
</body>
</html>
<div data-sblg-permlink="1"><a href="article-test.html">permanent link</a></div>



</body>
</html>

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.