Commit Graph

16 Commits

Author SHA1 Message Date
Ludovic Courtès f71ca12460
website: Remove (apps packages builder).
The /packages.json and /sources.json are now built by an mcron job
running on the server behind guix.gnu.org.  See maintenance.git commit
5664984bdd4a4ecbd7a2a5feb4033d610cea59fd.

* website/apps/packages/builder.scm, website/apps/packages/data.scm:
Remove.
* website/haunt.scm: Remove reference to (apps packages builder).
2023-01-04 22:31:23 +01:00
Florian Pelz eff4837177
website: Add custom xgettext to extract from nested sexps for i18n.
* website/po/POTFILES: New file.  List apps files here.
* website/po/LINGUAS: New file.  List en_US lingua.
* website/po/ietf-tags.scm: New file.  Add association for en_US lingua.
* website/scripts/sexp-xgettext.scm: New file for generating a POT file.
(<keyword-spec>, <po-entry>, <construct-fold-state>): New record types.
(combine-duplicate-po-entries, complex-keyword-spec?, parse-scheme-file,
po-equal?, write-po-entry, update-ecomments-string!, update-file-name!,
update-old-line-number!, update-line-number!, incr-line-number!,
incr-line-number-for-each-nl!, current-ref, make-simple-po-entry,
matching-keyword, nth-exp, more-than-one-exp?, token->string-symbol-or-keyw,
complex-marked-list->po-entries, construct-po-entries, tag,
construct-msgid-and-po-entries, scheme-file->po-entries): New procedures.
(%keyword-specs, %options, %comments-line, %ecomments-string, %file-name,
%old-line-number, %line-number, %files-from-port, %source-files,
%output-po-entries, %output-port): New variables.
* website/sexp-xgettext.scm: New file with module for looking up
translations.
(%complex-keywords, %simple-keywords, %plural-numbers, %linguas):
New variables.
(<construct-fold-state>, <deconstruct-fold-state>): New record types.
(set-complex-keywords!, set-simple-keywords!, gettext-keyword?, tag,
sexp->msgid, deconstruct): New procedures.
(sgettext, spgettext, sngettext, snpgettext): New macro helpers.
* website/apps/i18n.scm: New file.
(G_, N_, C_, NC_, ietf-tags-file-contents): New syntax to use for i18n.
(%current-ietf-tag, %current-lang, %current-lingua): New variables.
(builder->localized-builder, builders->localized-builders,
localized-root-path, first-value): New utility procedures.
(<asset>, <page>): New imports from Haunt.
* website/haunt.scm: Wrap each builder to build the locale set in LC_ALL.
* website/.guix.scm: Make Haunt build directory writable so Haunt can
overwrite duplicate assets.  Convert PO files to MO files and build for
each lingua.
* website/README: Adapt build instructions for i18n.
* website/i18n-howto: New file with usage instructions.
2020-07-26 15:43:01 +02:00
Florian Pelz 3e25cce32c
website: Move screenshots code to new media module.
Suggested by sirgazil <sirgazil@zoho.com>.

* website/static/base/css/screenshots.css: Rename file to ...
* website/static/media/css/screenshots.css: ... this.
* website/apps/base/templates/screenshot.scm: Rename file to ...
* website/apps/media/templates/screenshot.scm: ... this.
(screenshot-t): Adapt path to CSS.
* website/apps/base/builder.scm (builder, screenshots-builder):
Move code for and references to screenshots-builder from here to ...
* website/apps/media/builder.scm: ... this new file.
* website/apps/base/data.scm (screenshots): Move from here to ...
* website/apps/media/data.scm: ... this new file.
* website/apps/base/templates/components.scm (screenshot->shtml):
Move from here to ...
* website/apps/media/templates/components.scm: ... this new file.
* website/apps/base/types.scm (<screenshot>, screenshot):
Move from here to ...
* website/apps/media/types.scm: ... this new file.
* website/apps/base/templates/home.scm: Adapt module references.
* website/haunt.scm (site): Add media builder.
2019-10-26 10:40:05 +00:00
Ricardo Wurmus feb02faba5
website: Remove handling of GUIX_WEB_SITE_INFO.
* website/README: Remove documentation.
* website/apps/base/templates/help.scm (help-t): Use just one URL for
the refcard.
* website/apps/base/utils (guix-root-url-path): Use "/".
(builder): Remove big comment about bug #25227 and use expensive
builders.
* website/haunt.scm: Use guix.gnu.org domain.
2019-08-21 23:18:19 +02:00
sirgazil df6f5b0417
website: haunt: Update build directory.
This commit removes a comment about an old Haunt bug related to
using dots in URI paths to resources,¹ and updates the website build
directory '/tmp/gnu.org/software/guix'.

* website/haunt.scm (site): Update #:build-directory.

1. http://lists.gnu.org/archive/html/guile-user/2017-12/msg00070.html
2019-04-18 18:44:52 -05:00
Ludovic Courtès e057a602d4
website: Remove "GuixSD" from source file headers.
Done by running these three commands from the website/ directory:

  find -name \*.scm |xargs sed -i -es'/;;; GuixSD website --.*/;;; GNU Guix web site/g'
  find -name \*.scm |xargs sed -i -es'/;;; GuixSD website/;;; The GNU Guix web site/g'
  find -name \*.scm |xargs sed -i -es'/part of GuixSD website/part of the GNU Guix web site/g'
  find -name \*.scm |xargs sed -i -es'/along with GuixSD website/along with the GNU Guix web site/g'
2019-03-05 23:00:46 +01:00
Ludovic Courtès da771aafa5
website: Remove leftover "GuixSD" references.
* website/apps/base/templates/about.scm (about-t): Remove mentions of
"GuixSD".
* website/apps/base/templates/contribute.scm (contribute-t): Likewise.
* website/apps/base/templates/help.scm (help-t): Likewise.
* website/apps/base/templates/irc.scm (irc-t): Likewise.
* website/apps/base/templates/security.scm (security-t): Likewise.
* website/apps/packages/templates/detailed-package-list.scm (detailed-package-list-t):
Likewise.
* website/apps/packages/templates/package-list.scm (package-list-t): Likewise.
* website/apps/packages/templates/index.scm (index-t): Likewise.
* website/apps/packages/templates/detailed-index.scm (detailed-index-t): Likewise.
* website/apps/download/templates/download.scm (download-t): Likewise.
* website/apps/blog/templates/post-list.scm (post-list-t): Likewise.
* website/apps/blog/templates/tag.scm (tag-t): Likewise.
* website/apps/blog/templates/post.scm (post-t): Likewise.
* website/apps/blog/templates/feed.scm (atom-feed-t): Likewise.
* website/apps/base/templates/graphics.scm (graphics-t): Likewise.
* website/apps/base/templates/theme.scm (theme): Likewise.
* website/apps/blog/builder.scm (tag-feed-builder): Likewise.
* website/apps/download/types.scm: Likewise.
* website/haunt.scm (#:title): Likewise.
2019-03-05 23:00:46 +01:00
Ricardo Wurmus 8d43edd1f6
website: Add tweaks for building guix.info site. 2018-12-23 22:54:18 +01:00
sirgazil 3d9cc33400
website: Incorporate sirgazil's major update.
Copied by Ludovic from https://bitbucket.org/sirgazil/guixsd-website
hg changeset 209:ce9d62df07f2.
2017-12-06 14:21:00 +01:00
Ludovic Courtès 3f6bff6ca3
website: Add post about GSoC.
* website/posts/join-gnu-guix-for-gsoc-2017.md: New file.
* website/haunt.scm: Add COMMONMARK-READER.
* website/www.scm (sxml->string*)[sxml->strings]: Automatically wrap
lists in <div>.
2017-03-09 14:18:35 +01:00
sirgazil 368ec7de00
website: Fix missing HTML document type declaration (see bug #24981)
* haunt.scm (site): Add doctype declaration.
* www/news.scm (base-layout): Ditto.
2016-11-22 14:29:07 -05:00
Ludovic Courtès fdbac71dc4
website: Add Haunt's HTML reader for posts.
* website/haunt.scm <site>: Add HTML-READER for posts.
2016-11-10 23:06:59 +01:00
Ludovic Courtès 2868212bb4
website: Use absolute URLs to the articles in the Atom feed.
* website/haunt.scm: Pass an absolute URL as the #:blog-prefix for
'atom-feed'.
2016-10-28 17:10:10 +02:00
Ludovic Courtès 864ff90859
website: main-page: Show posts provided by Haunt.
* website/www.scm (%atom-url, fetch-news, <news-entry>)
(news-items, news-entry->sxml): Remove.
(post->summary-sxml): New procedure.
(main-page): Add 'site' and 'posts' parameters.  Use them to create the
"news-box".
* website/haunt.scm <site>: Add separate builder for guix.html.
2016-10-27 00:03:58 +02:00
Ludovic Courtès 55c4d5b809
website: Add "News" page.
* website/www/news.scm: New file.
* website/static/base/css/news.css: New file.
* website/haunt.scm (with-url-parameters): New macro.
(parameterized-procedure, parameterized-theme): New procedures.
<top level>: Use 'with-url-parameters' and add blog and atom feed.
2016-10-26 23:16:59 +02:00
Mathieu Lirzin 580af4b382
website: Add support for Haunt.
This provides a simple way to build the website locally.

* website/haunt.scm: New file.
* website/README: Document the new build process.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2016-10-26 23:16:52 +02:00