Skip to content

Commit

Permalink
Use pandoc to convert markdown to html (#30)
Browse files Browse the repository at this point in the history
* wip basic text plus footnote styling

* wip all files

* wip fix style

* clean up

* use pandoc_jll

* add footnotes section header

* fix section anchor

* extra header content

* fix local links

* fix links

* tidy

* remove captions

* clean ctd
  • Loading branch information
hannahilea authored Oct 3, 2024
1 parent 064c298 commit 29bd1da
Show file tree
Hide file tree
Showing 25 changed files with 1,694 additions and 700 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@ Personal website; can be viewed at [hannahilea.com](https://hannahilea.com).
### Use template to add new content

Run `julia --startup-file=no add_stuff.jl <ARG>` with arg `blog` or `p5`.

### Convert

Will be automated (soon); in the meantime, run `julia build-blogs/run.jl` to convert all block markdown src.md files to index.html files.
2 changes: 1 addition & 1 deletion add_stuff.jl
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ function new_blog_post()
@info "Creating new blog directory" blog_title dir_name
cp(joinpath("blog", "__template"), dir)
for file in readdir(dir; join=true)
if endswith(file, ".rss_blob.xml")
if endswith(file, ".rss_blob.xml") || endswith(file, ".html.template")
rm(file)
continue
end
Expand Down
70 changes: 26 additions & 44 deletions assets/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ body {
font-weight: bolder;
}

md-block {
.blog {
line-height: 150%;
}

Expand All @@ -93,47 +93,49 @@ h2, h3 {
margin-bottom: 3px;
}

md-block > h1 {
.blog > h1 {
line-height: 1.2em;
}

.footnote-ref, .footnote {
text-decoration: underline;
text-underline-offset: 1px;
}

.footnotes {
font-size: 80%;
a.footnote-ref {
text-decoration: none;
}

sup {
a > sup {
vertical-align: baseline;
position: relative;
top: -0.4em;
text-decoration: underline;
text-underline-offset: .1em;
}

a.footnote-back {
text-decoration: underline;
text-underline-offset: .1em;
}

.footnotes > ol {
font-size: smaller;
}

img {
max-width: 400px;
align-self: center;
}

a.impersonal,
.blog a {
color:#03163f;
}

a,
a.local {
color: #0843c3;
text-decoration: underline dotted;
text-underline-offset: 3px;
}

a.impersonal,
md-block a {
color:#03163f;
}

md-block a.internal-anchor {
text-decoration: none;
}

md-block p > a.internal-anchor {
.blog [href^="#"]:not(.footnote-back, .footnote-ref){
text-decoration: none;
font-weight: bold;
font-style: italic;
Expand Down Expand Up @@ -270,8 +272,7 @@ img.home-img {
margin-bottom: 1.6em;
}

.language-,
.language-julia {
pre {
background: #eeeff1;
border: 2px solid #ddd;
page-break-inside: avoid;
Expand All @@ -283,39 +284,20 @@ img.home-img {
padding: 1em 1.5em;
}

.js-fallback-container {
display: flex;
flex-flow: column;
height: 100vh;
}

.js-fallback-container .js-fallback-desc {
border: none;
border-left: 4mm ridge rgb(255, 230, 0);
flex: 0 1 auto;
margin-bottom: 2em;
}

.js-fallback {
flex: 1 1 auto;
display: flex;
border:1px dashed black;
}

md-block .alert {
.blog .alert {
border: none;
border-left: 2mm solid rgb(255, 230, 0);
padding-left: .5em;
flex: 0 1 auto;
margin-bottom: 2em;
}

md-block .alert-heading {
.blog .alert-heading {
font-weight: bold;
margin-bottom: 1em;
}

md-block img {
.blog img {
display: block;
margin-left: auto;
margin-right: auto;
Expand Down
Loading

0 comments on commit 29bd1da

Please sign in to comment.