Giter Club home page Giter Club logo

one.el's Introduction

one.el a simple Static Site Generator for Emacs Lisp programmers and org-mode users.

Check the docs: https://one.tonyaldon.com.

Note that the docs are built using one.el itself. To build them, visit ./docs/docs.org and call one-build command. This will build the docs under ./docs/public/ subdirectory.

To run the tests, visit ./one-tests.el and call the eval-buffer and ert commands like this:

  • M-x eval-buffer
  • M-x ert RET RET

Check the ./LICENSE.

one.el's People

Contributors

tonyaldon avatar

Stargazers

Mihai avatar Maxime Rousseau avatar  avatar Vincenzo Palazzo avatar  avatar Andros Fenollosa avatar  avatar Steven Lumos avatar Aliaksei Yaletski avatar Brandon Irizarry avatar A. Cingoranelli avatar taku_eof / Taku WATABE / 渡部巧 avatar yibie avatar Zachary Romero avatar tomoyukim avatar Graham Marlow avatar paramtapm.ai avatar Jumpei KAWAMI avatar Nicolas Vaughan avatar  avatar 김석범 (SukBeom Kim) avatar Adam Porter avatar Masaki Waga avatar Terje Larsen avatar Maksim Rozhkov avatar  avatar Tao Hansen avatar Stephan Ruttloff avatar Ethan Leba avatar james avatar  avatar JunghanKim avatar Gábor Udvari avatar  avatar Tareef Mando avatar Shervin Safavi avatar Shane avatar

Watchers

 avatar  avatar

one.el's Issues

CSS not loaded

The generated HTML file has the following: <link rel="stylesheet" type="text/css" href="/one.css" />, thus the one.css file in the current folder is not loaded when the HTML file is opened in the browser. Maybe the above line should look like this? <link rel="stylesheet" type="text/css" href="/one.css" /> (without the slash?)

Set the character encoding in generated web pages.

Hi!

I've just discovered one.el and I'm liking it.
I need to render accented letters, etc... in the generated html and they don't appear properly rendered, I need to manually add a 'meta charset="utf-8"' to the html header of each generated file.

Is there a way to set this kind of things using a variable or another method?

part of one.el to improve a workflow for org-publish

The idea of ​​publishing content from one org file is very
impressed. But whatever one.el is designed to create small
and simple sites.
For examples, your sites on subdomains are small. By the
way, Google counts sites on the subdomains as separate and
sees them each as a separate small site with the corresponding rating.

"One" is trying to process the markup of the org with its
limited parser. There are tools in Org for processing itself.

There is no project structure. There are no exceptions to
publication for some files. A lot of things are not exist
what org-publish able to offer.

People who want to publish from 1 org file will find this "One".
But having examined it, they will ask why it has little functions.

How about taking part from One.el, which is responsible for
publication from 1 org file and send the withdrawal of
separate files to the Org-publish project folder.

That is code that converts the single org into separate
posts, standart separated org files.

Next standart workflow can be launched by the org-publish.
Org-pubslish can only publish from the original form 1 org file in 1 HTML page. It will work with these separate org files in their order as established.

The organizer mechanism can be used and by running
separation into a separate files from headings with the
status of Done, taking from heading their creation time that
is automatically recorded into :LOGBOOK: when changing the status of the org-heading.

It will be possible to send people who want 1 org file and
More functions to this "converter" code. This code can gain more popularity than One.el.

HTML attributes are ignored in org

When I write this code:

#+ATTR_HTML: :class img-responsive
[[#/img/quickstart/minimal-template.webp][Random number]]

I expect this HTML

<img class="img-responsive" src="/img/quickstart/minimal-template.webp" alt="Random number">

However, it is ignored.

Return:

<img src="/img/quickstart/minimal-template.webp" alt="Random number">

If it is possible, I can't find it in the documentation.

PS: I love this Static Site Generator.

rx `**' range error

I'm getting this error when using this tool.

rx `**' range error

Any idea? 🤔

`one-build` is not actually working

I just tried the package and there are some problems.

org-build command
Well, there is already documentation in the one-build function, but I still don't get why the user has to do steps every time that I wanna build.

Build website of the current buffer under ./public/ subdirectory.

Specifically:

1) clean ./public/ subdirectory (if it exists),
2) copy ./assets/ files into ./public/ subdirectory and
3) call one-render-pages once.

And when I do one-build command from the one.org buffer, the message shows up:

org-element-at-point: ‘org-element-at-point’ cannot be used in non-Org buffer #<buffer  *temp file*> (fundamental-mode)

Default example pages
It seems like main page is shown up but other pages are not. For example, when I try to access one-default-doc, the message turns up:

Cannot GET /blog/one-default-doc/

Support to Build rss/atom feeds

Hi @tonyaldon!

Its so nice to see ssg with pure org-mode and elisp. I just tried it now, and I can feel how simple and friendly to org-mode it is.

I have to still dig and try out more possibility to get desired themes.

Just one required feature would be support to generate rss/atom feeds.
This would be easy, even I will give a try of writing elisp that generates it.

Just adding it here, not an issue as such, just a feature request.

Add in the documentation how to create robots.txt and sitemap

It's just a suggestion.

Add robots.txt

Make assets/robots.txt with this content:

User-Agent: *
Allow: /
Sitemap: https://domain.com/sitemap.txt

Add sitemap

You can create a simple sitemap in txt. Check this link

Only add in onerc.el

(defvar domain "example.com")

(defun make-sitemap (pages tree global)
  "Produce file ./public/sitemap.txt"
  (with-temp-file "./public/sitemap.txt"
    (insert
     (mapconcat 'identity (mapcar
			   (lambda (page)
			     (let* ((path (plist-get page :one-path))
				    (link (concat "https://" domain path)))
			       link
			       ))
			   pages) "\n"))))

(add-hook 'one-hook 'make-sitemap)

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.