Commit Graph
19 Commits
Author SHA1 Message Date
gleb 4370acd1bb Snippets update (#6204)
~~Added explanatory comment about math package usage~~
Changed Main() entry point to Run() as per design and toolchain

This small update of front page code snippets will add
explanatory comment to highlight that provided Carbon code
is  hypothetical and meant to show the look and feel of the language.

Also it delivers change of Main() to Run() to
highlight correct entry point for Carbon lang.
2025-10-17 13:09:46 +00:00
Jon Ross-PerkinsandChandler Carruth b6396e97f8 Build a website. (#4189)
Demo site: https://jonmeow.carbon-lang.dev/

I'm trying to keep work under the `/website` subdirectory so that the
misc files don't interfere with unrelated views of the repository. The
`prebuild.py` script does some work to move things around and add
frontmatter, helping the jekyll generation.

I'm using the "just-the-docs" theme because I think it's a decent match
for what we want, and getting jekyll up and running with it wasn't too
difficult. Note #1526 proposed using Docusaurus; I started out there,
but was having trouble getting it working with newer versions. The
plugins in particular I got stuck trying to make work, which sent me
looking for options that we could have working with less customization.
I do lean towards jekyll though, because it's what GH uses so hopefully
we can get a more consistent experience.

Having a website has been approved for a while under #1492, but hasn't
been a priority. I'm mainly doing this because I want to just be able to
point people to carbon-lang.dev and have easy links that way.

---------

Co-authored-by: Chandler Carruth <chandlerc@gmail.com>
2024-08-20 17:53:06 +00:00
Jon Ross-Perkins 23ae2a7190 Update images from snippet changes. (#4061)
Note, to see the results, here's a [README
link](https://github.com/carbon-language/carbon-lang/blob/654a06e0af7886dc43f52d35f4d11f32c5e8da9d/README.md)
(note this is for the 654a06e commit)

Enumerating changes:

- Finish the work started in #3735 by updating the images.
- Reverts changes to vector initialization style made in #3735, instead
preferring https://abseil.io/tips/88 style
- Switch array syntax to match [#syntax
discussion](https://discord.com/channels/655572317891461132/709488742942900284/1219410082719207444)
- Some nuanced highlighting changes to try matching what I'm seeing in
GitHub.
- The original intent was to match GitHub's highlighting, at least for
C++; Carbon highlighting is expected to be poor because it's not a
supported language.
2024-06-18 19:01:33 +00:00
Rajat Roy e60df54a4f Replace image file in /docs/images/ directory and update the svg edit to reflect proposal #3927. (#3981)
Replace image file in /docs/images/ directory and update the svg editing
document to reflect the change to package syntax from proposal #3927

Closes #3969
2024-05-23 21:35:33 +00:00
Richard Smith 6bbbd4ec1f More consistent package syntax (#3927)
Change the syntax for `package` declarations from:

```carbon
[package Foo] [library "bar"] api;
[package Foo] [library "bar"] impl;
```

to

```carbon
[package Foo] [library "bar"];
impl [package Foo] [library "bar"];
```
2024-05-16 00:55:37 +00:00
Patrick Johnston e936f18401 Fix up the C++ snippet to reflect the carbon snippet (#3735)
Offers a more precise apples-to-apples language comparison. Replaces the
non-portable `M_PI` and removes the extraneous arg parameters. It does
use C++23, so I can understand if that's unacceptable for the time
being.
2024-03-04 23:40:15 +00:00
Rayyan Kandjonmeow a1d03b1f56 Fixed var keyword in Carbon code example. Incorrect keyword color. (#3600)
This PR is changing the color of the var keyword in the `PrintTotalArea`
source example which is referenced in the README. The original color was
white and changed to `#FF7B72`.

---------

Co-authored-by: jonmeow <jperkins@google.com>
2024-01-19 22:30:23 +00:00
Jon Ross-Perkins d7613f5ef7 Updating links for shared drive and access notes (#1933)
Part of #1902 

Fixes #1904 

Regarding #1904, using #access-requests because I've decided I feel weird using any other channel for this (including #proposal-prs-and-process)
2022-08-08 09:11:00 -07:00
Patryk Gutowski a8de3074d8 Fix typo in svg image #1647 (#1652)
There was an extra ')' when calling function QuickSort, switched files and uploaded google drive image.
2022-07-24 14:55:13 -07:00
Jon Ross-PerkinsandPatryk Gutowski e38c697938 Fix cpp image snippet. (#1567)
There's an extra curly brace per @pacion, and a missing space in print was also reported to us on other forums.

Co-authored-by: Patryk Gutowski <37260994+pacion@users.noreply.github.com>
2022-07-22 09:26:03 -07:00
Ilja van Sprundel e85282567a fix typo in QuickSort code (#1466)
Seems there were 1 too many closing round brackets when calling QuickSort.
2022-07-20 18:25:06 +03:00
Jon Ross-Perkins 59f91aa0d5 Replace README folders with proper public version (#1430) 2022-07-19 14:50:35 -07:00
Jon Ross-Perkins 31c3953a5f Orient README around Print (#1409) 2022-07-19 06:17:46 -04:00
Jon Meow 8a515937fc Fix #include <vector> in code image (remove quotes) (#1314)
The text is correct.
2022-06-06 17:47:30 -07:00
josh11b fb0e8fa3bd Fix extra } in sample code (#1269) 2022-05-16 17:04:31 -07:00
62c8821f20 Rewrite example for span/Slice. (#1203)
Co-authored-by: josh11b <josh11b@users.noreply.github.com>
Co-authored-by: Chandler Carruth <chandlerc@gmail.com>
2022-04-27 12:43:55 -07:00
Jon MeowandChandler Carruth 8c9bf973c0 Editing README examples (#1164)
Co-authored-by: Chandler Carruth <chandlerc@gmail.com>
2022-04-08 08:36:12 -07:00
Richard Smith 0b8a96af6d Fix C++ range-based for syntax (#1163) 2022-03-30 18:18:09 -07:00
31fa2608d4 Updated README.md (#1075)
Revised landing page, including updated README.

Co-authored-by: josh11b <josh11b@users.noreply.github.com>
Co-authored-by: Chandler Carruth <chandlerc@gmail.com>
Co-authored-by: Jon Meow <jperkins@google.com>
2022-03-16 17:33:45 -07:00