- Homepage revamp:
- Rewrite the homepage in a linear format of sections, with every other
section styled with full-width gray background.
- The first section is a short intro, with big buttons for "download" and
"learn".
- Create a new "case studies" page to house the explainers for the examples.
- Site-wide styles:
- Restyle code blocks and ttyshots, using a more subtle gray border box
instead of gray background.
- Support headers for code blocks and ttyshots, in a style that vaguely
resembles title bars of desktop windows. In Markdown sources, additional
content after the language tag becomes the header.
- Reorganize the global stylesheet and template, including using 2 spaces for
indentation and putting dark mode color rules next to the light mode rules.
- Change debug hotkey to toggle dark mode to Shift-D.
- Ttyshots:
- Handle trailing spaces in more places in the ttyshot tool - there seems to
be more of them in the latest tmux version.
- Base the ttyshot tool's parser on pkg/transcript.
- Support per-ttyshot cols and rows.
- Rename x.elvts and x.ttyshot.html to x-ttyshot.elvts and x-ttyshot.html.
- Change the syntax from "@ttyshot filename" to code block with a special
"ttyshot" language tag to work better with the header syntax.
This construct is only used in two places - grouping numerical comparison
commands together and grouping string comparison commands together. However,
grouping them together makes it impossible to look up their individual elvdocs,
for example using "doc:show '<'", so abandon this half-baked grouping mechanism.
In future a more general mechanism to group symbols together may be introduced.
Document != and !=s as if they only take two arguments, addressing #1767. The
actual change will be done in a separate commit.
The Name field now contains the qualified name, with the "$" prefix for variables.
The Content field no longer contains the usage text for functions. That is now
stored in a separate Fn field, and the FullContent method now returns what used
to be the Content field.
This command used to depend on pkg/mods/doc to access the embedded .elv, which
in turn depends on all the packages that implement builtin modules. The latter
set of packages depends on almost all the Elvish packages transitively. As a
result, almost any change in any Elvish package will trigger a rebuild of this
command and the whole website.
This commit minimizes the dependency on Elvish packages by having it read the
.elv files during runtime instead (enabled by
9112eb1ab2).
Additionally:
- Move HighlightCodeBlock, needed by website/cmd/md2html, from pkg/mods/doc
to pkg/elvdoc. Moving it is necessary to completely remove the dependency of
website/cmd/md2html on pkg/mods/doc.
- Remove the dependency of pkg/edit/highlight on pkg/eval. It only uses
eval.UnpackCompilationErrors; move this work to the supplied Check function.
This removes the transitive dependency of website/cmd/md2html on pkg/eval.
- Augment website/tools/md-deps to recognize @module lines and add dependency on
the corresponding .elv files.
This syntax has been documented to have an implicit destination of
builtin.html#foo, but it never worked correctly outside builtin.html itself.
Also do some minor cleanups of the package, including removing bogus package
godocs that were inherited from the previous version where the components were
separate programs.
This is to prepare for a stylesheet overhaul that will reduce the width of the
body text.
Also change home/pipelines.elvts to use XKCD instead, which is a bit more
interesting than GitHub and makes for a shorter URL.
For example, [`put`]() links to the elvdoc for "put".
Also remove the @cf macro now that implicit targets make it easier to link to
other elvdoc sections.
- Add a TextBuilder for building a Text efficiently.
- Remove NormalizeText, and make functionsn this package always return already
normal Text instances.
- Rename Style.{Foreground Background} to Fg and Bg.
- Fix the Repr output of both Text and Segment.
Code blocks in CommonMark don't support HTML entities, so they shouldn't be HTML-escaped.
This bug causes HTML entities to show up in the output of doc:show, which
(correctly) does not interprete HTML entities. It was previously masked earlier
by website/cmd/highlight HTML-unescaping code blocks; fix the latter too.
We are no longer using Pandoc, so this limitation can be lifted.
Also make @cf generate internal links where applicable in non-builtin modules:
"@cf mod:fn" in the doc of "mod" now links to just "#mod:fn" instead of
"mod.html#mod:fn".
Instead of a hardcoded "~> ", recognize anything starting with ~ or /, followed
by any non-spaces, and ending with "> ". This should cover most prompts as long
as the directory name doesn't contain spaces, and hopefully has no false
positive.
- Remove all content before "[CUT]". This allows the ttyshot spec to remove part
of setup.
- Use a edit:max-height value of 15, to generate ttyshots with size consistent
with the original ones.
- Add more entries to directory history to get more lines in the history listing
ttyshot.
- Adjust specs for the ttyshots on the home page to get the ttyshots have the
same height.
Lines that start with # that is not followed by a space is taken to be an op.
This is a first step to make ttyshot specs (mostly) valid Elvish scripts.
The wait-for-str op is no longer needed since the ttyshot procedure will now end
gracefully.
The wait-for-re op seems to never been used in the first place.
Also add a -v flag that enables verbose logging, although there is no logging
call yet.
- Handle newlines correctly, in case they appear in the middle of a segment.
- Don't wrap unstyled segments in <span>.
- Strip unstyled trailing spaces.
- Don't escape ' and " - they are pretty frequent, and not escaping them makes
it slightly easier to read diffs.
Also fix a bug in waitForOutput when budget is exactly 0.
- Move the output writing to the end. This avoids putting the output file in a
truncated state while the ttyshot process is running.
- Don't save raw output of capture-pane unless the -save-raw flag is given.
- Use a fork of testutil.ApplyDir to specify the layout in a map
- Hardcode the elvish directory's layout, remove cp-elvish.sh
- Put rc.elv where Elvish expects to find it
- Place temporary files in a hidden .tmp directory
- Start with an empty environment, only setting HOME, PATH and TERM
- Use -T to force terminal features, removing the need for a dedicated tmux.conf
file