Code Monkey home page Code Monkey logo

Comments (12)

masasam avatar masasam commented on May 20, 2024

Hi gour.
Thank you for an interesting proposal.
I didn't know AsciiDoc(tor)/reST.
I will add support for AsciiDoc(tor)/reST markup formats.

from emacs-easy-hugo.

masasam avatar masasam commented on May 20, 2024

Hi @gour .
Added support for AsciiDoc(tor)/reST markup formats, so try using it.
Please report if there is a problem.

from emacs-easy-hugo.

gour avatar gour commented on May 20, 2024

@masasam Thank you very much for adding it!

Please report if there is a problem.

There is one thing I can think of...adding ability to configure list of extensions for each markup, e.g. besides *.ad, the *.adoc or *.txt are common formats used for AsciiDoc(tor) files, similar with reST where *.txt is quite common one, so my idea is that instead of depending just on hard-cored extensions, it would be nice to provide ability that user provides his/her own (a)list for each markup format by adding to the default extension and then the code should just iterate through the list while detecting correct format?

I'd gladly help, but, unfortunately, my current Elisp skills are inadequate although I hope to improve it in the future.

from emacs-easy-hugo.

masasam avatar masasam commented on May 20, 2024

Hi @gour .
Added support for changing the extension of markdown and asciidoc, so try using it.
Please select *.ad or *.asciidoc or *.adoc at extension.
Because only these three are supported by hugo.
*.txt is not support in hugo.
For example, write at your init.el ...
(setq easy-hugo-asciidoc-extension "asciidoc")

from emacs-easy-hugo.

gour avatar gour commented on May 20, 2024

@masasam
What is wrong:

Debugger entered--Lisp error: (error "Please enter .md or .org or .adoc or .rst or .mmark or .html file name")
  signal(error ("Please enter .md or .org or .adoc or .rst or .mmark or .html file name"))
  error("Please enter .%s or .org or .%s or .rst or .mmark or .%s file name" "md" "adoc" "html")
  easy-hugo-newpost("test.adoc")
  funcall-interactively(easy-hugo-newpost "test.adoc")
  call-interactively(easy-hugo-newpost nil nil)
  command-execute(easy-hugo-newpost)

considering that I defined:

(setq easy-hugo-asciidoc-extension "adoc")

in my init.el and just wanted to create new test.adoc file?

from emacs-easy-hugo.

masasam avatar masasam commented on May 20, 2024

Hi @gour
Are you using MELPA?
If you are using melpa, please tell me the version of line 7.
Package-Version: 20170425.520?

from emacs-easy-hugo.

gour avatar gour commented on May 20, 2024

Are you using MELPA?

Yes

If you are using melpa, please tell me the version of line 7.
Package-Version: 20170425.520?

;; Package-Version: 20170425.520

from emacs-easy-hugo.

gour avatar gour commented on May 20, 2024

from emacs-easy-hugo.

masasam avatar masasam commented on May 20, 2024

@gour Could you show me your init.el.

from emacs-easy-hugo.

gour avatar gour commented on May 20, 2024

@masasam here is the relevant part:

(use-package easy-hugo
  :ensure t
  :config
  (setq easy-hugo-basedir "~/prj/hugo/net/")
  (setq easy-hugo-url "https://my.domain.tld")
  ;;(setq easy-hugo-sshdomain "blogdomain")
  (setq easy-hugo-root "/home/gour/prj/hugo/net/")
  (setq easy-hugo-previewtime "300")
  (setq easy-hugo-asciidoc-extension "adoc")
  :bind ("C-c C-e" . easy-hugo)
 )

from emacs-easy-hugo.

masasam avatar masasam commented on May 20, 2024

Hi @gour .

It worked. Try this ...

(use-package easy-hugo
:init
(setq easy-hugo-basedir "~/prj/hugo/net/")
(setq easy-hugo-url "https://my.domain.tld")
(setq easy-hugo-root "/home/gour/prj/hugo/net/")
(setq easy-hugo-previewtime "300")
(setq easy-hugo-asciidoc-extension "adoc")
(setq easy-hugo-default-ext ".adoc")
:bind ("C-c C-e" . easy-hugo)
)

from emacs-easy-hugo.

gour avatar gour commented on May 20, 2024

Ahh, the trick is to put setup under

:init

section instead of

:config

Yes, that helps!!

from emacs-easy-hugo.

Related Issues (20)

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.