-
-
Notifications
You must be signed in to change notification settings - Fork 170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
π·ββοΈ Add Build Process for Definitions #31
Conversation
This is so lovely, @ovlb ! I appreciate all you've done so much. π Generally speaking, the structure so far seems intuitive and really helpful. I can see how to evolve it. Now that I'm writing more definitions, I can see more use cases and needs. 1οΈβ£ I believe based on how you write it we can add basically infinite headers to create the needed sections. I have ideas as to how I want different types of definition types to be structured. Maybe we could set a few template types for words? 2οΈβ£ Can alt-words be linked from FML in some sort of automated way? For example, can we somehow run a script to see if any of the alt words is present in the dictionary, and if so, automatically link it? 3οΈβ£ I'd like to be able to match the styling a bit more closely to the page, but this is a less critical thing to influence later. I'd also love @zachleat to weigh in about this general approach, and share if there are any other ways we could use Eleventy intelligently. |
Hey Tatiana, Glad to hear that you can work with and understand the updated structure. 1οΈβ£: Yes, correct. Currently, you could go free form with the definitions. Adding example files which outside contributors can copy to write their own definitions is on my to-do list. I would maybe add a folder where these examples can live? We can link to that folder from a 2οΈβ£: This should definitely be possible in the build step or through a template filter. Iβll have a look later. 3οΈβ£: Working on it. :) OMG, you tagged Zach. I will hide under the rug for now. π With warmth, |
@tatianamac Iβve added a filter to link to defined alt words (added Also, the styles match the original better. Still, way to go, but getting there :) As the styles now rely on a bunch of sibling selector trickery and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great! My only high level piece of feedback is that you might be able to use one collection for definitions
and definedWords
somehow? You may even be able to get away with removed the defined
key in each word front matter and tying that to word.templateContent.trim().length
instead? Just one less thing to keep in sync manually
Oh one more thing based on your comments I just want to make sure youβre aware of |
@zachleat Thanks so much for your kind feedback :) re one collection: I tried that, but the template was complaining about me trying to filter at one point. Thatβs why I went with two separate collections. In hindsight, it also makes the re checking for template content: Thatβs a nice hint! Upside I see with the And I totally missed O* |
β¦elled defintion
some defintions might be flagged as avoid without being further specified, in this case no flag should be rendered in the table of content
@tatianamac The docs are very much work in progress. As a matter of fact, I wanted to discuss proper examples with you. I just started writing and maybe got a bit overenthusiastic. Thanks to the power of |
@tatianamac Data Processing is done π€ |
@ovlb Can we consider this PR closed (asbuild process for definitions is the core task here)? I'd ideally like to open a few new issues of things you ambitiously included on your to-do list (and got amazingly far onβthank you!).
|
@tatianamac Yes, almost. I would like to add the build process so that the Netlify deploy works seamlessly. I will do it this evening. The other open items can be handled in separate Issues/PRs. I will split it iup, after adding the build config. |
You're so helpful and wonderful! Thank you! ππ½ |
@tatianamac You are too kind. Glad I can help with this project. Build config is now existing, Netlify works. I think you can merge this. π©βπ |
Hi!
First of all: This is not done yet. But I would rather get some feedback now, or at least hints if the direction can work out. :)
This is also does not yet handle multiple definitions as proposed by @good-idea in https://github.com/tatianamac/selfdefined/issues/13#issuecomment-548979863.
It is basically a compromise of being human editable, but machine parsable. With a better automated editing process we will probably get closer to not-human-editable. One learning so far: Dictionaries are very hard to do right.
I added Eleventy and this is nice. Definitions (for now just some test cases) live in
11ty/definitions
. We can add one.md
file per word, put in some front matter (e.g. for title, flags and alt-words) and write the definition itself in Markdown. This is not fully specced out and especially the rendering/applying the existing styles needs more work.I have done some updates to the markup here and there (e.g. the alt words are now a list to make more sense for assistive technology).
You can test this by running
npm install
in the project root andnpm run watch
afterwards.There is no real dev server yet. CodeKit should work, but as this is not a resource everyone can afford, there needs to be some more work done on that side.
Also, if we would get one dollar for every instance of me failing to write Β«definitionΒ» the project would have a very solid financial standing now. π
To-Do
-
in the appropriate alphabetical place