This the source for the Racket package: "racket-lang-org".
Install this directory as a package with raco pkg install
You additionally need to install the Pygments package to Python via pip3 install pygments
.
You may also want to install raco-static-web,
though this is not necessary (you could use Python 3's http.server
instead).
www
: actual content of main site.
blog
: actual content of blog.
download
: content of download site (only installer pages and such)
*/all.rkt
: files that just require all the necessary modules to build
the whole site or sub-sites
*/resources.rkt
: files that define the resources for a site (icon,
css, logo)
minis
: smaller one-source-file sites
stubs
: template "sites" that are intended to be hooked into other
systems to get the racket look.
[See "upload" and --dry-run
for an alternative]
The simplest way to build the whole site is to run the command below:
racket -l- racket-lang-org/sync --save-temps --render-locally Web
This renders the site in some temp directory and then moves the directory to Web
.
To view the rendered pages in a browser, change directory to a rendered site
(e.g., Web/www
or Web/download
) and spawn a local server:
raco-static-web
, run raco static-web
to spawn a local server.python3 -m http.server
to spawn a local server.Then navigate to http://localhost:8000/ in your browser to view the site.
You may encounter some problems. Check below first:
pollen
problems
pollen
occasionally fails with really strange "deep in the guts"
error messages. pollen
changes and doesn't work right with its old
files. After double-checking that you have everything in a new
commit, does DANGER! git clean -d -x -f
.
DANGER! Really make sure that you don't have any files you want to keep that aren't committed! This command also rm's uncommitted files.
Run racket all.rkt -o <dir>
to build all pages to subdirectories of
<dir>
. As a safety measure, the target directory must not overlap
with any installed directory. (Use -f
in scripts to avoid
answering the question about deleting existing files.)
Running any *.rkt
might build a page and things that it
references. (Use -h
as usual.) That's less true for newer pages.
For older pages, you can choose -w
(the default) for web mode,
-l
for local using file://
references, or -r
for local mode
using relative references. Normally, you'll want to use -l
for
testing, and then use -w
for deployment.
Set the $GIT_DIR
environment variable to point to the .git
directory of a Racket repository if you want to extract release
information from a repository other than the enclosing one.
You'll need credentials to upload to S3, and those credentials
should be in ~/.aws-keys
.
You'll need the s3-sync
Racket package installed.
Run the sync.rkt
script: racket -l- racket-lang-org/sync
To build without uploading, use --save-temps --render-locally <directory-name>
. If you
don't have AWS credentials, the pages will still build, and look for
"Files so far written to" for the temporary directory that contains
the rendered pages.
Contribute to Racket by submitting a pull request, reporting an issue, joining the development mailing list, or visiting the IRC or Slack channels.
Racket, including these packages, is free software, see LICENSE for more details.
By making a contribution, you are agreeing that your contribution is licensed under the Apache 2.0 license and the MIT license.