README 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. texiblog: a static website generator based on Texinfo
  2. This is the README file for texiblog, a static website generator based
  3. on Texinfo.
  4. Copyright 2023 Frederico Muñoz
  5. Copying and distribution of this file, with or without modification,
  6. are permitted in any medium without royalty provided the copyright
  7. notice and this notice are preserved.
  8. Home page: https://interlaye.red/Texiblog.html
  9. Primary distribution point: https://notabug.org/fsm/texiblog
  10. Texiblog is a static site generator that targets personal websites and
  11. blogs, using `texi2any' for most its functionality -- using just
  12. `texi2any' is perfectly possible, so start there if you don't think
  13. you need anyting more, give it a try!
  14. Texiblog requires GNU Texinfo to work; it specifically requires
  15. `texi2any', so in theory only that file (and dependencies, like Perl)
  16. is needed for the primary use case of creating HTML, but there are
  17. other build targets that create an Info file or a PDF that depend on
  18. other components that are usually installed as Texinfo dependencies;
  19. GNU Texinfo is located at https://www.gnu.org/software/texinfo/ .
  20. Texiblog adds some features to make it easier to use for the intended
  21. purpose:
  22. - Makefile based workflow: all steps are done through the Makefile
  23. - Costumisation through GNU m4
  24. - CSS to make it easier to read on large screens
  25. - Automatic creation of Atom and RSS feeds
  26. - Automatic post descriptions and dates views (using Texinfo menus)
  27. - Some Texinfo macros to simplify writing
  28. - Post-processing to enhance the navigation bar
  29. HOW TO USE IT
  30. The first step is changing `./src/config.m4' to specify the main
  31. variables (website title, author name, etc). Doing a `make' will
  32. create the static website in `./out' , and it can be previewed by
  33. looking at `./out/index.html'.
  34. Change `src/index.texi' to fit your needs, which can mean removing the
  35. link to `./src/about.texi' or anything else. Then, add other sections
  36. to it for the "static" part of the site, or add files under src/posts/
  37. to add articles that will appear under the Posts section, organised by
  38. year.
  39. The files that will typically need some change are (under `./src'):
  40. - config.m4: as described above, this is the main configuration file
  41. - index.texi: the index of the site, will include other Texinfo files.
  42. - about.texi: an example "About" section
  43. - concepts.texi: to add a Concepts Index (similar to an index of tags)
  44. For the blog side of things:
  45. - posts/ : the directory under which Texinfo files are added, used as
  46. blog posts.
  47. - posts/2023-08-25-Timeline.texi: an example of a blog post; note that
  48. the filename should start with the timestamp in ISO format to
  49. simplify ordering.
  50. The following shouldn't require changes, unless to enhance things in
  51. different ways (that is to say, they can be kept unchanged to get the
  52. features that exist by default):
  53. - posts.m4, posts.texi: used for automatic creation of the posts menu,
  54. which provides a view with the date (sorted by recent). `posts.texi'
  55. is automatically created from the `m4' file.
  56. - config.texi.m4, config.texi: these incorporate the variables defined
  57. in `config.m4' in a Texinfo file that is imported by
  58. `index.texi'. It also includes the last updated post.
  59. - macros.texi: the `@date' macro used for blog posts, and others that
  60. simplify things like @imagec (add image, in float, with caption).
  61. The following files are used in creating the Atom and RSS feeds:
  62. - atom.m4
  63. - rss.m4
  64. There is a `src/lib' directory which is where `m4' auxiliary files are
  65. kept.
  66. SOME NOTES ON POSTS
  67. A post is a Texinfo file under `./src/posts', which is automatically
  68. included in the Posts table, and potentially has a link in the home
  69. header if it's the latest one (this can be removed from
  70. `index.texi'). Currently, the following is required:
  71. - The name of the file should begin with the date in YYYY-MM-DD format.
  72. - The file must start with:
  73. @node <shortname>: required to make it a separate page, must be unique.
  74. @section <title>: the title of the post
  75. @date <date>: the date of the post, in YYYY-MM-DD format
  76. There is some redundancy in the filename and @date requirement that
  77. will be removed in a next version.
  78. **Note**: the current version works with Texinfo 7.0.3; it might work
  79. with other, older versions, but it's not guaranteed. Texinfo 7.1
  80. changes the way menus are handled (and apparently also the order in
  81. which `@include` is processed), which affects the way the posts menu
  82. work. A quick workaround is to change the `FORMAT_MENU=menu` to
  83. `FORMAT_MENU=sectiontoc`, which works but doesn't show the date in the
  84. post listing.